(
model_key: str,
aspect_ratio: str,
*,
use_v2_model_config: bool = False,
allow_tier_upgrade: bool = True,
upsample: Optional[Dict[str, str]] = None,
)
| 716 | |
| 717 | |
| 718 | def _make_t2v_config( |
| 719 | model_key: str, |
| 720 | aspect_ratio: str, |
| 721 | *, |
| 722 | use_v2_model_config: bool = False, |
| 723 | allow_tier_upgrade: bool = True, |
| 724 | upsample: Optional[Dict[str, str]] = None, |
| 725 | ) -> Dict[str, Any]: |
| 726 | cfg: Dict[str, Any] = { |
| 727 | "type": "video", |
| 728 | "video_type": "t2v", |
| 729 | "model_key": model_key, |
| 730 | "aspect_ratio": aspect_ratio, |
| 731 | "supports_images": False, |
| 732 | } |
| 733 | if use_v2_model_config: |
| 734 | cfg["use_v2_model_config"] = True |
| 735 | if not allow_tier_upgrade: |
| 736 | cfg["allow_tier_upgrade"] = False |
| 737 | if upsample: |
| 738 | cfg["upsample"] = upsample |
| 739 | return cfg |
| 740 | |
| 741 | |
| 742 | def _make_i2v_config( |
no outgoing calls
no test coverage detected