{"record":{"id":"71a164059e3d96c3","repo":"Comfy-Org/ComfyUI","slug":"kling-video-o1-does-not-support-4k-resolution","errorCode":null,"errorMessage":"kling-video-o1 does not support 4k resolution.","messagePattern":"kling-video-o1 does not support 4k resolution\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_kling.py","lineNumber":705,"sourceCode":"    async def execute(\n        cls,\n        model_name: str,\n        prompt: str,\n        aspect_ratio: str,\n        duration: int,\n        resolution: str = \"1080p\",\n        storyboards: dict | None = None,\n        generate_audio: bool = False,\n        seed: int = 0,\n    ) -> IO.NodeOutput:\n        _ = seed\n        if model_name == \"kling-video-o1\":\n            if duration not in (5, 10):\n                raise ValueError(\"kling-video-o1 only supports durations of 5 or 10 seconds.\")\n            if generate_audio:\n                raise ValueError(\"kling-video-o1 does not support audio generation.\")\n            if resolution == \"4k\":\n                raise ValueError(\"kling-video-o1 does not support 4k resolution.\")\n        stories_enabled = storyboards is not None and storyboards[\"storyboards\"] != \"disabled\"\n        if stories_enabled and model_name == \"kling-video-o1\":\n            raise ValueError(\"kling-video-o1 does not support storyboards.\")\n        validate_string(prompt, strip_whitespace=True, min_length=0 if stories_enabled else 1, max_length=2500)\n\n        multi_shot = None\n        multi_prompt_list = None\n        if stories_enabled:\n            count = int(storyboards[\"storyboards\"].split()[0])\n            multi_shot = True\n            multi_prompt_list = []\n            for i in range(1, count + 1):\n                sb_prompt = storyboards[f\"storyboard_{i}_prompt\"]\n                sb_duration = storyboards[f\"storyboard_{i}_duration\"]\n                validate_string(sb_prompt, field_name=f\"storyboard_{i}_prompt\", min_length=1, max_length=512)\n                multi_prompt_list.append(\n                    MultiPromptEntry(\n                        index=i,","sourceCodeStart":687,"sourceCodeEnd":723,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_kling.py#L687-L723","documentation":"Client-side capability guard: kling-video-o1 does not support 4k resolution, so resolution == '4k' with that model raises before the request. The node maps 4k->mode '4k', 1080p->'pro', else 'std'; the guard fires before that mapping.","triggerScenarios":"Model=kling-video-o1 with resolution='4k' selected; workflows that previously used kling-v2-master-4k switched to o1 keeping 4k; programmatic calls passing resolution='4k'.","commonSituations":"Changing the model dropdown but leaving resolution at 4k; assuming all current Kling tiers support 4k.","solutions":["Select 1080p (or another supported resolution) for kling-video-o1","If 4k output is mandatory, use the dedicated 4k-capable Kling model","Upsample the 1080p output with an upscaler node instead"],"exampleFix":"// before\nmodel_name = \"kling-video-o1\"; resolution = \"4k\"\n\n// after\nmodel_name = \"kling-video-o1\"; resolution = \"1080p\"","handlingStrategy":"validation","validationCode":"def o1_resolution_ok(model_name: str, resolution: str) -> bool:\n    return model_name != \"kling-video-o1\" or resolution != \"4k\"\n\nassert o1_resolution_ok(model_name, resolution)","typeGuard":"def resolution_supported(model_name: str, resolution: str) -> bool:\n    return not (model_name == \"kling-video-o1\" and resolution == \"4k\")","tryCatchPattern":"try:\n    out = await kling_t2v_node(model_name=model, resolution=\"4k\", ...)\nexcept ValueError as e:\n    if \"does not support 4k\" in str(e):\n        out = await kling_t2v_node(model_name=model, resolution=\"1080p\", ...)\n    else:\n        raise","preventionTips":["Pair resolution choices with the model's tier (o1 tops out at 1080p/pro)","Chain an upscaler node when you need higher-than-native output"],"tags":["kling","model-constraints","resolution","validation","pre-flight"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}