{"record":{"id":"c193c742e140b07d","repo":"Comfy-Org/ComfyUI","slug":"seedvr2conditioning-model-object-does-not-match-e-c193c7","errorCode":null,"errorMessage":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: input.model is None (input type {type(model).__name__}).","messagePattern":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: input\\.model is None \\(input type (.+?)\\)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_seedvr.py","lineNumber":44,"sourceCode":")\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__}).\"\n        )\n    return diffusion_model\n\n\ndef div_pad(image, factor):","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_seedvr.py#L26-L62","documentation":"Raised by the SeedVR2 resolver when the input does have a 'model' attribute but its value is None. This distinguishes a half-initialized or cleared wrapper from a wrong type entirely (error 956), and reports the input's type to help identify which object was connected.","triggerScenarios":"A model wrapper whose .model was set to None — e.g. after unloading/disposal, a failed load that left a stub object, or a mock/placeholder passed from custom code.","commonSituations":"Memory-management code that offloads and nulls inner models; failed/interrupted checkpoint loads; test doubles that mimic the wrapper shape but leave model=None.","solutions":["Re-load the SeedVR2 model with a fresh 'Load Diffusion Model' node and reconnect it.","If custom code nils out .model for memory reasons, restore the inner model before invoking the node.","Verify the load node actually succeeded (no upstream load errors swallowed)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if getattr(model, 'model', None) is None:\n    raise ValueError(\"model wrapper has model=None; reload the checkpoint before use\")","typeGuard":"def has_live_inner_model(model) -> bool:\n    return getattr(model, 'model', None) is not None","tryCatchPattern":null,"preventionTips":["Do not reuse model wrappers after unload/disposal code paths.","Confirm the load node completed without errors before downstream SeedVR2 nodes run."],"tags":["seedvr2","model-loading","none-value","initialization"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}