Spaces:
Build error
Build error
calebaryee321
commited on
Commit
·
765f964
1
Parent(s):
17413e5
Update app.py
Browse files
app.py
CHANGED
@@ -27,14 +27,14 @@ def SpeechToText(audio):
|
|
27 |
|
28 |
def img_Generation(text):
|
29 |
print(text)
|
30 |
-
|
31 |
-
model_id = "stabilityai/stable-diffusion-2-1"
|
32 |
|
33 |
# Use the Euler scheduler here instead
|
34 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
35 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16)
|
36 |
pipe = pipe.to("cuda")
|
37 |
-
image = pipe(text, num_inference_steps =
|
38 |
#image.save("img_1.png")
|
39 |
|
40 |
return image
|
|
|
27 |
|
28 |
def img_Generation(text):
|
29 |
print(text)
|
30 |
+
model_id = "stabilityai/stable-diffusion-2"
|
31 |
+
#model_id = "stabilityai/stable-diffusion-2-1"
|
32 |
|
33 |
# Use the Euler scheduler here instead
|
34 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
35 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16)
|
36 |
pipe = pipe.to("cuda")
|
37 |
+
image = pipe(text, num_inference_steps = 80).images[0]
|
38 |
#image.save("img_1.png")
|
39 |
|
40 |
return image
|