Sayiqa commited on
Commit
5a729e3
Β·
verified Β·
1 Parent(s): 711a67e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -282,15 +282,15 @@ else:
282
  # Load speech-to-text model (Whisper)
283
  speech_to_text = pipeline("automatic-speech-recognition", model="openai/whisper-tiny")
284
 
285
- # Load Stable Diffusion model for text-to-image
286
- # text_to_image = StableDiffusionPipeline.from_pretrained(
287
- # "runwayml/stable-diffusion-v1-5",revision="fp16"
288
- # )
289
  text_to_image = StableDiffusionPipeline.from_pretrained(
290
- "runwayml/stable-diffusion-v1-5",
291
- cache_dir="./my_model_cache", # Custom cache directory
292
- revision="fp16"
293
  )
 
 
 
 
 
294
 
295
  device = "cuda" if torch.cuda.is_available() else "cpu" # This will now work since torch is imported
296
  text_to_image.to(device)
 
282
  # Load speech-to-text model (Whisper)
283
  speech_to_text = pipeline("automatic-speech-recognition", model="openai/whisper-tiny")
284
 
285
+ #Load Stable Diffusion model for text-to-image
 
 
 
286
  text_to_image = StableDiffusionPipeline.from_pretrained(
287
+ "runwayml/stable-diffusion-v1-5",revision="fp16"
 
 
288
  )
289
+ # text_to_image = StableDiffusionPipeline.from_pretrained(
290
+ # "runwayml/stable-diffusion-v1-5",
291
+ # cache_dir="./my_model_cache", # Custom cache directory
292
+ # revision="fp16"
293
+ # )
294
 
295
  device = "cuda" if torch.cuda.is_available() else "cpu" # This will now work since torch is imported
296
  text_to_image.to(device)