radames HF staff commited on
Commit
6f44efe
β€’
1 Parent(s): 316eb66

fix initial seed

Browse files
Files changed (1) hide show
  1. visualizer_drag_gradio.py +2 -2
visualizer_drag_gradio.py CHANGED
@@ -227,7 +227,7 @@ with gr.Blocks() as app:
227
  'show_mask': True, # add button
228
  "generator_params": dnnlib.EasyDict(),
229
  "params": {
230
- "seed": 0,
231
  "motion_lambda": 20,
232
  "r1_in_pixels": 3,
233
  "r2_in_pixels": 12,
@@ -354,7 +354,7 @@ with gr.Blocks() as app:
354
  # Right --> Image
355
  with gr.Column(scale=8):
356
  form_image = ImageMask(
357
- # value=global_state.value['images']['image_show'],
358
  brush_radius=20).style(
359
  width=768,
360
  height=768) # NOTE: hard image size code here.
 
227
  'show_mask': True, # add button
228
  "generator_params": dnnlib.EasyDict(),
229
  "params": {
230
+ "seed": int(np.random.randint(0, 2**32 - 1)),
231
  "motion_lambda": 20,
232
  "r1_in_pixels": 3,
233
  "r2_in_pixels": 12,
 
354
  # Right --> Image
355
  with gr.Column(scale=8):
356
  form_image = ImageMask(
357
+ value=global_state.value['images']['image_show'],
358
  brush_radius=20).style(
359
  width=768,
360
  height=768) # NOTE: hard image size code here.