ZubairAhmed777 commited on
Commit
3c163ff
·
verified ·
1 Parent(s): 2533b74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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("cuda") # 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):
 
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):