[diffusion] CI: minor refactor CI for less code duplication (#13905)
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user