jags111 / efficiency-nodes-comfyui

A collection of ComfyUI custom nodes.- Awesome smart way to work with nodes!
https://civitai.com/models/32342
GNU General Public License v3.0
712 stars 74 forks source link

Efficency Loader, some SD1.5 checkpoints result in an immediate error on load: advanced_encode_from_tokens(tokenized['l'] #197

Open lfarrell20 opened 3 weeks ago

lfarrell20 commented 3 weeks ago

Thanks for upkeeping these nodes, I'm sure there's a lot of requests and issues coming your way. I tried searching both repos to see if this was ever mentioned but did not find it.

For specific SD1.5 models I get the error:

Error occurred when executing Efficient Loader:

'l' 

File "C:\StableDiffusion\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)

File "C:\StableDiffusion\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 "C:\StableDiffusion\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))

File "C:\StableDiffusion\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 172, in efficientloader
encode_prompts(positive, negative, token_normalization, weight_interpretation, clip, clip_skip,

File "C:\StableDiffusion\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 73, in encode_prompts
positive_encoded = bnk_adv_encode.AdvancedCLIPTextEncode().encode(clip, positive_prompt, token_normalization, weight_interpretation)[0]

File "C:\StableDiffusion\ComfyUI\custom_nodes\efficiency-nodes-comfyui\py\bnk_adv_encode.py", line 312, in encode
embeddings_final, pooled = advanced_encode(clip, text, token_normalization, weight_interpretation, w_max=1.0,

File "C:\StableDiffusion\ComfyUI\custom_nodes\efficiency-nodes-comfyui\py\bnk_adv_encode.py", line 262, in advanced_encode
return advanced_encode_from_tokens(tokenized['l'],

The two models I'm experiencing this with are Counterfeit by gsdf (rqdwdw on Civitai) and RealismEngine by razzzhf. Given this only seems to happen with specific checkpoints it leads me to believe this is either an issue with how those models were created or they're an edge use-case that the efficiency node does not like.

Screenshot 2024-06-07 151116

Extra details:

Any insights would be much appreciated! I'm a designer first, technically minded second, so hope it's not something super obvious I'm doing on the user side.

jags111 commented 3 weeks ago

will check this

yonathansantosa commented 21 hours ago

Also happens with stable diffusion v2-1 and v2-0 from huggingface