{"record":{"id":"02d671e2b8c730d1","repo":"Comfy-Org/ComfyUI","slug":"manga-style-requires-a-portrait-aspect-ratio-a","errorCode":null,"errorMessage":"'manga' style requires a portrait aspect ratio ({allowed_manga_ratios}) or 'auto'; got '{aspect_ratio}'.","messagePattern":"'manga' style requires a portrait aspect ratio \\((.+?)\\) or 'auto'; got '(.+?)'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_luma.py","lineNumber":842,"sourceCode":"                  {\"type\":\"usd\",\"usd\": $round($base + 0.003 * $refs, 4)}\n                )\n                \"\"\",\n            ),\n        )\n\n    @classmethod\n    async def execute(\n        cls,\n        prompt: str,\n        model: dict,\n        seed: int,\n    ) -> IO.NodeOutput:\n        validate_string(prompt, min_length=1, max_length=6000)\n        aspect_ratio = model[\"aspect_ratio\"]\n        style = model[\"style\"]\n        allowed_manga_ratios = {\"2:3\", \"9:16\", \"1:2\", \"1:3\"}\n        if style == \"manga\" and aspect_ratio != \"auto\" and aspect_ratio not in allowed_manga_ratios:\n            raise ValueError(\n                f\"'manga' style requires a portrait aspect ratio \"\n                f\"({', '.join(sorted(allowed_manga_ratios))}) or 'auto'; got '{aspect_ratio}'.\"\n            )\n        request = Luma2GenerationRequest(\n            prompt=prompt,\n            model=model[\"model\"],\n            type=\"image\",\n            aspect_ratio=aspect_ratio if aspect_ratio != \"auto\" else None,\n            style=style if style != \"auto\" else None,\n            output_format=\"png\",\n            web_search=model[\"web_search\"],\n            image_ref=await _luma2_upload_image_refs(cls, model.get(\"image_ref\"), max_count=9),\n        )\n        final = await _luma2_submit_and_poll(cls, request)\n        return IO.NodeOutput(await download_url_to_image_tensor(final.output[0].url))\n\n\nclass LumaImageEditNode(IO.ComfyNode):","sourceCodeStart":824,"sourceCodeEnd":860,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_luma.py#L824-L860","documentation":"Raised by the Luma 2 image node (comfy_api_nodes/nodes_luma.py:842) when style is 'manga' but the chosen aspect_ratio is neither 'auto' nor one of the portrait ratios {1:2, 1:3, 2:3, 9:16}. The manga style upstream only renders portrait compositions, so landscape/square ratios are rejected client-side.","triggerScenarios":"Setting the model widget style='manga' together with aspect_ratio='16:9', '4:3', '1:1', '3:2', etc. in LumaImageNode2.","commonSituations":"User switches style to manga while keeping a landscape ratio from a previous render; workflows shared with different default widget values; UI defaulting to 16:9.","solutions":["Set aspect_ratio to a portrait ratio: 2:3, 9:16, 1:2, or 1:3.","Or set aspect_ratio to 'auto' and let the model pick a portrait ratio.","Or switch style away from 'manga' if landscape output is required."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"ALLOWED_MANGA = {\"2:3\", \"9:16\", \"1:2\", \"1:3\"}\nif style == \"manga\" and aspect_ratio != \"auto\" and aspect_ratio not in ALLOWED_MANGA:\n    aspect_ratio = \"2:3\"  # or raise, or switch style","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When switching style to manga, immediately check the aspect_ratio widget is portrait or 'auto'.","Pin both widget values together in saved templates so they can't drift."],"tags":["luma","manga","aspect-ratio","input-validation","comfy-api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}