Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|