diff --git a/bridge/translator/inference.py b/bridge/translator/inference.py index 14dc1af..670d16a 100644 --- a/bridge/translator/inference.py +++ b/bridge/translator/inference.py @@ -36,6 +36,7 @@ WRAPPER_TO_LIGHTX2V_FIELDS: Dict[str, str] = { "fixed_area": "fixed_area", # Sekotalk-specific. "prev_frame_length": "prev_frame_length", + "f2v_process": "f2v_process", # Distillation. "denoising_step_list": "denoising_step_list", "use_31_block": "use_31_block", diff --git a/config_builder.py b/config_builder.py index 56204e5..79aa7e2 100644 --- a/config_builder.py +++ b/config_builder.py @@ -140,7 +140,7 @@ class InferenceConfigBuilder: steps_str = optional_params["denoising_steps"] if steps_str and steps_str.strip(): try: - steps_list = [int(s.strip()) for s in steps_str.split(",")] + steps_list = [float(s.strip()) for s in steps_str.split(",")] config.denoising_step_list = steps_list config.infer_steps = len(steps_list) except ValueError: @@ -153,6 +153,7 @@ class InferenceConfigBuilder: "segment_length", "prev_frame_length", "use_tiny_vae", + "f2v_process", ]: if param in optional_params: setattr(config, param, optional_params[param]) diff --git a/data_models.py b/data_models.py index 072b85b..128a800 100644 --- a/data_models.py +++ b/data_models.py @@ -53,7 +53,7 @@ class InferenceConfig: use_31_block: bool = True # Optional parameters - denoising_step_list: Optional[List[int]] = None + denoising_step_list: Optional[List[float]] = None resize_mode: str = "adaptive" fixed_area: str = "720p" segment_length: int = 81 @@ -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.""" diff --git a/nodes/config.py b/nodes/config.py index 4d85ef3..56bec47 100644 --- a/nodes/config.py +++ b/nodes/config.py @@ -171,6 +171,13 @@ class LightX2VInferenceConfig: "tooltip": "Use lightweight VAE to accelerate decoding", }, ), + "f2v_process": ( + "BOOLEAN", + { + "default": False, + "tooltip": "Use frame-to-video processing for SekoTalk", + }, + ), }, } @@ -199,6 +206,7 @@ class LightX2VInferenceConfig: segment_length=81, prev_frame_length=5, use_tiny_vae=False, + f2v_process=False, ): """Create basic inference configuration.""" builder = InferenceConfigBuilder() @@ -222,6 +230,7 @@ class LightX2VInferenceConfig: segment_length=segment_length, prev_frame_length=prev_frame_length, use_tiny_vae=use_tiny_vae, + f2v_process=f2v_process, ) return (config.to_dict(),)