{"record":{"id":"a5b06111c364c6ea","repo":"Comfy-Org/ComfyUI","slug":"seedvr2conditioning-model-object-does-not-match-e-a5b061","errorCode":null,"errorMessage":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: 'model.model.diffusion_model' is None (model.model type {type(inner).__name__}).","messagePattern":"SeedVR2Conditioning: model object does not match expected SeedVR2 structure: 'model\\.model\\.diffusion_model' is None \\(model\\.model type (.+?)\\)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_seedvr.py","lineNumber":55,"sourceCode":"    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\n    if pad_height == 0 and pad_width == 0:\n        return image\n\n    padding = (0, pad_width, 0, pad_height)\n    return torch.nn.functional.pad(image, padding, mode='constant', value=0.0)","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_seedvr.py#L37-L73","documentation":"The innermost SeedVR2 structure check: input.model.diffusion_model exists as an attribute but is None. The resolver requires a live diffusion model instance to configure conditioning, so a present-but-None value means the wrapper was constructed but the network was never attached or was cleared.","triggerScenarios":"A BaseModel whose diffusion_model was set to None — partially initialized model after a failed load, post-unload state, or a manually constructed BaseModel without loading state; custom code that disposes diffusion_model then reuses the object.","commonSituations":"Interrupted model loads leaving stubs; aggressive memory-offload code that drops the inner network; constructing model objects programmatically without populating diffusion_model.","solutions":["Instantiate a fresh model load (new 'Load Diffusion Model' node) instead of reusing a disposed wrapper.","Ensure load completes before the SeedVR2 node runs; check for swallowed upstream load errors.","In custom code, verify model.model.diffusion_model is not None before calling the node."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"dm = getattr(getattr(model, 'model', None), 'diffusion_model', None)\nif dm is None:\n    raise ValueError(\"model.model.diffusion_model is None; perform a fresh model load\")","typeGuard":"def has_live_diffusion_model(model) -> bool:\n    return getattr(getattr(model, 'model', None), 'diffusion_model', None) is not None","tryCatchPattern":null,"preventionTips":["Never hand-construct BaseModel stubs without loading a state dict.","After memory-offload code that nils diffusion_model, reload before running SeedVR2 nodes."],"tags":["seedvr2","model-loading","none-value","initialization"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}