Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import gradio as gr
|
|
5 |
# Load the Stable Diffusion model (text-to-image generator)
|
6 |
model_id = "runwayml/stable-diffusion-v1-5"
|
7 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
8 |
-
pipe.to("
|
9 |
|
10 |
# Function to generate images from text prompts
|
11 |
def generate_image(prompt):
|
|
|
5 |
# Load the Stable Diffusion model (text-to-image generator)
|
6 |
model_id = "runwayml/stable-diffusion-v1-5"
|
7 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
8 |
+
pipe.to("cpu") # If you have a GPU, use it to speed up generation
|
9 |
|
10 |
# Function to generate images from text prompts
|
11 |
def generate_image(prompt):
|