asagi4 / comfyui-prompt-control

ComfyUI nodes for prompt editing and LoRA control
GNU General Public License v3.0
191 stars 16 forks source link

nodes don't work with SDXL #5

Closed BurningSpy closed 1 year ago

BurningSpy commented 1 year ago

Hi,

When I use the nodes with an SDXL model i get the following error:

Error occurred when executing ScheduleToCond:

list indices must be integers or slices, not str

File "C:\AI-Images\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\AI-Images\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:\AI-Images\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:\AI-Images\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-control\prompt_control\node_clip.py", line 148, in apply r = (control_to_clip_common(self, clip, prompt_schedule),) File "C:\AI-Images\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-control\prompt_control\node_clip.py", line 330, in control_to_clip_common cond = encode(c) File "C:\AI-Images\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-control\prompt_control\node_clip.py", line 302, in encode cond_cache[cachekey] = do_encode(clip, prompt) File "C:\AI-Images\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-control\prompt_control\node_clip.py", line 221, in do_encode cond, pooled = encode_prompt(clip, prompts[0], style, normalization) File "C:\AI-Images\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-control\prompt_control\node_clip.py", line 213, in encode_prompt return clip.encode_from_tokens(tokens, return_pooled=True) File "C:\AI-Images\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 586, in encode_from_tokens cond, pooled = self.cond_stage_model.encode_token_weights(tokens) File "C:\AI-Images\ComfyUI_windows_portable\ComfyUI\comfy\sdxl_clip.py", line 60, in encode_token_weights token_weight_pairs_g = token_weight_pairs["g"]

Not sure if it is planned to make it support SDXL, but if not a hint in the docu would be great ;) thanks!

asagi4 commented 1 year ago

Yeah there's probably some special stuff that needs doing if SDXL is in use. I just haven't gotten around to implementing it.

asagi4 commented 1 year ago

I added enough support for SDXL that it no longer throws exceptions when used, at least for me. Full support would require an SDXL-specific node, I think, but I'm resolving this for now.

ghostsquad commented 9 months ago

So to confirm, this does not work with SDXL?