ironjr commited on
Commit
32fb06b
1 Parent(s): 1fceb42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -563,13 +563,18 @@ def draw(state, drawpad):
563
  # mask_strengths = [1] + [state.mask_strengths[v] for v in has_masks]
564
  # mask_stds = [0] + [state.mask_stds[v] for v in has_masks]
565
 
566
- for i in range(len(has_masks)):
567
- model.update(
568
- idx=i,
569
- mask=masks[i:i + 1],
570
- mask_strength=mask_strengths[i],
571
- mask_std=mask_stds[i],
572
- )
 
 
 
 
 
573
  # data = dict(
574
  # masks=masks,
575
  # mask_strengths=mask_strengths,
 
563
  # mask_strengths = [1] + [state.mask_strengths[v] for v in has_masks]
564
  # mask_stds = [0] + [state.mask_stds[v] for v in has_masks]
565
 
566
+ model.update_masks(
567
+ mask=masks,
568
+ mask_strength=mask_strengths,
569
+ mask_std=mask_stds,
570
+ )
571
+ # for i in range(len(has_masks)):
572
+ # model.update(
573
+ # idx=i,
574
+ # mask=masks[i:i + 1],
575
+ # mask_strength=mask_strengths[i],
576
+ # mask_std=mask_stds[i],
577
+ # )
578
  # data = dict(
579
  # masks=masks,
580
  # mask_strengths=mask_strengths,