Manasa1 commited on
Commit
aac5874
·
verified ·
1 Parent(s): 0b60483

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -18,7 +18,8 @@ tts = TTS(model_name="tts_models/en/ljspeech/tacotron2-DDC")
18
  # Initialize Stable Diffusion pipeline
19
  pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16)
20
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
21
- pipe = pipe.to("cuda")
 
22
 
23
  def generate_text(prompt, max_length=200):
24
  input_ids = tokenizer.encode(prompt, return_tensors="pt")
 
18
  # Initialize Stable Diffusion pipeline
19
  pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16)
20
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
21
+ pipe = pipe.to("cpu")
22
+
23
 
24
  def generate_text(prompt, max_length=200):
25
  input_ids = tokenizer.encode(prompt, return_tensors="pt")