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

attention() got an unexpected keyword argument 'mask' #18

Closed
purinnohito opened this issue Dec 31, 2024 · 1 comment
Closed

attention() got an unexpected keyword argument 'mask' #18

purinnohito opened this issue Dec 31, 2024 · 1 comment

Comments

@purinnohito
Copy link

purinnohito commented Dec 31, 2024

In the latest branch 84ad39c, it appears that the CLIPNegPip functionality is broken in Flux.1. The following error occurs. This error does not occur and operates normally up to the branch from two versions ago,

bump version
0ce8ffa
The previous branch,

NegPip support for HunyuanVideo. Fix #16
21f65af
renders the node unusable, so it seems that the issue with Flux.1's NegPip starts from here.

ComfyUI Error Report

Error Details

  • Node Type: KSampler
  • Exception Type: TypeError
  • Exception Message: attention() got an unexpected keyword argument 'mask'

Stack Trace

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\nodes.py", line 1434, in sample
    return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\nodes.py", line 1401, in common_ksampler
    samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,

  File "D:\localsoft\sd\EasyForgeInstaller\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 "D:\localsoft\sd\EasyForgeInstaller\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 "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 829, 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 "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 729, in sample
    return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 716, in sample
    output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 695, in inner_sample
    samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 600, in sample
    samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\venv\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\k_diffusion\sampling.py", line 155, in sample_euler
    denoised = model(x, sigma_hat * s_in, **extra_args)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 299, in __call__
    out = self.inner_model(x, sigma, model_options=model_options, seed=seed)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 682, in __call__
    return self.predict_noise(*args, **kwargs)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 685, 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 "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 279, in sampling_function
    out = calc_cond_batch(model, conds, x, timestep, model_options)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 228, in calc_cond_batch
    output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\model_base.py", line 142, in apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\ldm\flux\model.py", line 159, in forward
    out = self.forward_orig(img, img_ids, context, txt_ids, timestep, y, guidance, control)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-ppm\dit\flux_negpip.py", line 152, in _flux_forward_orig_negpip
    img, txt = _flux_dsb_forward_negpip(block, img=img, txt=txt, vec=vec, pe=pe, attn_mask=attn_mask, negpip_mask=negpip_mask)

  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-ppm\dit\flux_negpip.py", line 46, in _flux_dsb_forward_negpip
    attn = attention(torch.cat((txt_q, img_q), dim=2), torch.cat((txt_k, img_k), dim=2), torch.cat((txt_v, img_v), dim=2), pe=pe, mask=attn_mask)

System Information

  • ComfyUI Version: v0.2.2-93-g8dfa0cc5
  • Arguments: main.py --auto-launch
  • OS: nt
  • Python Version: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
  • Embedded Python: false
  • PyTorch Version: 2.4.1+cu124

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
    • Type: cuda
    • VRAM Total: 25769279488
    • VRAM Free: 3965220696
    • Torch VRAM Total: 20434649088
    • Torch VRAM Free: 37255000

Logs

2025-01-01 17:42:46,562 - root - INFO - Total VRAM 24576 MB, total RAM 97855 MB
2025-01-01 17:42:46,563 - root - INFO - pytorch version: 2.4.1+cu124
2025-01-01 17:42:46,563 - root - INFO - Set vram state to: NORMAL_VRAM
2025-01-01 17:42:46,564 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
2025-01-01 17:42:47,459 - root - INFO - Using pytorch cross attention
2025-01-01 17:42:48,534 - root - INFO - [Prompt Server] web root: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\web
2025-01-01 17:42:53,478 - root - INFO - Total VRAM 24576 MB, total RAM 97855 MB
2025-01-01 17:42:53,478 - root - INFO - pytorch version: 2.4.1+cu124
2025-01-01 17:42:53,479 - root - INFO - Set vram state to: NORMAL_VRAM
2025-01-01 17:42:53,479 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
2025-01-01 17:42:54,636 - root - WARNING - Traceback (most recent call last):
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\nodes.py", line 1998, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1016, in get_code
  File "<frozen importlib._bootstrap_external>", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\localsoft\\sd\\EasyForgeInstaller\\ComfyUI\\custom_nodes\\sd-scripts\\__init__.py'

