Comfy-Org/ComfyUI · warning · ValueError
Krea 2 accepts at most 10 image_style_references in one gene
Error message
Krea 2 accepts at most 10 image_style_references in one generation.
What it means
Client-side ValueError from Krea2StyleReferenceNode: the accumulated style-reference chain already has 10 entries, so appending one more would exceed Krea 2's per-generation limit of 10 image_style_references. The check uses >= 10 before appending, capping the chain at 10 total.
Source
Thrown at comfy_api_nodes/nodes_krea.py:278
],
outputs=[IO.Custom(KreaIO.STYLE_REF).Output(display_name="style_reference")],
hidden=[
IO.Hidden.auth_token_comfy_org,
IO.Hidden.api_key_comfy_org,
IO.Hidden.unique_id,
],
)
@classmethod
async def execute(
cls,
image: Input.Image,
strength: float,
style_reference: list[dict] | None = None,
) -> IO.NodeOutput:
chain: list[dict] = list(style_reference) if style_reference else []
if len(chain) >= 10:
raise ValueError("Krea 2 accepts at most 10 image_style_references in one generation.")
url = await _upload_image_to_krea_assets(cls, image)
chain.append({"url": url, "strength": float(strength)})
return IO.NodeOutput(chain)
class KreaExtension(ComfyExtension):
@override
async def get_node_list(self) -> list[type[IO.ComfyNode]]:
return [
Krea2ImageNode,
Krea2StyleReferenceNode,
]
async def comfy_entrypoint() -> KreaExtension:
return KreaExtension()
View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Stop at 10 style-reference nodes; remove or bypass the 11th.
- Rebalance: delete low-strength references and re-add only the ones that matter.
- Route additional styling through a moodboard (moodboard_id) which is separate from the reference cap.
Defensive patterns
Strategy: validation
Validate before calling
chain = list(style_reference) if style_reference else []
if len(chain) >= 10:
raise ValueError("Style-reference chain is full (10); remove one before adding another") Type guard
def can_append_style_ref(chain: list[dict]) -> bool:
return len(chain) < 10 Prevention
- Treat 10 as a hard budget when designing style chains.
- Display the running count in custom UIs if you build dynamic chains.
- Route overflow styling to a moodboard.
When it happens
Trigger: Chaining a Krea2StyleReferenceNode whose style_reference input already carries 10 entries — i.e. an 11th reference is being added to the list passed between these nodes.
Common situations: Autogrow chains of style-reference nodes built by duplicating nodes in the graph; feeding a previously-completed 10-entry chain back into another reference node to add 'just one more'.
Related errors
- Krea 2 accepts at most 10 image_style_references; received {
- Unknown Krea 2 model: {model_choice!r}
- moodboard_id must be a UUID (received {mb_id!r}); copy it fr
- Total storyboard duration ({duration}s) must be between 3 an
- Durations over 10s require a 720p or 1080p resolution and 24
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/9c4fea1215400a87.
Report an issue: GitHub.