默认模板支持配置
This commit is contained in:
@@ -83,7 +83,7 @@ class CustomPipeline(BasePipeline):
|
||||
image_width: int = 1024,
|
||||
image_height: int = 1024,
|
||||
|
||||
frame_template: str = "1080x1920/default.html",
|
||||
frame_template: Optional[str] = None,
|
||||
video_fps: int = 30,
|
||||
output_path: Optional[str] = None,
|
||||
|
||||
@@ -133,6 +133,12 @@ class CustomPipeline(BasePipeline):
|
||||
user_specified_output = output_path
|
||||
output_path = get_task_final_video_path(task_id)
|
||||
|
||||
# Determine frame template
|
||||
# Priority: explicit param > config default > hardcoded default
|
||||
if frame_template is None:
|
||||
template_config = self.core.config.get("template", {})
|
||||
frame_template = template_config.get("default_template", "1080x1920/default.html")
|
||||
|
||||
# ========== Step 0.5: Check template requirements ==========
|
||||
# Detect if template requires {{image}} parameter
|
||||
# This allows skipping the entire image generation pipeline for text-only templates
|
||||
|
||||
@@ -221,6 +221,12 @@ class StandardPipeline(BasePipeline):
|
||||
else: # comfyui
|
||||
final_voice_id = voice_id # For ComfyUI, might be None
|
||||
|
||||
# Determine frame template
|
||||
# Priority: explicit param > config default > hardcoded default
|
||||
if frame_template is None:
|
||||
template_config = self.core.config.get("template", {})
|
||||
frame_template = template_config.get("default_template", "1080x1920/default.html")
|
||||
|
||||
# Create storyboard config
|
||||
config = StoryboardConfig(
|
||||
task_id=task_id,
|
||||
@@ -238,7 +244,7 @@ class StandardPipeline(BasePipeline):
|
||||
image_width=image_width,
|
||||
image_height=image_height,
|
||||
image_workflow=image_workflow,
|
||||
frame_template=frame_template or "1080x1920/default.html",
|
||||
frame_template=frame_template,
|
||||
template_params=template_params
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user