Nodes Browser

ComfyDeploy: How hus' utils for ComfyUI works in ComfyUI?

What is hus' utils for ComfyUI?

ComfyUI nodes primarily for seed and filename generation

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for hus' utils for ComfyUI and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

hus' utils for ComfyUI

Some nodes I cobbled together to satisfy my preferences, to recreate some behaviours of A1111.

Nodes

Fetch widget value

Extracted from 'Math Expression' from ComfyUI-Custom-Scripts.

Fetch the value of widget widget_name from node node_name. Node name can be type, title or S&R name. If multiple is 'no', use first matching node, if it is 'yes', return all as concatenated string separated by ', '.

3way Prompt Styler

Adapted from Load Styles CSV. Positive split into G and L for SDXL.

Load prompt styles from a file named 'styles.csv' in the source directory of this node (usually .../ComfyUI/custom_nodes/ComfyUI_hus_utils/). Each line has four columns: style name, prompt G, prompt L and negative prompt. L and negative are simply appended to the respective inputs, the value of G is searched for '{prompt}', which is replaced with the G input.

Example provided in example styles.csv

Text Hash

Return the first length characters of the sha256 digest of the input.

Date Time Format

Return the current date and/or time as formatted by strftime using format.

Batch State

Check whether the state of the workflow (inputs and linking) has changed.

  • changed returns 1 if a change is detected, 0 otherwise
  • hash returns a hash of the current state
  • count counts up every time the state is unchanged and resets to 0 on change

Add count to a seed input with 'fixed' value to create a sequence of images with consecutive seeds every time 'Queue Prompt' is clicked. When any input is changed, the sequence starts again from the value of the seed node. The purpose is to check the influence of changes in prompt, CFG, steps etc on the same set of images.

If the seed node is set to 'randomize' or anything else except 'fixed', it's input value will change every time, causing count to remain at 0, which should cause the sum to show the expected behaviour.

Debug Extra

Expose some of the internal workings for developing custom nodes.

Example

Example workflow based on Sytan SDXL ComfyUI

  • Filename prefixes are created as prompt hash-prompt style-seed-model name-base {sampler, scheduler, steps, cfg}-refiner {sampler, scheduler, steps, cfg}
  • Seeds are generated in a fixed sequence which restarts every time any input is changed.

Dependencies

Nodes from ...