2025-01-01 17:42:54,636 - root - WARNING - Cannot import D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\sd-scripts module for custom nodes: [Errno 2] No such file or directory: 'D:\\localsoft\\sd\\EasyForgeInstaller\\ComfyUI\\custom_nodes\\sd-scripts\\__init__.py'
2025-01-01 17:42:55,963 - root - INFO - 
Import times for custom nodes:
2025-01-01 17:42:55,963 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\comfyui-saveimage-plus
2025-01-01 17:42:55,963 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\websocket_image_save.py
2025-01-01 17:42:55,964 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Unload-Model
2025-01-01 17:42:55,964 - root - INFO -    0.0 seconds (IMPORT FAILED): D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\sd-scripts
2025-01-01 17:42:55,965 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\cg-use-everywhere
2025-01-01 17:42:55,965 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\cd-tuner_negpip-ComfyUI
2025-01-01 17:42:55,965 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI_experiments
2025-01-01 17:42:55,966 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-GGUF
2025-01-01 17:42:55,966 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\comfyui-lama-remover
2025-01-01 17:42:55,966 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI_bnb_nf4_fp4_Loaders
2025-01-01 17:42:55,966 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Florence2
2025-01-01 17:42:55,967 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-SaveAVIF
2025-01-01 17:42:55,967 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\save-image-extended-comfyui
2025-01-01 17:42:55,967 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\mikey_nodes
2025-01-01 17:42:55,967 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI_bitsandbytes_NF4-Lora
2025-01-01 17:42:55,967 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts
2025-01-01 17:42:55,968 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\comfy-image-saver
2025-01-01 17:42:55,968 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\efficiency-nodes-comfyui
2025-01-01 17:42:55,968 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-SaveImageWithMetaData
2025-01-01 17:42:55,968 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\rgthree-comfy
2025-01-01 17:42:55,968 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-ImageMetadataExtension
2025-01-01 17:42:55,969 - root - INFO -    0.0 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-KJNodes
2025-01-01 17:42:55,969 - root - INFO -    0.1 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes
2025-01-01 17:42:55,969 - root - INFO -    0.1 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI_Searge_LLM
2025-01-01 17:42:55,969 - root - INFO -    0.1 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Inspire-Pack
2025-01-01 17:42:55,969 - root - INFO -    0.1 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
2025-01-01 17:42:55,969 - root - INFO -    0.1 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI_BiRefNet_ll
2025-01-01 17:42:55,970 - root - INFO -    0.2 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-ppm
2025-01-01 17:42:55,971 - root - INFO -    0.4 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Flux-Inpainting
2025-01-01 17:42:55,971 - root - INFO -    0.6 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Manager
2025-01-01 17:42:55,971 - root - INFO -    0.7 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\abg-comfyui
2025-01-01 17:42:55,971 - root - INFO -    1.3 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\was-node-suite-comfyui
2025-01-01 17:42:55,971 - root - INFO -    1.3 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-Inspyrenet-Rembg
2025-01-01 17:42:55,971 - root - INFO -    1.7 seconds: D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\cgem156-ComfyUI
2025-01-01 17:42:55,972 - root - INFO - 
2025-01-01 17:42:55,996 - root - INFO - Starting server

