Comfy-Org/ComfyUI · warning · ValueError
Unknown Krea 2 model: {model_choice!r}
Error message
Unknown Krea 2 model: {model_choice!r} What it means
Client-side ValueError thrown when the Krea 2 image node's model dict contains a 'model' key not present in the _MODEL_ENDPOINTS mapping. The node cannot map the choice to a proxy endpoint path, so it refuses before any request is made.
Source
Thrown at comfy_api_nodes/nodes_krea.py:184
{"type":"usd","usd": $usd}
)
""",
),
)
@classmethod
async def execute(
cls,
prompt: str,
model: dict,
seed: int,
) -> IO.NodeOutput:
validate_string(prompt, strip_whitespace=False, min_length=1)
model_choice = model["model"]
endpoint_path = _MODEL_ENDPOINTS.get(model_choice)
if endpoint_path is None:
raise ValueError(f"Unknown Krea 2 model: {model_choice!r}")
moodboards: list[KreaMoodboard] | None = None
mb_id = (model.get("moodboard_id") or "").strip()
if mb_id:
if not _UUID_RE.match(mb_id):
raise ValueError(f"moodboard_id must be a UUID (received {mb_id!r}); copy it from the Krea website.")
mb_strength = model.get("moodboard_strength")
moodboards = [KreaMoodboard(id=mb_id, strength=0.35 if mb_strength is None else float(mb_strength))]
style_reference = model.get("style_reference")
image_style_references: list[KreaImageStyleReference] | None = None
if style_reference:
if len(style_reference) > 10:
raise ValueError(f"Krea 2 accepts at most 10 image_style_references; received {len(style_reference)}.")
image_style_references = [
KreaImageStyleReference(url=ref["url"], strength=float(ref["strength"])) for ref in style_reference
]
initial = await sync_op(View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Re-select the model in the Krea 2 node's dropdown and re-save the workflow so the widget value matches current options.
- Update comfy_api_nodes to the latest version so _MODEL_ENDPOINTS covers the model name in the workflow.
- If the model is genuinely new/missing, open an issue to add it to _MODEL_ENDPOINTS.
Example fix
// before
model = {"model": "krea-2-preview-old-name", ...}
// after
model = {"model": "krea-2-pro", ...} # a key present in _MODEL_ENDPOINTS Defensive patterns
Strategy: type-guard
Validate before calling
from comfy_api_nodes.nodes_krea import _MODEL_ENDPOINTS
if model["model"] not in _MODEL_ENDPOINTS:
raise ValueError(f"Pick one of {sorted(_MODEL_ENDPOINTS)}") Type guard
def is_known_krea_model(model: dict) -> bool:
return model.get("model") in _MODEL_ENDPOINTS Prevention
- Re-select combo widgets after updating comfy_api_nodes.
- Prefer re-picking values in the UI over hand-editing workflow JSON.
- Pin node-pack versions for archived workflows.
When it happens
Trigger: Executing Krea2ImageNode with model['model'] set to a stale/typo'd value — e.g. a workflow saved with an older widget value after the node's model list changed, or a workflow hand-edited so the combo value no longer matches any _MODEL_ENDPOINTS key.
Common situations: Loading old workflows after a comfy_api_nodes update renamed Krea model identifiers; frontend combo and backend mapping out of sync after a partial update; serialized workflow JSON edited manually.
Related errors
- moodboard_id must be a UUID (received {mb_id!r}); copy it fr
- Krea 2 accepts at most 10 image_style_references; received {
- Krea 2 accepts at most 10 image_style_references in one gene
- 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/2c03d74cae1cc485.
Report an issue: GitHub.