Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,6 +71,11 @@ def infer(prompt,negative_prompt,seed,resolution, steps):
|
|
| 71 |
except:
|
| 72 |
generator=None
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
w,h = resolution.split()
|
| 75 |
w,h = int(w),int(h)
|
| 76 |
image = pipe(prompt,num_inference_steps=steps, negative_prompt=negative_prompt,generator=generator,width=w,height=h).images[0]
|
|
|
|
| 71 |
except:
|
| 72 |
generator=None
|
| 73 |
|
| 74 |
+
try:
|
| 75 |
+
steps=int(steps)
|
| 76 |
+
except:
|
| 77 |
+
raise Exception('Steps must be an integer')
|
| 78 |
+
|
| 79 |
w,h = resolution.split()
|
| 80 |
w,h = int(w),int(h)
|
| 81 |
image = pipe(prompt,num_inference_steps=steps, negative_prompt=negative_prompt,generator=generator,width=w,height=h).images[0]
|