asagi4 / comfyui-prompt-control

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

Clarification on #26

Closed ghostsquad closed 10 months ago

ghostsquad commented 10 months ago

Regarding this section of the ReadMe:

https://github.com/asagi4/comfyui-prompt-control#sdxl

Is SDXL() automatically added if this node detects an SDXL model passed to it? What if I leave that function out (of the prompt)?

The reason I'm asking, because I'm trying to wire up a SD1.5/SDXL combined workflow that can intelligently switch a few things around depending on the name of the checkpoint detected. Here's a WIP workflow with some WIP nodes as well:

image

What I'd like to do is use a node like Add CLIP SDXL Params to the conditioning, feeding the width/height information in from elsewhere. I think this will be easier that doing text manipulation to build a "function string" to pass along to PromptControlSimple.

image

asagi4 commented 10 months ago

The node doesn't add SDXL() automatically. It just behaves as if you hadn't specified any of those parameters and created a cond with CLIPTextEncode, which means that the dictionary holding cond parameters will simply not contain any SDXL-specific parameters.

From ComfyUI's perspective, a "CONDITIONING" object is a list of (tensor, parameter_dictionary) pairs; the parameters go into the parameter dictionary. If timestep ranges or masks/areas are used, that array will contain multiple such pairs

Using that node separately will work fine as long as it sets the parameters for every cond in the conditioning array that needs them (since they might have timestep ranges configured)

ghostsquad commented 10 months ago

Thanks for taking the time to explain this! I'll have to peek at that node source code to see.