Comfy-Org/ComfyUI · warning · ValueError

moodboard_id must be a UUID (received {mb_id!r}); copy it fr

Error message

moodboard_id must be a UUID (received {mb_id!r}); copy it from the Krea website.

What it means

Client-side ValueError from the Krea 2 node: a moodboard_id was supplied but does not match the UUID regex. Krea moodboard ids must be UUIDs copied from the Krea website; the node validates the shape locally before spending an API call.

Source

Thrown at comfy_api_nodes/nodes_krea.py:190

    @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(
            cls,
            ApiEndpoint(path=endpoint_path, method="POST"),
            response_model=KreaJob,
            data=KreaGenerateImageRequest(
                prompt=prompt,
                aspect_ratio=model["aspect_ratio"],

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Open the moodboard on krea.ai and copy the raw UUID from its details/share info.
  2. Paste only the UUID (e.g. 3f2b...-... form), no URL prefix, quotes, or trailing spaces — the node strips outer whitespace already.
  3. Leave moodboard_id empty if you don't want moodboard conditioning; moodboards are optional.

Example fix

// before
model = {"model": "...", "moodboard_id": "https://krea.ai/moodboards/my-board"}
// after
model = {"model": "...", "moodboard_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"}
Defensive patterns

Strategy: validation

Validate before calling

import re
_UUID_RE = re.compile(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", re.I)
mb = (model.get("moodboard_id") or "").strip()
assert not mb or _UUID_RE.match(mb), "moodboard_id must be a bare UUID from krea.ai"

Type guard

def is_valid_moodboard_id(value: str) -> bool:
    return bool(_UUID_RE.match((value or "").strip()))

Prevention

When it happens

Trigger: model['moodboard_id'] set to a non-UUID string — pasted URL instead of the bare id, an id with surrounding whitespace/quotes, a Krea moodboard slug/name, or an empty-ish placeholder like 'xxx'.

Common situations: User pastes the moodboard's share URL (https://krea.ai/...) rather than the UUID; copies the moodboard title; the field is filled by an upstream node emitting arbitrary text.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/828cee1bf4ebda5d. Report an issue: GitHub.