lopho commited on
Commit
556b961
1 Parent(s): 2a33115

sanitize image size

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -47,6 +47,8 @@ def generate(
47
  width = int(width)
48
  num_frames = int(num_frames)
49
  seed = int(seed)
 
 
50
  if seed < 0:
51
  seed = -seed
52
  inference_steps = int(inference_steps)
@@ -217,14 +219,14 @@ with gr.Blocks(title = 'Make-A-Video Stable Diffusion JAX', analytics_enabled =
217
  label = 'Width',
218
  minimum = 64,
219
  maximum = 512,
220
- step = 1,
221
  value = 448
222
  )
223
  height_input = gr.Slider(
224
  label = 'Height',
225
  minimum = 64,
226
  maximum = 512,
227
- step = 1,
228
  value = 448
229
  )
230
  fps_input = gr.Slider(
 
47
  width = int(width)
48
  num_frames = int(num_frames)
49
  seed = int(seed)
50
+ height = (height // 64) * 64
51
+ width = (width // 64) * 64
52
  if seed < 0:
53
  seed = -seed
54
  inference_steps = int(inference_steps)
 
219
  label = 'Width',
220
  minimum = 64,
221
  maximum = 512,
222
+ step = 64,
223
  value = 448
224
  )
225
  height_input = gr.Slider(
226
  label = 'Height',
227
  minimum = 64,
228
  maximum = 512,
229
+ step = 64,
230
  value = 448
231
  )
232
  fps_input = gr.Slider(