huzpsb soiz1 commited on
Commit
8595cc2
·
verified ·
1 Parent(s): 3598c20

Update app.py (#3)

Browse files

- Update app.py (42ca636e15ea283a7715ef6f75c91e94008d3963)


Co-authored-by: izum00 <soiz1@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,7 +7,8 @@ import torch
7
  from PIL import Image
8
  from scipy.ndimage import binary_dilation, binary_erosion
9
  torch.serialization.add_safe_globals([object])
10
-
 
11
  # FAQ:
12
  # Why is the detection model needed since the meaningful_diff can already detect watermark masks?
13
  # The detection model is trained on a larger, more diverse dataset, and is more robust to different watermark types.
 
7
  from PIL import Image
8
  from scipy.ndimage import binary_dilation, binary_erosion
9
  torch.serialization.add_safe_globals([object])
10
+ from torch.serialization import add_safe_globals
11
+ add_safe_globals([torch.nn.modules.container.Sequential])
12
  # FAQ:
13
  # Why is the detection model needed since the meaningful_diff can already detect watermark masks?
14
  # The detection model is trained on a larger, more diverse dataset, and is more robust to different watermark types.