Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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("
|
|
|
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")
|