Comfy-Org/ComfyUI · error · ValueError
'manga' style requires a portrait aspect ratio ({allowed_man
Error message
'manga' style requires a portrait aspect ratio ({allowed_manga_ratios}) or 'auto'; got '{aspect_ratio}'. What it means
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.
Source
Thrown at comfy_api_nodes/nodes_luma.py:842
{"type":"usd","usd": $round($base + 0.003 * $refs, 4)}
)
""",
),
)
@classmethod
async def execute(
cls,
prompt: str,
model: dict,
seed: int,
) -> IO.NodeOutput:
validate_string(prompt, min_length=1, max_length=6000)
aspect_ratio = model["aspect_ratio"]
style = model["style"]
allowed_manga_ratios = {"2:3", "9:16", "1:2", "1:3"}
if style == "manga" and aspect_ratio != "auto" and aspect_ratio not in allowed_manga_ratios:
raise ValueError(
f"'manga' style requires a portrait aspect ratio "
f"({', '.join(sorted(allowed_manga_ratios))}) or 'auto'; got '{aspect_ratio}'."
)
request = Luma2GenerationRequest(
prompt=prompt,
model=model["model"],
type="image",
aspect_ratio=aspect_ratio if aspect_ratio != "auto" else None,
style=style if style != "auto" else None,
output_format="png",
web_search=model["web_search"],
image_ref=await _luma2_upload_image_refs(cls, model.get("image_ref"), max_count=9),
)
final = await _luma2_submit_and_poll(cls, request)
return IO.NodeOutput(await download_url_to_image_tensor(final.output[0].url))
class LumaImageEditNode(IO.ComfyNode):View on GitHub (pinned to 1c6d8d45b3)
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.
Defensive patterns
Strategy: validation
Validate before calling
ALLOWED_MANGA = {"2:3", "9:16", "1:2", "1:3"}
if style == "manga" and aspect_ratio != "auto" and aspect_ratio not in ALLOWED_MANGA:
aspect_ratio = "2:3" # or raise, or switch style Prevention
- 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.
When it happens
Trigger: Setting the model widget style='manga' together with aspect_ratio='16:9', '4:3', '1:1', '3:2', etc. in LumaImageNode2.
Common situations: 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.
Related errors
- 1080p is not available for vertical aspect ratios (9:16, 3:4
- Custom aspect ratio is only allowed when multiple images are
- At least one of first_image and last_image requires an input
- Maximum {max_count} reference images are allowed.
- Looping is only available with 5s duration on Ray 3.2.
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/02d671e2b8c730d1.
Report an issue: GitHub.