Hey there to all the comfyui lovers :)
That comfyui workflow is complex.
It's for advanced users that already know how to install custom nodes and models.
[ What this is about ? ]
I made that workflow to do :
- upscaling when needed
- downscaling when needed
- output an image file that has a target resolution that has neighter 1024 px on width or heigh (keeping aspect ratio).
- WD Tag the image
=> All of the above that you can loop with an load image Batch
[ How to use this ? ]
To use this workflow, just fill out theses informations :
- Enter the Target Resolution (for sdxl, it should be 1024)
- Enter the Images input path and the images output path
- Your main trigger words (and eventually the exclude_tags in the WD14 Tagger)
- You can also change the extension of the image if needed to something else then jpg in the ImageSave node
To use it for each image inside a folder, you need to modify the "Image index" node.
The control_after_generate is already on "increment", but have to start with value 0 to take the first image of the folder and loop thru all of the images in the specified folder.
The trick to make it loop, is to check the Extra options in the queue size and check the Auto Queue. In this way, when clicking "Queue Prompt" it will increment the image one by one until it reached an error that it doesn't have any image to load (so the last error message is normal ! lol).
[ Conditioning in comfyui is weird but useable ]
Conditioning in comfyui workflow is quite something to deal with.
First you need to install the custom nodes for that :
https://github.com/ltdrdata/ComfyUI-Impact-Pack
For the ImpactConditionalBranchSelMode, you need to :
1) Put the cond as an input (because it is not the case at first)
2) The tt_value is for true value cond, input the upscaled image into that
3) The ff_value is for false value cond, input the non upscale image in there
4) Then the output can be anything and match the input, in this case it's an image that will be output. The image that goes out of this node will be the one that match the conditioning part.
In a nutshell, the comfyui workflow will do all the work that is available and the ImpactConditionalBranchSelMode will select the good output depending on the condition applied that assert the results of the boolean.