Spaces:
Running
on
Zero
Running
on
Zero
test: sam
Browse files
app.py
CHANGED
@@ -9,6 +9,13 @@ from controlnet_union import ControlNetModel_Union
|
|
9 |
from pipeline_fill_sd_xl import StableDiffusionXLFillPipeline
|
10 |
from PIL import Image, ImageDraw
|
11 |
import numpy as np
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
MODELS = {
|
14 |
"RealVisXL V5.0 Lightning": "SG161222/RealVisXL_V5.0_Lightning",
|
|
|
9 |
from pipeline_fill_sd_xl import StableDiffusionXLFillPipeline
|
10 |
from PIL import Image, ImageDraw
|
11 |
import numpy as np
|
12 |
+
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
13 |
+
|
14 |
+
predictor = SAM2ImagePredictor.from_pretrained("facebook/sam2.1-hiera-large")
|
15 |
+
print(predictor)
|
16 |
+
# with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
|
17 |
+
# predictor.set_image(<your_image>)
|
18 |
+
# masks, _, _ = predictor.predict(<input_prompts>)
|
19 |
|
20 |
MODELS = {
|
21 |
"RealVisXL V5.0 Lightning": "SG161222/RealVisXL_V5.0_Lightning",
|