feat: add f2v

This commit is contained in:
gaclove
2025-12-11 11:12:46 +00:00
parent 12889efc55
commit 56a89b18c6
4 changed files with 14 additions and 0 deletions
+1
View File
@@ -317,6 +317,7 @@ class ModularConfigManager:
"use_31_block": "use_31_block",
"prev_frame_length": "prev_frame_length",
"fixed_area": "fixed_area",
"f2v_process": "f2v_process",
}
self._update_from_config(updates, config, basic_mappings)
+4
View File
@@ -166,6 +166,9 @@ class InferenceConfigBuilder:
if "prev_frame_length" in optional_params:
config.prev_frame_length = optional_params["prev_frame_length"]
if "f2v_process" in optional_params:
config.f2v_process = optional_params["f2v_process"]
class TalkObjectConfigBuilder:
"""Builder for talk object configurations."""
@@ -338,6 +341,7 @@ class ConfigBuilder:
"adapter_quant_scheme": getattr(config, "adapter_quant_scheme", None),
"adapter_quantized": getattr(config, "adapter_quantized", False),
"feature_caching": getattr(config, "feature_caching", None),
"f2v_process": getattr(config, "f2v_process", False),
}
config_str = json.dumps(relevant_configs, sort_keys=True)
+1
View File
@@ -65,6 +65,7 @@ class InferenceConfig:
negative_prompt: str = ""
image_path: Optional[str] = None
audio_path: Optional[str] = None
f2v_process: bool = False
def to_dict(self) -> Dict[str, Any]:
"""Convert to dictionary, excluding None values."""
+8
View File
@@ -199,6 +199,13 @@ class LightX2VInferenceConfig:
"tooltip": "Use lightweight VAE to accelerate decoding",
},
),
"f2v_process": (
"BOOLEAN",
{
"default": False,
"tooltip": "Use f2v process",
},
),
},
}
@@ -227,6 +234,7 @@ class LightX2VInferenceConfig:
segment_length=81,
prev_frame_length=5,
use_tiny_vae=False,
f2v_process=False,
):
"""Create basic inference configuration."""
builder = InferenceConfigBuilder()