Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def process_image(prompt, image, num_variations):
|
|
64 |
print(f" {i+1}: {p}")
|
65 |
|
66 |
# Step 3: Prepare image + canny
|
67 |
-
image = image.resize((
|
68 |
canny_map = generate_canny_map(image)
|
69 |
|
70 |
# Step 4: Generate Images
|
@@ -79,6 +79,9 @@ def process_image(prompt, image, num_variations):
|
|
79 |
strength=0.5,
|
80 |
guidance_scale=7.5
|
81 |
)
|
|
|
|
|
|
|
82 |
outputs.append(result.images[0])
|
83 |
|
84 |
return outputs, scene_plan, canny_map
|
|
|
64 |
print(f" {i+1}: {p}")
|
65 |
|
66 |
# Step 3: Prepare image + canny
|
67 |
+
image = image.resize((1024, 1024)).convert("RGB")
|
68 |
canny_map = generate_canny_map(image)
|
69 |
|
70 |
# Step 4: Generate Images
|
|
|
79 |
strength=0.5,
|
80 |
guidance_scale=7.5
|
81 |
)
|
82 |
+
if result is None or not hasattr(result, "images"):
|
83 |
+
raise ValueError("⚠️ SDXL pipeline failed to return a valid image")
|
84 |
+
|
85 |
outputs.append(result.images[0])
|
86 |
|
87 |
return outputs, scene_plan, canny_map
|