{"record":{"id":"d1ddf9a0ff1db814","repo":"Comfy-Org/ComfyUI","slug":"seedvr2conditioning-model-object-does-not-match-e","errorCode":null,"errorMessage":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: input has no 'model' attribute (got type {type(model).__name__}).","messagePattern":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: input has no 'model' attribute \\(got type (.+?)\\)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_seedvr.py","lineNumber":39,"sourceCode":"    SEEDVR2_DTYPE_BYTES_FLOOR,\n    SEEDVR2_LAB_SCALE_MULTIPLIER,\n    SEEDVR2_LATENT_CHANNELS,\n    SEEDVR2_OOM_BACKOFF_DIVISOR,\n    SEEDVR2_WAVELET_SCALE_MULTIPLIER,\n)\n\nfrom torchvision.transforms import functional as TVF\nfrom torchvision.transforms.functional import InterpolationMode\n\n\n_SEEDVR2_INVALID_MODEL_MSG_PREFIX = \"SeedVR2Conditioning: model object does not match expected SeedVR2 structure\"\n_ATTR_MISSING = object()\n\n\ndef _resolve_seedvr2_diffusion_model(model):\n    inner = getattr(model, \"model\", _ATTR_MISSING)\n    if inner is _ATTR_MISSING:\n        raise RuntimeError(\n            f\"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: input has no 'model' attribute \"\n            f\"(got type {type(model).__name__}).\"\n        )\n    if inner is None:\n        raise RuntimeError(\n            f\"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: input.model is None \"\n            f\"(input type {type(model).__name__}).\"\n        )\n    diffusion_model = getattr(inner, \"diffusion_model\", _ATTR_MISSING)\n    if diffusion_model is _ATTR_MISSING:\n        raise RuntimeError(\n            f\"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: 'model.model' has no \"\n            f\"'diffusion_model' attribute (got type {type(inner).__name__}).\"\n        )\n    if diffusion_model is None:\n        raise RuntimeError(\n            f\"{_SEEDVR2_INVALID_MODEL_MSG_PREFIX}: 'model.model.diffusion_model' \"\n            f\"is None (model.model type {type(inner).__name__}).\"","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_seedvr.py#L21-L57","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Connect the MODEL output of a 'Load Diffusion Model' node that actually loaded SeedVR2 weights.","Check the graph/API payload: the model input must be a model object, not a string, tensor, or CLIP/VAE handle.","If calling from Python, pass the ComfyUI model wrapper (with .model.diffusion_model), not the inner network."],"exampleFix":"// before\nSeedVR2Conditioning(model=diffusion_nn_module, ...)\n// after\nSeedVR2Conditioning(model=comfy_model_patcher, ...)  # from 'Load Diffusion Model'","handlingStrategy":"type-guard","validationCode":"if not hasattr(model, 'model'):\n    raise TypeError(f\"expected a ComfyUI model wrapper, got {type(model).__name__}\")","typeGuard":"def looks_like_comfy_model(model) -> bool:\n    return hasattr(model, 'model') and hasattr(getattr(model, 'model'), 'diffusion_model')","tryCatchPattern":null,"preventionTips":["Only connect MODEL-typed outputs to SeedVR2's model input.","In API prompts, reference the Load Diffusion Model node's MODEL output, not names or tensors."],"tags":["seedvr2","model-loading","type-mismatch","workflow-wiring"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}