Comfy-Org/ComfyUI · error · RuntimeError

SeedVR2Conditioning: model object does not match expected Se

Error message

SeedVR2Conditioning: model object does not match expected SeedVR2 structure: input has no 'model' attribute (got type {type(model).__name__}).

What it means

Raised by the SeedVR2 conditioning resolver when the object passed as model has no 'model' attribute (detected via a sentinel to distinguish 'missing' from 'None'). SeedVR2 nodes expect a ComfyUI ModelPatcher-like wrapper whose .model.diffusion_model chain leads to the SeedVR2 network; anything else is structurally incompatible.

Source

Thrown at comfy_extras/nodes_seedvr.py:39

    SEEDVR2_DTYPE_BYTES_FLOOR,
    SEEDVR2_LAB_SCALE_MULTIPLIER,
    SEEDVR2_LATENT_CHANNELS,
    SEEDVR2_OOM_BACKOFF_DIVISOR,
    SEEDVR2_WAVELET_SCALE_MULTIPLIER,
)

from torchvision.transforms import functional as TVF
from torchvision.transforms.functional import InterpolationMode


_SEEDVR2_INVALID_MODEL_MSG_PREFIX = "SeedVR2Conditioning: model object does not match expected SeedVR2 structure"
_ATTR_MISSING = object()


def _resolve_seedvr2_diffusion_model(model):
    inner = getattr(model, "model", _ATTR_MISSING)
    if inner is _ATTR_MISSING:
        raise RuntimeError(
            f"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: input has no 'model' attribute "
            f"(got type {type(model).__name__})."
        )
    if inner is None:
        raise RuntimeError(
            f"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: input.model is None "
            f"(input type {type(model).__name__})."
        )
    diffusion_model = getattr(inner, "diffusion_model", _ATTR_MISSING)
    if diffusion_model is _ATTR_MISSING:
        raise RuntimeError(
            f"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: 'model.model' has no "
            f"'diffusion_model' attribute (got type {type(inner).__name__})."
        )
    if diffusion_model is None:
        raise RuntimeError(
            f"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: 'model.model.diffusion_model' "
            f"is None (model.model type {type(inner).__name__})."

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Connect the MODEL output of a 'Load Diffusion Model' node that actually loaded SeedVR2 weights.
  2. Check the graph/API payload: the model input must be a model object, not a string, tensor, or CLIP/VAE handle.
  3. If calling from Python, pass the ComfyUI model wrapper (with .model.diffusion_model), not the inner network.

Example fix

// before
SeedVR2Conditioning(model=diffusion_nn_module, ...)
// after
SeedVR2Conditioning(model=comfy_model_patcher, ...)  # from 'Load Diffusion Model'
Defensive patterns

Strategy: type-guard

Validate before calling

if not hasattr(model, 'model'):
    raise TypeError(f"expected a ComfyUI model wrapper, got {type(model).__name__}")

Type guard

def looks_like_comfy_model(model) -> bool:
    return hasattr(model, 'model') and hasattr(getattr(model, 'model'), 'diffusion_model')

Prevention

When it happens

Trigger: Connecting a non-model output (tensor, CLIP, VAE, dict, plain module) to the SeedVR2 node's model input; passing an unwrapped diffusion module from custom code.

Common situations: Wiring mistakes in the graph (wrong output dragged into the model socket); API prompts putting a checkpoint name string where a loaded model object belongs; custom pipelines handing the node the raw nn.Module.

Related errors


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