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

Error occurred when executing BNK_CutoffRegionsToConditioning #24

Open
Tornenado0 opened this issue Mar 11, 2024 · 2 comments
Open

Error occurred when executing BNK_CutoffRegionsToConditioning #24

Tornenado0 opened this issue Mar 11, 2024 · 2 comments

Comments

@Tornenado0
Copy link

Error occurred when executing BNK_CutoffRegionsToConditioning:

'SDXLClipModel' object has no attribute 'clip_layer'

File "C:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\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 "C:\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 "C:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\cutoff.py", line 282, in finalize
return finalize_clip_regions(clip_regions, mask_token, strict_mask, start_from_masked)
File "C:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\cutoff.py", line 225, in finalize_clip_regions
base_embedding_full, pool = encode_from_tokens(clip, base_weighted_tokens, token_normalization, weight_interpretation, True)
File "C:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\cutoff.py", line 192, in encode_from_tokens
embs_l, _ = advanced_encode_from_tokens(tokenized['l'],
File "C:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\adv_encode.py", line 183, in advanced_encode_from_tokens
weighted_emb, pooled_base = encode_func(weighted_tokens)
File "C:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\cutoff.py", line 195, in
lambda x: encode_token_weights(clip, x, encode_token_weights_l),
File "C:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\adv_encode.py", line 226, in encode_token_weights
model.cond_stage_model.clip_layer(model.layer_idx)
File "C:\StableDiffusion\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(

@KorDum
Copy link

KorDum commented Mar 16, 2024

@Tornenado0 hello! You can replace a line in the same file as I did
cc300a3

@Tornenado0
Copy link
Author

@KorDum this solution is working for me, thank you

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

Successfully merging a pull request may close this issue.

2 participants