{"record":{"id":"249e12dc1c4567c5","repo":"Comfy-Org/ComfyUI","slug":"kling-image-o1-does-not-support-series-generation","errorCode":null,"errorMessage":"kling-image-o1 does not support series generation.","messagePattern":"kling-image-o1 does not support series generation\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_kling.py","lineNumber":1449,"sourceCode":"        seed: int = 0,\n    ) -> IO.NodeOutput:\n        _ = seed\n        if model_name == \"kling-image-o1\" and resolution == \"4K\":\n            raise ValueError(\"4K resolution is not supported for kling-image-o1 model.\")\n        prompt = normalize_omni_prompt_references(prompt)\n        validate_string(prompt, min_length=1, max_length=2500)\n        image_list: list[OmniImageParamImage] = []\n        if reference_images is not None:\n            if get_number_of_images(reference_images) > 10:\n                raise ValueError(\"The maximum number of reference images is 10.\")\n            for i in reference_images:\n                validate_image_dimensions(i, min_width=300, min_height=300)\n                validate_image_aspect_ratio(i, (1, 2.5), (2.5, 1))\n            for i in await upload_images_to_comfyapi(cls, reference_images, wait_label=\"Uploading reference image\"):\n                image_list.append(OmniImageParamImage(image=i))\n        use_series = series_amount != \"disabled\"\n        if use_series and model_name == \"kling-image-o1\":\n            raise ValueError(\"kling-image-o1 does not support series generation.\")\n        response = await sync_op(\n            cls,\n            ApiEndpoint(path=\"/proxy/kling/v1/images/omni-image\", method=\"POST\"),\n            response_model=TaskStatusResponse,\n            data=OmniProImageRequest(\n                model_name=model_name,\n                prompt=prompt,\n                resolution=resolution.lower(),\n                aspect_ratio=aspect_ratio,\n                image_list=image_list if image_list else None,\n                result_type=\"series\" if use_series else None,\n                series_amount=int(series_amount) if use_series else None,\n            ),\n        )\n        if response.code:\n            raise RuntimeError(\n                f\"Kling request failed. Code: {response.code}, Message: {response.message}, Data: {response.data}\"\n            )","sourceCodeStart":1431,"sourceCodeEnd":1467,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_kling.py#L1431-L1467","documentation":"Raised by OmniProImageNode.execute when series generation is enabled (series_amount != 'disabled') and model_name is 'kling-image-o1'. The o1 image model has no series (multi-image story set) output, so result_type='series' requests are rejected client-side before the API call.","triggerScenarios":"model_name='kling-image-o1' with the series_amount combo set to anything other than 'disabled' (e.g. '4').","commonSituations":"A workflow built for kling-image-2 series generation is switched to o1 to try the newer model, leaving series_amount populated.","solutions":["Set series_amount to 'disabled' when using kling-image-o1","Keep series generation on the non-o1 kling-image models","If multiple o1 variations are needed, loop the node with different seeds/prompts"],"exampleFix":"// before\nmodel_name = \"kling-image-o1\"\nseries_amount = \"4\"\n\n// after\nmodel_name = \"kling-image-o1\"\nseries_amount = \"disabled\"","handlingStrategy":"validation","validationCode":"def o1_series_ok(model_name: str, series_amount: str) -> bool:\n    return model_name != \"kling-image-o1\" or series_amount == \"disabled\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reset series_amount to 'disabled' when switching to kling-image-o1","For multiple o1 outputs, loop the node with varied seeds instead of series mode"],"tags":["kling","image","series","model-validation","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}