diff --git a/src/scope/core/pipelines/reward_forcing/pipeline.py b/src/scope/core/pipelines/reward_forcing/pipeline.py index 089ce5b6..f24300ce 100644 --- a/src/scope/core/pipelines/reward_forcing/pipeline.py +++ b/src/scope/core/pipelines/reward_forcing/pipeline.py @@ -195,6 +195,14 @@ def _generate(self, **kwargs) -> torch.Tensor: if "vace_ref_images" not in kwargs: self.state.set("vace_ref_images", None) + # Clear extension mode parameters from state if not provided to prevent reuse on non-extension chunks + if "extension_mode" not in kwargs: + self.state.set("extension_mode", None) + if "first_frame_image" not in kwargs: + self.state.set("first_frame_image", None) + if "last_frame_image" not in kwargs: + self.state.set("last_frame_image", None) + if self.state.get("denoising_step_list") is None: self.state.set("denoising_step_list", DEFAULT_DENOISING_STEP_LIST) diff --git a/src/scope/core/pipelines/streamdiffusionv2/pipeline.py b/src/scope/core/pipelines/streamdiffusionv2/pipeline.py index ef8f63fc..82b54cb2 100644 --- a/src/scope/core/pipelines/streamdiffusionv2/pipeline.py +++ b/src/scope/core/pipelines/streamdiffusionv2/pipeline.py @@ -202,6 +202,14 @@ def _generate(self, **kwargs) -> torch.Tensor: if "vace_ref_images" not in kwargs: self.state.set("vace_ref_images", None) + # Clear extension mode parameters from state if not provided to prevent reuse on non-extension chunks + if "extension_mode" not in kwargs: + self.state.set("extension_mode", None) + if "first_frame_image" not in kwargs: + self.state.set("first_frame_image", None) + if "last_frame_image" not in kwargs: + self.state.set("last_frame_image", None) + if self.state.get("denoising_step_list") is None: self.state.set("denoising_step_list", DEFAULT_DENOISING_STEP_LIST)