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

Hope someone knows how to help me fix this! #ComfyUI #91

Open
maihatrang opened this issue Aug 4, 2024 · 3 comments
Open

Hope someone knows how to help me fix this! #ComfyUI #91

maihatrang opened this issue Aug 4, 2024 · 3 comments

Comments

@maihatrang
Copy link

image

Error occurred when executing smZ CLIPTextEncode:

tuple index out of range

File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\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 "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\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 "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\nodes.py", line 87, in encode
result = run(**params)
^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 755, in run
cond, pooled = clip_clone.encode_from_tokens(tokens, True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 115, in encode_from_tokens
o = self.cond_stage_model.encode_token_weights(tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 444, in encode_token_weights
else: schedules = prompt_parser.get_learned_conditioning(model_hijack.cond_stage_model, texts, steps, None, opts.use_old_scheduling)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\modules\prompt_parser.py", line 198, in get_learned_conditioning
conds = model.forward(texts)
^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\modules\sd_hijack_clip.py", line 224, in forward
z = self.process_tokens(tokens, multipliers, multipliers_solo_emb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\modules\sd_hijack_clip.py", line 254, in process_tokens
z = self.encode_with_transformers(tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 224, in encode_with_transformers
return self.encode_with_transformers_comfy_(tokens, return_pooled)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 125, in encode_with_transformers_comfy_
z, pooled = ClipTextEncoderCustom._forward(self.wrapped, tokens_orig)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 114, in _forward
z, pooled_output = self.forward(tokens)
^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 181, in forward
tokens = self.set_up_textual_embeddings(tokens, backup_embeds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Stable diffusion\setup\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 153, in set_up_textual_embeddings
if y.shape[0] == current_embeds.weight.shape[1]:

@shiimizu
Copy link
Owner

Is it fixed now? I think that was due to some ComfyUI updates.

@FertBert
Copy link

Is it fixed now? I think that was due to some ComfyUI updates.

I'm having this issue still. I'm using the latest version of comfyui and your node.

@shiimizu
Copy link
Owner

It looks like an embedding issue. Also related to #45.
Something in your prompt is using an embedding that doesn't work? Do you have a workflow I can test?

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

3 participants