2025-01-01 17:42:55,997 - root - INFO - To see the GUI go to: http://127.0.0.1:8188
2025-01-01 17:43:17,525 - root - INFO - got prompt
2025-01-01 17:43:17,532 - root - ERROR - Failed to validate prompt for output 37:
2025-01-01 17:43:17,534 - root - ERROR - * VAELoader 40:
2025-01-01 17:43:17,534 - root - ERROR -   - Value not in list: vae_name: 'flux\ae.sft' not in ['Flux\\Fixhands-unfilteredai.safetensors', 'Flux\\ae.safetensors', 'Flux\\blue_pencil-flux1-v0.2.1-fp8-incl-vae-clips.safetensors', 'Flux\\clip_l.safetensors', 'Flux\\t5xxl-Q6_K.gguf', 'Flux\\t5xxl_fp16.safetensors', 'Flux\\vae\\ae.safetensors']
2025-01-01 17:43:17,534 - root - ERROR - * DualCLIPLoader 39:
2025-01-01 17:43:17,534 - root - ERROR -   - Value not in list: clip_name1: 'sd3\clip_l.safetensors' not in ['Flux\\Fixhands-unfilteredai.safetensors', 'Flux\\ae.safetensors', 'Flux\\blue_pencil-flux1-v0.2.1-fp8-incl-vae-clips.safetensors', 'Flux\\clip_l.safetensors', 'Flux\\t5xxl-Q6_K.gguf', 'Flux\\t5xxl_fp16.safetensors', 'Flux\\vae\\ae.safetensors']
2025-01-01 17:43:17,534 - root - ERROR -   - Value not in list: clip_name2: 'sd3\t5xxl_fp16.safetensors' not in ['Flux\\Fixhands-unfilteredai.safetensors', 'Flux\\ae.safetensors', 'Flux\\blue_pencil-flux1-v0.2.1-fp8-incl-vae-clips.safetensors', 'Flux\\clip_l.safetensors', 'Flux\\t5xxl-Q6_K.gguf', 'Flux\\t5xxl_fp16.safetensors', 'Flux\\vae\\ae.safetensors']
2025-01-01 17:43:17,534 - root - ERROR - * UNETLoader 38:
2025-01-01 17:43:17,534 - root - ERROR -   - Value not in list: unet_name: 'flux\flux1-dev.sft' not in (list of length 34)
2025-01-01 17:43:17,534 - root - ERROR -   - Value not in list: weight_dtype: 'fp8_e4m3fn_fast' not in ['default', 'fp8_e4m3fn', 'fp8_e5m2']
2025-01-01 17:43:17,534 - root - ERROR - Output will be ignored
2025-01-01 17:43:17,534 - root - WARNING - invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}
2025-01-01 17:44:30,715 - root - INFO - got prompt
2025-01-01 17:44:30,839 - root - INFO - Using pytorch attention in VAE
2025-01-01 17:44:30,841 - root - INFO - Using pytorch attention in VAE
2025-01-01 17:44:33,550 - root - WARNING - clip missing: ['text_projection.weight']
2025-01-01 17:45:02,813 - root - INFO - model weight dtype torch.bfloat16, manual cast: None
2025-01-01 17:45:02,828 - root - INFO - model_type FLOW
2025-01-01 17:45:02,909 - root - INFO - Requested to load FluxClipModel_
2025-01-01 17:45:02,910 - root - INFO - Loading 1 new model
2025-01-01 17:45:09,150 - root - INFO - loaded completely 0.0 9319.23095703125 True
2025-01-01 17:45:10,991 - root - INFO - Requested to load Flux
2025-01-01 17:45:10,993 - root - INFO - Loading 1 new model
2025-01-01 17:45:28,926 - root - INFO - loaded completely 0.0 12238.547119140625 True
2025-01-01 17:45:29,397 - root - ERROR - !!! Exception during processing !!! attention() got an unexpected keyword argument 'mask'
2025-01-01 17:45:29,559 - root - ERROR - Traceback (most recent call last):
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\nodes.py", line 1434, in sample
    return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\nodes.py", line 1401, in common_ksampler
    samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
  File "D:\localsoft\sd\EasyForgeInstaller\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 "D:\localsoft\sd\EasyForgeInstaller\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 "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 829, 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 "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 729, in sample
    return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 716, in sample
    output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 695, in inner_sample
    samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 600, in sample
    samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\venv\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\k_diffusion\sampling.py", line 155, in sample_euler
    denoised = model(x, sigma_hat * s_in, **extra_args)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 299, in __call__
    out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 682, in __call__
    return self.predict_noise(*args, **kwargs)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 685, 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 "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 279, in sampling_function
    out = calc_cond_batch(model, conds, x, timestep, model_options)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\samplers.py", line 228, in calc_cond_batch
    output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\model_base.py", line 142, in apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\comfy\ldm\flux\model.py", line 159, in forward
    out = self.forward_orig(img, img_ids, context, txt_ids, timestep, y, guidance, control)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-ppm\dit\flux_negpip.py", line 152, in _flux_forward_orig_negpip
    img, txt = _flux_dsb_forward_negpip(block, img=img, txt=txt, vec=vec, pe=pe, attn_mask=attn_mask, negpip_mask=negpip_mask)
  File "D:\localsoft\sd\EasyForgeInstaller\ComfyUI\custom_nodes\ComfyUI-ppm\dit\flux_negpip.py", line 46, in _flux_dsb_forward_negpip
    attn = attention(torch.cat((txt_q, img_q), dim=2), torch.cat((txt_k, img_k), dim=2), torch.cat((txt_v, img_v), dim=2), pe=pe, mask=attn_mask)
TypeError: attention() got an unexpected keyword argument 'mask'

2025-01-01 17:45:29,562 - root - INFO - Prompt executed in 58.84 seconds

Attached Workflow

Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

