修复视频尺寸传参未生效的问题

This commit is contained in:
puke
2025-11-20 20:09:43 +08:00
parent 04f0754335
commit 7f904f6b19
10 changed files with 123 additions and 63 deletions

View File

@@ -187,7 +187,7 @@ class FrameProcessor:
# Determine media type based on workflow
# video_ prefix in workflow name indicates video generation
workflow_name = config.image_workflow or ""
workflow_name = config.media_workflow or ""
is_video_workflow = "video_" in workflow_name.lower()
media_type = "video" if is_video_workflow else "image"
@@ -196,10 +196,10 @@ class FrameProcessor:
# Call Media generation (with optional preset)
media_result = await self.core.media(
prompt=frame.image_prompt,
workflow=config.image_workflow, # Pass workflow from config (None = use default)
workflow=config.media_workflow, # Pass workflow from config (None = use default)
media_type=media_type,
width=config.image_width,
height=config.image_height
width=config.media_width,
height=config.media_height
)
# Store media type

View File

@@ -380,9 +380,9 @@ class PersistenceService:
"tts_workflow": config.tts_workflow,
"tts_speed": config.tts_speed,
"ref_audio": config.ref_audio,
"image_width": config.image_width,
"image_height": config.image_height,
"image_workflow": config.image_workflow,
"media_width": config.media_width,
"media_height": config.media_height,
"media_workflow": config.media_workflow,
"frame_template": config.frame_template,
"template_params": config.template_params,
}
@@ -402,9 +402,9 @@ class PersistenceService:
tts_workflow=data.get("tts_workflow"),
tts_speed=data.get("tts_speed"),
ref_audio=data.get("ref_audio"),
image_width=data.get("image_width", 1024),
image_height=data.get("image_height", 1024),
image_workflow=data.get("image_workflow"),
media_width=data.get("media_width", data.get("image_width", 1024)), # Backward compatibility
media_height=data.get("media_height", data.get("image_height", 1024)), # Backward compatibility
media_workflow=data.get("media_workflow", data.get("image_workflow")), # Backward compatibility
frame_template=data.get("frame_template", "1080x1920/default.html"),
template_params=data.get("template_params"),
)