Giter VIP home page Giter VIP logo

comfyui-magic-clothing's Introduction

comfyui-magic-clothing

The comfyui supported version of the Magic Clothing project, not the diffusers version, allows direct integration with modules such as ipadapter

Installation

  • use ComfyUI-Manager or put this code into custom_nodes
  • Go to huggingface to download the models and move them to the comfyui/models/unet folder

For samples, please refer to here

For ipadapter samples, please refer to here

Note

  • Currently there are still problems with the low success rate of some of the adopters, which doesn't work well for dense patterns, (meanwhile the [sigma] parameter serves as a temporary solution to the input scaling of the clothing feature in comfyui)
  • 当前实现抽卡概率还不够,主要是对于第一次unet采样时model.model_sampling.calculate_input 处理问题。还在研究中,先释放一个版本

comfyui-magic-clothing's People

Contributors

comfy-pr-bot avatar longgui0318 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

comfyui-magic-clothing's Issues

Error: Exception during processing!!! 'NoneType' object is not subscriptable

error

got prompt
[rgthree] Using rgthree's optimized recursive execution.
Prompt executor has been patched by Job Iterator!
model_type EPS
Using xformers attention in VAE
Using xformers attention in VAE
loaded straight to GPU
Requested to load BaseModel
Loading 1 new model
model_type EPS
Requested to load AutoencoderKL
Loading 1 new model
Requested to load SD1ClipModel
Loading 1 new model
Requested to load BaseModel
Loading 1 new model
Requested to load BaseModel
Loading 1 new model
0%| | 0/20 [00:00<?, ?it/s]
!!! Exception during processing!!! 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "E:\ComfyUI_4ALL\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\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 "E:\ComfyUI_4ALL\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\nodes.py", line 1355, in sample
return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\nodes.py", line 1325, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample
return original_sample(*args, **kwargs) # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 313, in motion_sample
return orig_comfy_sample(model, noise, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control_reference.py", line 47, in refcn_sample
return orig_comfy_sample(model, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\utils.py", line 111, in uncond_multiplier_check_cn_sample
return orig_comfy_sample(model, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\sample.py", line 43, in sample
samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 1427, in KSampler_sample
return _KSampler_sample(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 794, in sample
return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 1450, in sample
return _sample(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 696, in sample
return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 683, in sample
output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 662, in inner_sample
samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 567, in sample
samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 870, in sample_unipc
x = uni_pc.sample(noise, timesteps=timesteps, skip_type="time_uniform", method="multistep", order=order, lower_order_final=True, callback=callback, disable_pbar=disable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 717, in sample
model_prev_list = [self.model_fn(x, vec_t)]
^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 410, in model_fn
return self.data_prediction_fn(x, t)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 394, in data_prediction_fn
noise = self.noise_prediction_fn(x, t)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 388, in noise_prediction_fn
return self.model(x, t)
^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 329, in model_fn
return noise_pred_fn(x, t_continuous)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 297, in noise_pred_fn
output = model(x, t_input, **model_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 861, in
lambda input, sigma, **kwargs: predict_eps_sigma(model, input, sigma, **kwargs),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\extra_samplers\uni_pc.py", line 845, in predict_eps_sigma
return (input - model(input, sigma_in, **kwargs)) / sigma
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 291, in call
out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 649, in call
return self.predict_noise(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 976, in predict_noise
return self.apply_model(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 1023, in apply_model
out = super().predict_noise(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 652, in predict_noise
return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 277, in sampling_function
out = calc_cond_batch(model, conds, x, timestep, model_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-TiledDiffusion.patches.py", line 4, in calc_cond_batch
return calc_cond_batch_original_tiled_diffusion_5375d9cf(model, conds, x_in, timestep, model_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\comfy\samplers.py", line 151, in calc_cond_batch
p = get_area_and_mult(x, x_in, timestep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\comfyui-magic-clothing\nodes.py", line 142, in get_area_and_mult
result = old_get_area_and_mult(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\comfyui-magic-clothing\nodes.py", line 142, in get_area_and_mult
result = old_get_area_and_mult(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_4ALL\ComfyUI\custom_nodes\comfyui-magic-clothing\nodes.py", line 148, in get_area_and_mult
conditioning["c_attn_stored_area"] = AttnStoredExtra(torch.tensor([area[0],area[1],area[2],area[3]]))
~~~~^^^
TypeError: 'NoneType' object is not subscriptable

Prompt executed in 23.24 seconds

[Error] RuntimeError: mat1 and mat2 must have the same dtype, but got Float and Half

Hi!

I'm trying to get this running using the workflow that's provided in the readme file.

But as soon I try to run it, i get this error message:

!!! Exception during processing!!! mat1 and mat2 must have the same dtype, but got Float and Half
Traceback (most recent call last):
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\ComfyUI_windows_portable\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 "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-magic-clothing\oms_diffusion_nodes.py", line 124, in add_features
    attn_stored = self.calculate_features_zj(magicClothingModel,clip, feature_image)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-magic-clothing\oms_diffusion_nodes.py", line 228, in calculate_features_zj
    magicClothingModel.model.diffusion_model(latent_image, timestep, context=context, control=None, transformer_options=magicClothingModel.model_options["transformer_options"])
  File "E:\StableDiffusion\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 "E:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 841, in forward
    emb = self.time_embed(t_emb)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\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 "E:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\container.py", line 217, in forward
    input = module(input)
            ^^^^^^^^^^^^^
  File "E:\StableDiffusion\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 "E:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 52, in forward
    return super().forward(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\linear.py", line 116, in forward
    return F.linear(input, self.weight, self.bias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 must have the same dtype, but got Float and Half

Prompt executed in 0.11 seconds

Any advice?

Thanks in advance and kind regards!

How can I apply this with Image 2 Image? (Img2img)

Hi,
The problem with image 2 image is that in order for it to work, it needs to have a KSampler that receives the same width and height for both:

  • The latent image from the (input image)
  • "feature image" entering the node "Add Magic Clothing Attention"

The problem when having images of the same dimensions is that the image for the clothing will take the full image, and the input image (for img2img) has lot going on: "a person, legs, hands etc)

So when you try to pass all that through the sampler, it will "merge" the cloth (t shirt for instance) into the full body of the input image, and it does not work well.
Also, another problem with img2img:

  • if you do a high denoise, you can get better clothing reproduction, but you lose the original subject
  • if you have low denoise, you keep the subject, but the clothing is not copied well.

Any solutions please?

MagicClothing with IPAdapter

Hello!

I encountered attention patching errors when trying to use MagicClothing with IPAdapter, the logs are under spoilers below, here's the workflow.

Theoretically it should be possible to use MagicClothing in conjunction with IPAdapter, it's mentioned in the original paper, so it's must be some implementation issue or conflict with ComfyUI_IPAdapter_plus

Error log 1
Error occurred when executing KSampler:

shape '[3, -1, 8, 40]' is invalid for input of size 2560

  File "/mnt/nvme/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/mnt/nvme/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 "/mnt/nvme/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/mnt/nvme/ComfyUI/nodes.py", line 1346, in sample
    return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
  File "/mnt/nvme/ComfyUI/nodes.py", line 1316, in common_ksampler
    samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
  File "/mnt/nvme/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 22, in informative_sample
    raise e
  File "/mnt/nvme/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 9, in informative_sample
    return original_sample(*args, **kwargs)  # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
  File "/mnt/nvme/ComfyUI/comfy/sample.py", line 43, in sample
    samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 761, in sample
    return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 663, in sample
    return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 650, in sample
    output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 629, in inner_sample
    samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 534, in sample
    samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 870, in sample_unipc
    x = uni_pc.sample(noise, timesteps=timesteps, skip_type="time_uniform", method="multistep", order=order, lower_order_final=True, callback=callback, disable_pbar=disable)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 717, in sample
    model_prev_list = [self.model_fn(x, vec_t)]
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 410, in model_fn
    return self.data_prediction_fn(x, t)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 394, in data_prediction_fn
    noise = self.noise_prediction_fn(x, t)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 388, in noise_prediction_fn
    return self.model(x, t)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 329, in model_fn
    return noise_pred_fn(x, t_continuous)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 297, in noise_pred_fn
    output = model(x, t_input, **model_kwargs)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 861, in 
    lambda input, sigma, **kwargs: predict_eps_sigma(model, input, sigma, **kwargs),
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 845, in predict_eps_sigma
    return  (input - model(input, sigma_in, **kwargs)) / sigma
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 272, in __call__
    out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 616, in __call__
    return self.predict_noise(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 619, in predict_noise
    return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 258, in sampling_function
    out = calc_cond_batch(model, conds, x, timestep, model_options)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 216, in calc_cond_batch
    output = model_options['model_function_wrapper'](model.apply_model, {"input": input_x, "timestep": timestep_, "c": c, "cond_or_uncond": cond_or_uncond}).chunk(batch_chunks)
  File "/mnt/nvme/ComfyUI/custom_nodes/comfyui-magic-clothing/attn_handler.py", line 142, in __call__
    output = apply_model(input, timestep, **c)
  File "/mnt/nvme/ComfyUI/comfy/model_base.py", line 97, in apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/custom_nodes/FreeU_Advanced/nodes.py", line 176, in __temp__forward
    h = forward_timestep_embed(module, h, emb, context, transformer_options, time_context=time_context, num_video_frames=num_video_frames, image_only_indicator=image_only_indicator)
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 44, in forward_timestep_embed
    x = layer(x, context, transformer_options)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/attention.py", line 644, in forward
    x = block(x, context=context[i], transformer_options=transformer_options)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/attention.py", line 568, in forward
    n = attn2_replace_patch[block_attn2](n, context_attn2, value_attn2, extra_options)
  File "/mnt/nvme/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/CrossAttentionPatch.py", line 26, in __call__
    out = out + callback(out, q, k, v, extra_options, **self.kwargs[i])
  File "/mnt/nvme/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/CrossAttentionPatch.py", line 154, in ipadapter_attention
    out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"])
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/attention.py", line 352, in attention_pytorch
    q, k, v = map(
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/attention.py", line 353, in 
    lambda t: t.view(b, -1, heads, dim_head).transpose(1, 2),
Error log 2
Error occurred when executing KSampler:

Sizes of tensors must match except in dimension 1. Expected size 3 but got size 9 for tensor number 1 in the list.

  File "/mnt/nvme/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/mnt/nvme/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 "/mnt/nvme/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/mnt/nvme/ComfyUI/nodes.py", line 1346, in sample
    return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
  File "/mnt/nvme/ComfyUI/nodes.py", line 1316, in common_ksampler
    samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
  File "/mnt/nvme/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 22, in informative_sample
    raise e
  File "/mnt/nvme/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 9, in informative_sample
    return original_sample(*args, **kwargs)  # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
  File "/mnt/nvme/ComfyUI/comfy/sample.py", line 43, in sample
    samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 761, in sample
    return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 663, in sample
    return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 650, in sample
    output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 629, in inner_sample
    samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 534, in sample
    samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 870, in sample_unipc
    x = uni_pc.sample(noise, timesteps=timesteps, skip_type="time_uniform", method="multistep", order=order, lower_order_final=True, callback=callback, disable_pbar=disable)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 717, in sample
    model_prev_list = [self.model_fn(x, vec_t)]
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 410, in model_fn
    return self.data_prediction_fn(x, t)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 394, in data_prediction_fn
    noise = self.noise_prediction_fn(x, t)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 388, in noise_prediction_fn
    return self.model(x, t)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 329, in model_fn
    return noise_pred_fn(x, t_continuous)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 297, in noise_pred_fn
    output = model(x, t_input, **model_kwargs)
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 861, in 
    lambda input, sigma, **kwargs: predict_eps_sigma(model, input, sigma, **kwargs),
  File "/mnt/nvme/ComfyUI/comfy/extra_samplers/uni_pc.py", line 845, in predict_eps_sigma
    return  (input - model(input, sigma_in, **kwargs)) / sigma
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 272, in __call__
    out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 616, in __call__
    return self.predict_noise(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 619, in predict_noise
    return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 258, in sampling_function
    out = calc_cond_batch(model, conds, x, timestep, model_options)
  File "/mnt/nvme/ComfyUI/comfy/samplers.py", line 216, in calc_cond_batch
    output = model_options['model_function_wrapper'](model.apply_model, {"input": input_x, "timestep": timestep_, "c": c, "cond_or_uncond": cond_or_uncond}).chunk(batch_chunks)
  File "/mnt/nvme/ComfyUI/custom_nodes/comfyui-magic-clothing/attn_handler.py", line 142, in __call__
    output = apply_model(input, timestep, **c)
  File "/mnt/nvme/ComfyUI/comfy/model_base.py", line 97, in apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/custom_nodes/FreeU_Advanced/nodes.py", line 176, in __temp__forward
    h = forward_timestep_embed(module, h, emb, context, transformer_options, time_context=time_context, num_video_frames=num_video_frames, image_only_indicator=image_only_indicator)
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 44, in forward_timestep_embed
    x = layer(x, context, transformer_options)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/attention.py", line 644, in forward
    x = block(x, context=context[i], transformer_options=transformer_options)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/mnt/nvme/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/mnt/nvme/ComfyUI/comfy/ldm/modules/attention.py", line 510, in forward
    n, context_attn1, value_attn1 = p(n, context_attn1, value_attn1, extra_options)
  File "/mnt/nvme/ComfyUI/custom_nodes/comfyui-magic-clothing/attn_handler.py", line 246, in __call__
    q = torch.cat([q, feature_hidden_states], dim=1)

Attention issue

Hi,

I got this issue on mac:

/custom_nodes/comfyui-oms-diffusion/oms_diffusion_nodes.py", line 149, in get_area_and_mult
    conditioning["c_attn_stored_area"] = AttnStoredExtra(torch.tensor([area[0],area[1],area[2],area[3]]))
                                                                       ~~~~^^^
TypeError: 'NoneType' object is not subscriptable

thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.