artyaltanzaya commited on
Commit
27324e6
·
1 Parent(s): 475d8cf
Files changed (3) hide show
  1. app.py +1 -1
  2. requirements.txt +2 -1
  3. setup.sh +1 -2
app.py CHANGED
@@ -20,7 +20,7 @@ print("path", os.getcwd())
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
 
 
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.float32).to(device)
24
  # ----Grounding DINO
25
  groundingdino_model = load_model("./GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py", "./GroundingDINO/weights/groundingdino_swint_ogc.pth")
26
 
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  segment-anything
 
2
  torch
3
  numpy
4
  opencv-python
@@ -6,4 +7,4 @@ torchvision
6
  diffusers
7
  supervision
8
  transformers
9
- addict
 
1
  segment-anything
2
+ --extra-index-url https://download.pytorch.org/whl/cu113
3
  torch
4
  numpy
5
  opencv-python
 
7
  diffusers
8
  supervision
9
  transformers
10
+ addict
setup.sh CHANGED
@@ -2,8 +2,7 @@
2
 
3
  # Clone the GroundingDINO repository
4
  # git clone https://github.com/IDEA-Research/GroundingDINO.git
5
-
6
- # Change directory to GroundingDINO
7
  cd GroundingDINO
8
 
9
  # Install the Python package
 
2
 
3
  # Clone the GroundingDINO repository
4
  # git clone https://github.com/IDEA-Research/GroundingDINO.git
5
+ --extra-index-url https://download.pytorch.org/whl/cu113
 
6
  cd GroundingDINO
7
 
8
  # Install the Python package