frankchieng / ComfyUI_MagicClothing

unofficial implementation of Comfyui magic clothing
Other
510 stars 44 forks source link

大佬这个错误怎么解决 #3

Open yamanacn opened 6 months ago

yamanacn commented 6 months ago

File "M:\comfyui\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "M:\comfyui\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "M:\comfyui\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "M:\comfyui\ComfyUI\custom_nodes\ComfyUI_MagicClothing\nodes.py", line 140, in garment_generation pipe.load_lora_weights(ip_lora) File "E:\anaconda\envs\comfyui1\Lib\site-packages\diffusers\loaders\lora.py", line 117, in load_lora_weights self.load_lora_into_unet( File "E:\anaconda\envs\comfyui1\Lib\site-packages\diffusers\loaders\lora.py", line 460, in load_lora_into_unet inject_adapter_in_model(lora_config, unet, adapter_name=adapter_name) File "E:\anaconda\envs\comfyui1\Lib\site-packages\peft\mapping.py", line 163, in inject_adapter_in_model peft_model = tuner_cls(model, peft_config, adapter_name=adapter_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\anaconda\envs\comfyui1\Lib\site-packages\peft\tuners\lora\model.py", line 111, in init super().init(model, config, adapter_name) File "E:\anaconda\envs\comfyui1\Lib\site-packages\peft\tuners\tuners_utils.py", line 90, in init self.inject_adapter(self.model, adapter_name) File "E:\anaconda\envs\comfyui1\Lib\site-packages\peft\tuners\tuners_utils.py", line 247, in inject_adapter self._create_and_replace(peft_config, adapter_name, target, target_name, parent, optional_kwargs) File "E:\anaconda\envs\comfyui1\Lib\site-packages\peft\tuners\lora\model.py", line 168, in _create_and_replace from .bnb import Linear8bitLt File "E:\anaconda\envs\comfyui1\Lib\site-packages\peft\tuners\lora\bnb.py", line 19, in import bitsandbytes as bnb File "E:\anaconda\envs\comfyui1\Lib\site-packages\bitsandbytes__init__.py", line 6, in from . import cuda_setup, utils, research File "E:\anaconda\envs\comfyui1\Lib\site-packages\bitsandbytes\research__init.py", line 1, in from . import nn File "E:\anaconda\envs\comfyui1\Lib\site-packages\bitsandbytes\research\nn\init.py", line 1, in from .modules import LinearFP8Mixed, LinearFP8Global File "E:\anaconda\envs\comfyui1\Lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in from bitsandbytes.optim import GlobalOptimManager File "E:\anaconda\envs\comfyui1\Lib\site-packages\bitsandbytes\optim\init__.py", line 6, in from bitsandbytes.cextension import COMPILED_WITH_CUDA File "E:\anaconda\envs\comfyui1\Lib\site-packages\bitsandbytes\cextension.py", line 20, in raise RuntimeError('''

frankchieng commented 6 months ago

download the corresponding lora models in README

lemon-lemom commented 6 months ago

All Lora and Models listed in the readme are stored. The same error occurred.

Error occurred when executing MagicClothing_Generate:

Linear.forward() takes 2 positional arguments but 3 were given

File "D:\stablityMatrix\Data\Packages\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\stablityMatrix\Data\Packages\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\stablityMatrix\Data\Packages\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\stablityMatrix\Data\Packages\ComfyUI\custom_nodes\ComfyUI_MagicClothing\nodes.py", line 177, in garment_generation
images, cloth_mask_image = full_net.generate(cloth_image, cloth_mask_image, prompt, a_prompt, num_samples, n_prompt, seed, scale, cloth_guidance_scale, sample_steps, height, width)
File "D:\stablityMatrix\Data\Packages\ComfyUI\custom_nodes\ComfyUI_MagicClothing\garment_adapter\garment_diffusion.py", line 92, in generate
self.ref_unet(torch.cat([cloth_embeds] * num_images_per_prompt), 0, prompt_embeds_null, cross_attention_kwargs={"attn_store": self.attn_store})
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\diffusers\models\unets\unet_2d_condition.py", line 1216, in forward
sample, res_samples = downsample_block(
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\diffusers\models\unets\unet_2d_blocks.py", line 1279, in forward
hidden_states = attn(
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\diffusers\models\transformers\transformer_2d.py", line 397, in forward
hidden_states = block(
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\diffusers\models\attention.py", line 329, in forward
attn_output = self.attn1(
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\diffusers\models\attention_processor.py", line 522, in forward
return self.processor(
File "D:\stablityMatrix\Data\Packages\ComfyUI\custom_nodes\ComfyUI_MagicClothing\garment_adapter\attention_processor.py", line 321, in __call__
query = attn.to_q(hidden_states, *args)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\stablityMatrix\Data\Packages\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
stormcenter commented 6 months ago

diffusers==0.26.2 必须是这个,检查一下,我试了高版本的会报一样的错误

Pythonpa commented 6 months ago

pip install -U peft transformers it works. https://github.com/Stability-AI/StableCascade/issues/52#issuecomment-2021890785

Dhruvisha19 commented 5 months ago

I am getting the same error. TypeError: Linear.forward() takes 2 positional arguments but 3 were given

I have installed... diffusers ==0.26.2 transformers == 4.41.1

It would be great if someone could help me solve this issue.

sswink commented 5 months ago

pip install transformers==4.38.2 it works

mishirokn commented 5 months ago

pip install transformers==4.38.2 it works

sadly it's not work for me

Dhruvisha19 commented 5 months ago

pip install transformers==4.38.2 it works

sadly it's not work for me

Not worked for me either.

ClothingAI commented 2 months ago

@mishirokn and @Dhruvisha19 where did you try the command? I think they meant inside the python embedded Right @sswink ?