Spaces:
Runtime error
Runtime error
artyaltanzaya
commited on
Commit
·
7a2e256
1
Parent(s):
3f76825
app
Browse files
app.py
CHANGED
@@ -18,11 +18,11 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
18 |
print("path", os.getcwd())
|
19 |
|
20 |
model_type = "vit_h"
|
21 |
-
predictor = SamPredictor(sam_model_registry[model_type](checkpoint="./weights/sam_vit_h_4b8939.pth").to(device))
|
22 |
# ------Stable Diffusion
|
23 |
pipe = StableDiffusionInpaintPipeline.from_pretrained("stabilityai/stable-diffusion-2-inpainting", torch_dtype=torch.float16,).to(device)
|
24 |
# ----Grounding DINO
|
25 |
-
groundingdino_model = load_model("./groundingdino/config/GroundingDINO_SwinT_OGC.py", "./weights/groundingdino_swint_ogc.pth")
|
26 |
|
27 |
BOX_TRESHOLD = 0.3
|
28 |
TEXT_TRESHOLD = 0.25
|
|
|
18 |
print("path", os.getcwd())
|
19 |
|
20 |
model_type = "vit_h"
|
21 |
+
predictor = SamPredictor(sam_model_registry[model_type](checkpoint="./GroundingDINO/weights/sam_vit_h_4b8939.pth").to(device))
|
22 |
# ------Stable Diffusion
|
23 |
pipe = StableDiffusionInpaintPipeline.from_pretrained("stabilityai/stable-diffusion-2-inpainting", torch_dtype=torch.float16,).to(device)
|
24 |
# ----Grounding DINO
|
25 |
+
groundingdino_model = load_model("./GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py", "./GroundingDINO/weights/groundingdino_swint_ogc.pth")
|
26 |
|
27 |
BOX_TRESHOLD = 0.3
|
28 |
TEXT_TRESHOLD = 0.25
|