Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get an "AttributeError: 'tuple' object has no attribute 'clone'" when every I attempt to use basic "merge model" nodes #6495

Open
VieuxChou opened this issue Jan 17, 2025 · 1 comment
Labels
Potential Bug User is reporting a bug. This should be tested.

Comments

@VieuxChou
Copy link

VieuxChou commented Jan 17, 2025

Expected Behavior

When I try to merge checkpoints for I get a "AttributeError: 'tuple' object has no attribute 'clone'" error. This only happens when I try to merge checkpoint models. As soon as I remove the merge everything works fine.

Actual Behavior

Image

Steps to Reproduce

When I try to merge checkpoints for I get a "AttributeError: 'tuple' object has no attribute 'clone'" error. This only happens when I try to merge checkpoint models. As soon as I remove the merge everything works fine. This occurs when I try to use any merge model nodes.

Debug Logs

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 148, in encode_from_tokens_scheduled
    pooled_dict = self.encode_from_tokens(tokens, return_pooled=return_pooled, return_dict=True)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 209, in encode_from_tokens
    self.load_model()
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 242, in load_model
    model_management.load_model_gpu(self.patcher)
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 555, in load_model_gpu
    return load_models_gpu([model])
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 550, in load_models_gpu
    loaded_model.model_load(lowvram_model_memory, force_patch_weights=force_patch_weights)
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 366, in model_load
    self.model_use_more_vram(use_more_vram, force_patch_weights=force_patch_weights)
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 395, in model_use_more_vram
    return self.model.partially_load(self.device, extra_memory, force_patch_weights=force_patch_weights)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 772, in partially_load
    raise e
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 769, in partially_load
    self.load(device_to, lowvram_model_memory=current_used + extra_memory, force_patch_weights=force_patch_weights, full_load=full_load)
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 614, in load
    self.patch_weight_to_device("{}.{}".format(n, param), device_to=device_to)
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 526, in patch_weight_to_device
    out_weight = comfy.lora.calculate_weight(self.patches[key], temp_weight, key)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\AI Programs and Files\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\Fooocus_Nodes\py\modules\patch.py", line 124, in calculate_weight_patched
    v = (calculate_weight_patched(v[1:], v[0].clone(), key, intermediate_dtype=intermediate_dtype), )
                                         ^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'clone'

Other

No response

@VieuxChou VieuxChou added the Potential Bug User is reporting a bug. This should be tested. label Jan 17, 2025
@comfyanonymous
Copy link
Owner

try removing: custom_nodes\Fooocus_Nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug User is reporting a bug. This should be tested.
Projects
None yet
Development

No branches or pull requests

2 participants