Eyalgut commited on
Commit
ffd0df2
1 Parent(s): 398ef2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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]