[diffusion] CI: minor refactor CI for less code duplication (#13905)

This commit is contained in:
Mick
2025-11-25 18:44:11 +08:00
committed by GitHub
parent 59464dbf15
commit 6f094deff0
11 changed files with 516 additions and 597 deletions
@@ -105,7 +105,7 @@ def shard_rotary_emb_for_sp(emb):
class PipelineConfig:
"""The base configuration class for a generation pipeline."""
task_type: ModelTaskType
task_type: ModelTaskType = ModelTaskType.I2I
model_path: str = ""
pipeline_config_path: str | None = None
@@ -318,6 +318,12 @@ class SamplingParams:
return sampling_params
def output_size_str(self) -> str:
return f"{self.width}x{self.height}"
def seconds(self) -> float:
return self.num_frames / self.fps
@staticmethod
def add_cli_args(parser: Any) -> Any:
"""Add CLI arguments for SamplingParam fields"""