recoilme commited on
Commit
440e9e8
·
verified ·
1 Parent(s): 650d0e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -31,8 +31,8 @@ class SimpleDiffusionPipeline(DiffusionPipeline):
31
  self,
32
  prompt,
33
  negative_prompt=None,
34
- height=384,
35
- width=384,
36
  num_inference_steps=40,
37
  guidance_scale=5.5,
38
  generator=None,
@@ -114,7 +114,7 @@ pipe = SimpleDiffusionPipeline(
114
  ).to(device)
115
 
116
  MAX_SEED = np.iinfo(np.int32).max
117
- MAX_IMAGE_SIZE = 384
118
 
119
  @spaces.GPU #[uncomment to use ZeroGPU]
120
  def infer(
@@ -205,18 +205,18 @@ with gr.Blocks(css=css) as demo:
205
  with gr.Row():
206
  width = gr.Slider(
207
  label="Width",
208
- minimum=192,
209
  maximum=MAX_IMAGE_SIZE,
210
  step=64,
211
- value=256, # Replace with defaults that work for your model
212
  )
213
 
214
  height = gr.Slider(
215
  label="Height",
216
- minimum=192,
217
  maximum=MAX_IMAGE_SIZE,
218
  step=64,
219
- value=384, # Replace with defaults that work for your model
220
  )
221
 
222
  with gr.Row():
 
31
  self,
32
  prompt,
33
  negative_prompt=None,
34
+ height=640,
35
+ width=640,
36
  num_inference_steps=40,
37
  guidance_scale=5.5,
38
  generator=None,
 
114
  ).to(device)
115
 
116
  MAX_SEED = np.iinfo(np.int32).max
117
+ MAX_IMAGE_SIZE = 640
118
 
119
  @spaces.GPU #[uncomment to use ZeroGPU]
120
  def infer(
 
205
  with gr.Row():
206
  width = gr.Slider(
207
  label="Width",
208
+ minimum=384,
209
  maximum=MAX_IMAGE_SIZE,
210
  step=64,
211
+ value=512, # Replace with defaults that work for your model
212
  )
213
 
214
  height = gr.Slider(
215
  label="Height",
216
+ minimum=384,
217
  maximum=MAX_IMAGE_SIZE,
218
  step=64,
219
+ value=640, # Replace with defaults that work for your model
220
  )
221
 
222
  with gr.Row():