StartHua / ComfyUI_Seg_VITON

comfyui-模特换装(Model dress up)
190 stars 32 forks source link

TypeError: CrossAttention.forward() got an unexpected keyword argument 'hint' #7

Closed CoreyH closed 7 months ago

CoreyH commented 7 months ago

Hi all,

I managed to install almost all the requirements, but I couldn't install Triton because it seems it is Windows only?? I tried to skip it but now I am getting this error:

Running PLMS Sampling with 20 timesteps PLMS Sampler: 0%| | 0/20 [00:00<?, ?it/s] ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "C:\tools\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\stabelvition.py", line 169, in sample samples, , _ = self.sampler.sample( ^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\plms_hacked.py", line 99, in sample samples, intermediates, cond_output_dict = self.plms_sampling(conditioning, size, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\plms_hacked.py", line 157, in plms_sampling outs = self.p_sample_plms(img, cond, ts, index=index, use_original_steps=ddim_use_original_steps, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\plms_hacked.py", line 233, in p_sample_plms e_t = get_model_output(x, t) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\plms_hacked.py", line 192, in get_model_output modelt, = self.model.apply_model(x,t,c) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\cldm.py", line 115, in applymodel control, = self.control_model(x=x_noisy, hint=hint, timesteps=t, context=cond_txt, only_mid_control=self.only_mid_control) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\warping_cldm_network.py", line 351, in forward h = module(h, emb, context) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\modules\diffusionmodules\openaimodel.py", line 84, in forward x = layer(x, context, hint) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\modules\attention.py", line 324, in forward x = block(x, context=context[i],hint=hint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\modules\attention.py", line 258, in forward return checkpoint(self._forward, (x, context), self.parameters(), self.checkpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\modules\diffusionmodules\util.py", line 115, in checkpoint return CheckpointFunction.apply(func, len(inputs), args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\autograd\function.py", line 553, in apply return super().apply(args, kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\modules\diffusionmodules\util.py", line 130, in forward output_tensors = ctx.run_function(ctx.input_tensors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\modules\attention.py", line 263, in _forward x = self.attn1(self.norm1(x), context=context if self.disable_self_attn else None,hint=hint) + x ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: CrossAttention.forward() got an unexpected keyword argument 'hint'

CoreyH commented 7 months ago

I managed to fix this by installing Triton via this link: https://github.com/wkpark/triton/actions/runs/7518654030

And then I re-ran pip install -r requirements.txt and it worked.

SevenAntares commented 7 months ago

@CoreyH Could you indicate what version of ComfyUI or Python you are using?

dicarne commented 5 months ago

install xformers help me fix it.