{"last_node_id":45,"last_link_id":79,"nodes":[{"id":6,"type":"CLIPTextEncode","pos":{"0":384,"1":192},"size":{"0":422.84503173828125,"1":164.31304931640625},"flags":{},"order":5,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":66}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[77],"slot_index":0}],"title":"CLIP Text Encode (Positive Prompt)","properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["Mario wearing a (red:-1.2) cap."],"color":"#232","bgcolor":"#353"},{"id":8,"type":"VAEDecode","pos":{"0":1151,"1":195},"size":{"0":210,"1":46},"flags":{},"order":9,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":52},{"name":"vae","type":"VAE","link":62}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[59],"slot_index":0}],"properties":{"Node name for S&R":"VAEDecode"},"widgets_values":[]},{"id":27,"type":"EmptySD3LatentImage","pos":{"0":471,"1":455},"size":{"0":315,"1":106},"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[51],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"EmptySD3LatentImage"},"widgets_values":[1024,1024,1],"color":"#323","bgcolor":"#535"},{"id":33,"type":"CLIPTextEncode","pos":{"0":390,"1":400},"size":{"0":422.84503173828125,"1":164.31304931640625},"flags":{"collapsed":true},"order":6,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":67,"slot_index":0}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[73],"slot_index":0}],"title":"CLIP Text Encode (Negative Prompt)","properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":[""],"color":"#322","bgcolor":"#533"},{"id":37,"type":"PreviewImage","pos":{"0":1150,"1":280},"size":{"0":590,"1":610},"flags":{},"order":10,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":59}],"outputs":[],"properties":{"Node name for S&R":"PreviewImage"},"widgets_values":[]},{"id":41,"type":"CLIPNegPip","pos":{"0":400,"1":30},"size":{"0":140,"1":50},"flags":{},"order":4,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":79},{"name":"clip","type":"CLIP","link":65}],"outputs":[{"name":"MODEL","type":"MODEL","links":[76],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[66,67],"slot_index":1}],"properties":{"Node name for S&R":"CLIPNegPip"},"widgets_values":[]},{"id":44,"type":"FluxGuidance","pos":{"0":820,"1":90},"size":{"0":211.60000610351562,"1":60},"flags":{},"order":7,"mode":0,"inputs":[{"name":"conditioning","type":"CONDITIONING","link":77}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[78],"slot_index":0}],"properties":{"Node name for S&R":"FluxGuidance"},"widgets_values":[3.5]},{"id":39,"type":"DualCLIPLoader","pos":{"0":0,"1":200},"size":{"0":315,"1":106},"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"CLIP","type":"CLIP","links":[65],"slot_index":0}],"properties":{"Node name for S&R":"DualCLIPLoader"},"widgets_values":["Flux\\clip_l.safetensors","Flux\\t5xxl_fp16.safetensors","flux"]},{"id":45,"type":"UnetLoaderGGUF","pos":{"0":10,"1":30},"size":{"0":315,"1":58},"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[79],"shape":3,"slot_index":0}],"properties":{"Node name for S&R":"UnetLoaderGGUF"},"widgets_values":["FluxS-Base\\flux1-schnell-Q8_0.gguf"]},{"id":40,"type":"VAELoader","pos":{"0":1150,"1":90},"size":{"0":210,"1":60},"flags":{},"order":3,"mode":0,"inputs":[],"outputs":[{"name":"VAE","type":"VAE","links":[62],"slot_index":0}],"properties":{"Node name for S&R":"VAELoader"},"widgets_values":["Flux\\vae\\ae.safetensors"]},{"id":31,"type":"KSampler","pos":{"0":820,"1":190},"size":{"0":320,"1":470},"flags":{},"order":8,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":76},{"name":"positive","type":"CONDITIONING","link":78},{"name":"negative","type":"CONDITIONING","link":73},{"name":"latent_image","type":"LATENT","link":51}],"outputs":[{"name":"LATENT","type":"LATENT","links":[52],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"KSampler"},"widgets_values":[2,"fixed",4,1,"euler","simple",1]}],"links":[[51,27,0,31,3,"LATENT"],[52,31,0,8,0,"LATENT"],[59,8,0,37,0,"IMAGE"],[62,40,0,8,1,"VAE"],[65,39,0,41,1,"CLIP"],[66,41,1,6,0,"CLIP"],[67,41,1,33,0,"CLIP"],[73,33,0,31,2,"CONDITIONING"],[76,41,0,31,0,"MODEL"],[77,6,0,44,0,"CONDITIONING"],[78,44,0,31,1,"CONDITIONING"],[79,45,0,41,0,"MODEL"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.9090909090909091,"offset":[618.992194038524,357.64447606442457]},"ue_links":[]},"version":0.4}

Additional Context

(Please add any additional context or steps to reproduce the error here)

@purinnohito
Copy link
Author

I apologize - I found the cause. It seems I was using an outdated version of ComfyUI. I'm sorry for any inconvenience caused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant