DIY: example (IMGNR)
The pre-installed demo node that shows you what DIY nodes can do
- inspect
- Resolution
- Width
- Height
- Ratio
- Format
- Boolean
- Prefered Samplers
- sampler
- scheduler
- Prompt
- fullname
- conditional_example
When you install ComfyUI-IMGNR-Utils and restart, you'll suddenly have a node called DIY: example (IMGNR) that you never asked for. It's not a bug - it's the pack's built-in tutorial. This node is generated from example.txt, a demo definition the pack writes into your user folder on every launch, and its whole purpose is to show you the full range of what the DIY node system can produce in one place. Twelve outputs, mixing dropdowns, typed fields, and string-building formulas.
What the example demonstrates
Every output corresponds to a line in the source file, which is a walking tour of the DIY format:
Resolution,Width,Height,Ratio- the headline feature. One dropdown (FullHD,4K,Square1080) whose row values fan out to typed outputs: width and height as INT, ratio as FLOAT. Pick "4K" and the node hands you 3840, 2160, and 1.7778 on separate wires.Format(PNG/JPG) andBoolean(true/false, typed as BOOLEAN) - plain single-column dropdowns.Prefered Samplers,sampler,scheduler- a three-column table mapping friendly names likeEulerSimpleto the realeuler/simplevalues a KSampler expects. The whole reason the author built this: filtering a KSampler's endless list down to the ones you actually use.Prompt- a=textboxsection, i.e. a free multiline input.fullname- a[concat=fullname]formula that glues thefirstname,lastname, andnumberinput fields into one string:John Smith_nr42style. The input fields themselves areoutput=false, so they exist as widgets but don't appear in the outputs.conditional_example- concat with a conditional{ ... }block, which only gets included if the referenced field isn't empty.
The inspect optional input is also there, matching every DIY node - connect the DIY Node Writer's inspect output to it to pull this node's definitions into the editor for cherry-picking.
How to use it (and how not to)
The fastest way to learn the format: connect DIY: example where you need one of its outputs, see how the dropdown drives the typed values, then open the Writer, select example.txt, and read the source. Better yet, feed this node's inspect into the Writer and tinker.
But here's the trap: example.txt is reset to the default on every ComfyUI launch - the file header literally says "Example node!! Will reset on launch!!". So never build a workflow that depends on you having edited it, and don't add your own lines to it expecting them to stick. When you want your own node, copy the example's structure into a new file via the Writer (or write a fresh one) and let the pack generate DIY: <yourname> after a restart. Your own files are persistent; only the demo resets.
Installing it
You get it by installing the pack - zero dependencies, nothing to pip:
cd ComfyUI/custom_nodes
git clone https://github.com/ImagineerNL/ComfyUI-IMGNR-Utils
or search "ComfyUI-IMGNR-Utils" in ComfyUI Manager and restart. It shows up under IMGNR/DIY nodes alongside the DIY Node Writer. Treat it as a reference card with outputs, not as infrastructure - and the moment you outgrow it, you've understood the DIY system well enough to build your own.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| Resolution | COMBO | FullHD | 3 options: FullHD, 4K, Square1080 |
| Format | COMBO | PNG | 2 options: PNG, JPG |
| Boolean | COMBO | true | 2 options: true, false |
| Prefered Samplers | COMBO | EulerSimple | 4 options: EulerSimple, EulerBeta, dpmpp_2m, lcm |
| Prompt | STRING | — | |
| firstname | STRING | — | |
| lastname | STRING | — | |
| number | INT | 0 | — |
| inspectopt | * | Connect DIY Node Writer |
Outputs (12)
| Name | Type | Description |
|---|---|---|
| Resolution | * | Resolution (STRING) |
| Width | * | Width (INT) |
| Height | * | Height (INT) |
| Ratio | * | Ratio (FLOAT) |
| Format | * | Format (STRING) |
| Boolean | * | Boolean (BOOLEAN) |
| Prefered Samplers | * | Prefered Samplers (STRING) |
| sampler | * | sampler (STRING) |
| scheduler | * | scheduler (STRING) |
| Prompt | * | Prompt (TEXTBOX) |
| fullname | * | fullname (STRING) |
| conditional_example | * | conditional_example (STRING) |