Spaces:
Runtime error
Runtime error
UdacityNoob
commited on
Commit
β’
a075000
1
Parent(s):
6397763
Cast steps to "int" to fix error at gradio
Browse files- app.py +1 -1
- requirements.txt +1 -1
app.py
CHANGED
@@ -18,7 +18,7 @@ pipe = pipe.to(device)
|
|
18 |
# define gradio function
|
19 |
def generate(prompt:str, seed:int, guidance:float, steps:int):
|
20 |
generator = torch.Generator(device).manual_seed(int(seed))
|
21 |
-
image = pipe(prompt=prompt, generator=generator, guidance_scale=guidance, num_inference_steps=steps).images[0]
|
22 |
return image
|
23 |
|
24 |
if device == "cuda":
|
|
|
18 |
# define gradio function
|
19 |
def generate(prompt:str, seed:int, guidance:float, steps:int):
|
20 |
generator = torch.Generator(device).manual_seed(int(seed))
|
21 |
+
image = pipe(prompt=prompt, generator=generator, guidance_scale=guidance, num_inference_steps=int(steps)).images[0]
|
22 |
return image
|
23 |
|
24 |
if device == "cuda":
|
requirements.txt
CHANGED
@@ -3,5 +3,5 @@ scipy
|
|
3 |
ftfy
|
4 |
torch>=1.10.0
|
5 |
transformers
|
6 |
-
diffusers
|
7 |
gradio>=3.4
|
|
|
3 |
ftfy
|
4 |
torch>=1.10.0
|
5 |
transformers
|
6 |
+
diffusers==0.6.0
|
7 |
gradio>=3.4
|