shiimizu / ComfyUI_smZNodes

Custom nodes for ComfyUI such as CLIP Text Encode++
GNU General Public License v3.0
190 stars 14 forks source link

Can't link Settings to any other node #6

Closed isben closed 11 months ago

isben commented 11 months ago

It's probably me not understanding how Settings should be used but as per my understanding of your instructions I linked the CLIP output of the "Load Checkpoint" node to the input of my "Settings" node and then the output of this node to the CLIP input of both "CLIP Text Encode++" nodes. When running the graph, I'm getting an error: `Prompt outputs failed validation smZ CLIPTextEncode:

Now, my intent is only to set the RNG to GPU but it seems that whatever input I try to link the Settings output to, I get a similar error. How do I achieve this?

isben commented 11 months ago

I have another question: when using your parser set to A1111 and I want to use a negative embedding, do we have to prefix the name of the embedding with "embedding:" as for ComfyUI or should we keep the prompt as it was in A1111? Thanks to clarify how to use it.

shiimizu commented 11 months ago

It's probably me not understanding how Settings should be used but as per my understanding of your instructions I linked the CLIP output of the "Load Checkpoint" node to the input of my "Settings" node and then the output of this node to the CLIP input of both "CLIP Text Encode++" nodes. When running the graph, I'm getting an error: Prompt outputs failed validation smZ CLIPTextEncode: - Return type mismatch between linked nodes: clip, * != CLIP smZ CLIPTextEncode: - Return type mismatch between linked nodes: clip, * != CLIP

Now, my intent is only to set the RNG to GPU but it seems that whatever input I try to link the Settings output to, I get a similar error. How do I achieve this?

Should be fixed in https://github.com/shiimizu/ComfyUI_smZNodes/commit/40e3859fa39732612712778b6d6d613594ae063a. It currently won't work with reroute nodes, so you'll have to use a node in between that pipes one to another in place of a reroute node.

I have another question: when using your parser set to A1111 and I want to use a negative embedding, do we have to prefix the name of the embedding with "embedding:" as for ComfyUI or should we keep the prompt as it was in A1111? Thanks to clarify how to use it.

You can use the embedding: prefix or omit it because it's optional. It's available on all the parsers since I think it should be a core feature in ComfyUI. Though, I may remove it in the comfy parser in the future. Turn on the debug option in the Settings node to see in the console which embeddings are loaded.

isben commented 11 months ago

I just tested by connecting the CLIP output of a "CLIP Set Last Layer" to the input of the "Settings" node and the ANY output of the node to my "CLIP Text Encode++" and it works perfectly. It even seems that the noise generated matches whatever A1111 is creating leading to images that are almost identical! Great work! You are really providing a solution to a long time problem I really wished to be solved.