Spaces:
Running
on
Zero
Running
on
Zero
move
Browse files
app.py
CHANGED
|
@@ -51,6 +51,7 @@ pipe = StableDiffusionXLFillPipeline.from_pretrained(
|
|
| 51 |
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)
|
| 52 |
pipe.to("cuda")
|
| 53 |
print(pipe)
|
|
|
|
| 54 |
|
| 55 |
def load_default_pipeline():
|
| 56 |
global pipe
|
|
@@ -67,7 +68,6 @@ def predict_masks(image, points):
|
|
| 67 |
"""Predict a single mask from the image based on selected points."""
|
| 68 |
if not points:
|
| 69 |
return image # Return the original image if no points are selected
|
| 70 |
-
PREDICTOR = SAM2ImagePredictor.from_pretrained(SAM_MODEL, device=DEVICE)
|
| 71 |
|
| 72 |
# Debugging: Print the structure of points
|
| 73 |
print(f"Points structure: {points}")
|
|
|
|
| 51 |
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)
|
| 52 |
pipe.to("cuda")
|
| 53 |
print(pipe)
|
| 54 |
+
PREDICTOR = SAM2ImagePredictor.from_pretrained(SAM_MODEL, device=DEVICE)
|
| 55 |
|
| 56 |
def load_default_pipeline():
|
| 57 |
global pipe
|
|
|
|
| 68 |
"""Predict a single mask from the image based on selected points."""
|
| 69 |
if not points:
|
| 70 |
return image # Return the original image if no points are selected
|
|
|
|
| 71 |
|
| 72 |
# Debugging: Print the structure of points
|
| 73 |
print(f"Points structure: {points}")
|