Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,6 @@ def generate_canny_map(image: Image.Image) -> Image.Image:
|
|
48 |
# 🎨 Image Generation Function
|
49 |
# ----------------------------
|
50 |
|
51 |
-
|
52 |
def process_image(prompt, image, num_variations):
|
53 |
try:
|
54 |
print("🧠 Prompt received:", prompt)
|
@@ -58,7 +57,6 @@ def process_image(prompt, image, num_variations):
|
|
58 |
print("🧠 Scene plan extracted:", scene_plan)
|
59 |
|
60 |
# Step 2: Generate prompt variations from GPT
|
61 |
-
from utils.planner import generate_prompt_variations_from_scene
|
62 |
prompt_list = generate_prompt_variations_from_scene(scene_plan, prompt, num_variations)
|
63 |
|
64 |
print("🧠 Enriched Prompts:")
|
@@ -77,7 +75,7 @@ def process_image(prompt, image, num_variations):
|
|
77 |
result = pipe(
|
78 |
prompt=enriched_prompt,
|
79 |
image=image,
|
80 |
-
|
81 |
num_inference_steps=40,
|
82 |
strength=0.5,
|
83 |
guidance_scale=7.5
|
|
|
48 |
# 🎨 Image Generation Function
|
49 |
# ----------------------------
|
50 |
|
|
|
51 |
def process_image(prompt, image, num_variations):
|
52 |
try:
|
53 |
print("🧠 Prompt received:", prompt)
|
|
|
57 |
print("🧠 Scene plan extracted:", scene_plan)
|
58 |
|
59 |
# Step 2: Generate prompt variations from GPT
|
|
|
60 |
prompt_list = generate_prompt_variations_from_scene(scene_plan, prompt, num_variations)
|
61 |
|
62 |
print("🧠 Enriched Prompts:")
|
|
|
75 |
result = pipe(
|
76 |
prompt=enriched_prompt,
|
77 |
image=image,
|
78 |
+
controlnet_conditioning_image=canny_map, # ✅ key fix here!
|
79 |
num_inference_steps=40,
|
80 |
strength=0.5,
|
81 |
guidance_scale=7.5
|