abhishek HF staff commited on
Commit
53f9d01
1 Parent(s): 205e6aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -8,8 +8,15 @@ from diffusers import ControlNetModel
8
  from diffusers import UniPCMultistepScheduler
9
  from controlnet_inpaint import StableDiffusionControlNetInpaintPipeline
10
  import colorsys
 
11
 
12
- sam_checkpoint = "weights/sam_vit_h_4b8939.pth"
 
 
 
 
 
 
13
  model_type = "vit_h"
14
  device = "cuda"
15
 
 
8
  from diffusers import UniPCMultistepScheduler
9
  from controlnet_inpaint import StableDiffusionControlNetInpaintPipeline
10
  import colorsys
11
+ import urllib.request
12
 
13
+ url = "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth"
14
+ filename = "sam_vit_h_4b8939.pth"
15
+
16
+ urllib.request.urlretrieve(url, filename)
17
+
18
+
19
+ sam_checkpoint = "sam_vit_h_4b8939.pth"
20
  model_type = "vit_h"
21
  device = "cuda"
22