{"record":{"id":"c651b83d7e1b8879","repo":"Comfy-Org/ComfyUI","slug":"seedvr2conditioning-model-object-does-not-match-e-c651b8","errorCode":null,"errorMessage":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: 'model.model' has no 'diffusion_model' attribute (got type {type(inner).__name__}).","messagePattern":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: 'model\\.model' has no 'diffusion_model' attribute \\(got type (.+?)\\)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_seedvr.py","lineNumber":50,"sourceCode":"_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__}).\"\n        )\n    return diffusion_model\n\n\ndef div_pad(image, factor):\n    height_factor, width_factor = factor\n    height, width = image.shape[-2:]\n\n    pad_height = (height_factor - (height % height_factor)) % height_factor\n    pad_width = (width_factor - (width % width_factor)) % width_factor\n","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_seedvr.py#L32-L68","documentation":"Raised by the SeedVR2 resolver when input.model exists and is non-None but lacks a 'diffusion_model' attribute. The node specifically needs the ComfyUI BaseModel (model.model.diffusion_model) to reach the SeedVR2 network internals; a wrapper of a different shape fails here with the inner object's type name.","triggerScenarios":"Connecting an object whose .model is a CLIP, VAE, or other component instead of a BaseModel; custom model classes that nest the network differently (e.g. .network instead of .diffusion_model); adapters that wrap without forwarding the attribute.","commonSituations":"Cross-wiring CLIP/VAE loader outputs that happen to have a .model field; using an alternative loader from a custom node pack that builds a non-standard wrapper; version changes in wrapper class layout.","solutions":["Use the standard model loader output (ModelPatcher over BaseModel) as the node's model input.","If writing a custom wrapper, expose .diffusion_model on the inner object the node receives.","Audit the graph for a mis-connected CLIP/VAE output on the model line."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"inner = getattr(model, 'model', None)\nif inner is not None and not hasattr(inner, 'diffusion_model'):\n    raise TypeError(f\"model.model is {type(inner).__name__}, not a BaseModel with diffusion_model\")","typeGuard":"def has_diffusion_model(model) -> bool:\n    inner = getattr(model, 'model', None)\n    return inner is not None and getattr(inner, 'diffusion_model', None) is not None","tryCatchPattern":null,"preventionTips":["Use the standard 'Load Diffusion Model' node output; avoid custom wrappers for SeedVR2.","Audit graphs for CLIP/VAE outputs accidentally connected to model sockets."],"tags":["seedvr2","model-loading","attribute-error","workflow-wiring"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}