[diffusion] fix: fix the issue where the qwen-edit & wan model produces incorrect output during sequence parallelism (#13922)

This commit is contained in:
Yuhao Yang
2025-11-26 15:58:23 +08:00
committed by GitHub
parent 540d6fee20
commit 5795da5e83
2 changed files with 8 additions and 4 deletions

View File

@@ -190,6 +190,7 @@ class QwenImagePipelineConfig(ImagePipelineConfig):
return latents
@dataclass
class QwenImageEditPipelineConfig(QwenImagePipelineConfig):
"""Configuration for the QwenImageEdit pipeline."""

View File

@@ -225,6 +225,13 @@ class SamplingParams:
self.num_frames = 1
self.data_type = DataType.IMAGE
else:
# NOTE: We must apply adjust_num_frames BEFORE the SP alignment logic below.
# If we apply it after, adjust_num_frames might modify the frame count
# and break the divisibility constraint (alignment) required by num_gpus.
self.num_frames = server_args.pipeline_config.adjust_num_frames(
self.num_frames
)
# Adjust number of frames based on number of GPUs for video task
use_temporal_scaling_frames = (
pipeline_config.vae_config.use_temporal_scaling_frames
@@ -275,10 +282,6 @@ class SamplingParams:
)
self.num_frames = new_num_frames
self.num_frames = server_args.pipeline_config.adjust_num_frames(
self.num_frames
)
self._set_output_file_name()
self.log(server_args=server_args)