MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _make_t2v_config

Function _make_t2v_config

src/services/generation_handler.py:718–739  ·  view source on GitHub ↗
(
    model_key: str,
    aspect_ratio: str,
    *,
    use_v2_model_config: bool = False,
    allow_tier_upgrade: bool = True,
    upsample: Optional[Dict[str, str]] = None,
)

Source from the content-addressed store, hash-verified

716
717
718def _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
742def _make_i2v_config(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected