feat: Add detailed debug logging to editor functions

This commit is contained in:
empty
2026-01-07 00:05:53 +08:00
parent 4d3c89a8f6
commit a3ab12e87c
2 changed files with 25 additions and 3 deletions

View File

@@ -456,21 +456,30 @@ async def regenerate_frame_image(
from api.dependencies import get_pixelle_video
from api.routers.quality import _style_anchors
logger.debug(f"[REGEN-IMG] Starting image regeneration for frame {frame_id}")
logger.debug(f"[REGEN-IMG] Original prompt: {prompt[:100]}...")
pixelle_video = await get_pixelle_video()
# Get style anchor prefix if available
style_prefix = ""
logger.debug(f"[REGEN-IMG] Checking style anchors for storyboard {storyboard_id}")
logger.debug(f"[REGEN-IMG] Available style anchors: {list(_style_anchors.keys())}")
if storyboard_id in _style_anchors:
style_data = _style_anchors[storyboard_id]
style_prefix = style_data.get("style_prefix", "")
if style_prefix:
logger.info(f"Applying style anchor prefix: {style_prefix[:50]}...")
logger.info(f"[REGEN-IMG] Found style anchor: {style_prefix[:80] if style_prefix else 'EMPTY'}...")
else:
logger.warning(f"[REGEN-IMG] No style anchor found for {storyboard_id}")
# Apply style prefix to prompt
final_prompt = f"{style_prefix}, {prompt}" if style_prefix else prompt
logger.info(f"[REGEN-IMG] Final prompt: {final_prompt[:120]}...")
# Use MediaService to generate image via RunningHub workflow
# Use image_flux workflow by default, or get from config
logger.debug(f"[REGEN-IMG] Calling pixelle_video.image with workflow=runninghub/image_flux.json")
result = await pixelle_video.image(
prompt=final_prompt,
media_type="image",