{"record":{"id":"7d550c63c57cb2b3","repo":"calesthio/OpenMontage","slug":"variant-supports-only-480p-or-720p-resolution","errorCode":null,"errorMessage":"{variant} supports only 480p or 720p resolution","messagePattern":"(.+?) supports only 480p or 720p resolution","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/seedance_ark.py","lineNumber":706,"sourceCode":"        operation = str(inputs.get(\"operation\", \"text_to_video\"))\n        if operation not in {\n            \"text_to_video\",\n            \"image_to_video\",\n            \"reference_to_video\",\n        }:\n            raise ValueError(\n                \"operation must be text_to_video, image_to_video, or reference_to_video\"\n            )\n\n        model, variant = self._resolve_model(inputs)\n        resolution = str(inputs.get(\"resolution\", \"720p\")).lower()\n        if resolution not in self.OUTPUT_DIMENSIONS:\n            raise ValueError(\"resolution must be 480p, 720p, 1080p, or 4k\")\n        if variant in {\"2.5\", \"fast\", \"mini\"} and resolution not in {\n            \"480p\",\n            \"720p\",\n        }:\n            raise ValueError(f\"{variant} supports only 480p or 720p resolution\")\n\n        ratio = str(inputs.get(\"aspect_ratio\", \"16:9\"))\n        valid_ratios = {\n            \"adaptive\",\n            \"21:9\",\n            \"16:9\",\n            \"4:3\",\n            \"1:1\",\n            \"3:4\",\n            \"9:16\",\n        }\n        if ratio not in valid_ratios:\n            raise ValueError(\n                \"aspect_ratio must be adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, or 9:16\"\n            )\n\n        max_duration = 30 if variant == \"2.5\" else 15\n        duration = self._normalize_duration(inputs.get(\"duration\", 5), max_duration)","sourceCodeStart":688,"sourceCodeEnd":724,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/seedance_ark.py#L688-L724","documentation":"Variant-specific resolution gate in `_build_payload`: when the resolved model variant is '2.5', 'fast', or 'mini', `resolution` must be 480p or 720p — those lightweight Seedance variants do not support 1080p or 4k outputs. The generic resolution check already passed, so this fires only for a valid resolution attached to the wrong model variant.","triggerScenarios":"Combining e.g. seedance-fast/mini (or a 2.5 model) with `resolution: '1080p'` or '4k'; reusing a 1080p config block after switching `model` to a fast variant.","commonSituations":"Batch pipelines with a shared resolution setting across models; users switching models for cost/speed mid-project without revisiting resolution; assuming all variants share the flagship model's resolution envelope.","solutions":["Lower resolution to '480p' or '720p' for fast/mini/2.5 variants","Or switch `model` to a flagship variant that supports 1080p/4k","Derive resolution from the variant programmatically instead of hardcoding"],"exampleFix":"# before\ninputs = {\"model\": \"seedance-2-5-lite\", \"resolution\": \"1080p\", \"prompt\": \"...\"}\n# after\ninputs = {\"model\": \"seedance-2-5-lite\", \"resolution\": \"720p\", \"prompt\": \"...\"}","handlingStrategy":"validation","validationCode":"LIMITED = {\"2.5\", \"fast\", \"mini\"}\nif variant in LIMITED and resolution not in {\"480p\", \"720p\"}:\n    raise ValueError(f\"{variant} supports only 480p/720p — got {resolution}\")","typeGuard":"def resolution_allowed_for_variant(variant: str, resolution: str) -> bool:\n    return resolution.lower() in ({\"480p\", \"720p\"} if variant in {\"2.5\", \"fast\", \"mini\"} else {\"480p\", \"720p\", \"1080p\", \"4k\"})","tryCatchPattern":null,"preventionTips":["Derive resolution from the chosen model/variant via a lookup table instead of one global config value","When switching models for cost, re-run dry_run — it exercises this exact validation for free"],"tags":["seedance","ark","input-validation","resolution","model-variant"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}