FL Region PNG Overlay
Randomly place PNGs inside regions you draw on the node
- image
- image
Most overlay nodes want one fixed position for your logo or watermark. FL_RegionPNGOverlay, part of the sprawling Fill-Nodes pack (filliptm / Machinedelusions on Patreon), takes the opposite approach: you define one or more rectangular regions on the image, and it picks a PNG at random from each region's own folder and drops it in, jittered with a bit of rotation and an optional vignette so the composite doesn't look pasted-on. It's the node you want for repeatable-but-varied placement - think batch product shots where a logo needs to land in roughly the same corner every time but shouldn't look identical frame to frame, or synthetic data where you need a marker to appear in a plausible spot with some natural randomness.
How it works
The node has an on-node canvas widget: it shows your image and lets you draw and edit regions directly - each one is an X/Y position plus a width and height. Those regions are stored as regions_json, and each region points at a folder of candidate PNGs; at render time the node seeds a random pick per region, rotates it somewhere between rotation_min and rotation_max, and composites it. If vignette_enabled is on, it also darkens/feathers around the placement so the overlay blends rather than sitting as a flat sticker.
The inputs and outputs that matter
image- the base image the overlays get placed on.regions_json(default"[]") - the region definitions; normally you edit this through the on-node canvas rather than hand-typing JSON, but it's exposed as a plain string so you can save/reuse a region layout across runs.show_canvas(default true) - toggles the interactive region editor on the node itself.seed- controls which PNG gets picked per region and the rotation jitter; same seed, same picks.rotation_min/rotation_max(default −5° / 5°) - how much random rotation each placed PNG gets, for that "not perfectly pasted" look.- The
vignette_*cluster (vignette_enabled,vignette_diameter,vignette_skew,vignette_opacity,vignette_offset_x/_y,vignette_rotation_offset) shapes an elliptical darkening/feathering effect around the placement area -vignette_diameterandvignette_skewcontrol its size and how oval-vs-round it is,vignette_opacityhow strong the darkening reads.
Output is a single image with all region overlays composited in.
How to install it
ComfyUI Manager: search "Fill-Nodes", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
pip install -r ComfyUI_Fill-Nodes/requirements.txt
then restart. Nothing exotic dependency-wise here - it's PIL-level compositing - but remember to actually populate the folders your regions point at with PNGs before running; an empty region folder has nothing to randomly pick from.
Common issues & troubleshooting
A region shows nothing. Check that its folder actually contains PNG files - this node picks from what's on disk, it doesn't generate placeholder content.
Overlay looks flat/pasted despite the vignette settings. Push vignette_opacity up and vignette_diameter down slightly so the darkening is more concentrated around the overlay's edges rather than washing over the whole region.
Same layout, different result every time you expect it not to. Confirm seed is actually fixed rather than left on a random-per-run value upstream - with a static seed, the same regions and the same folder contents will reproduce the same picks and rotation every run.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| seed | INT | 00–2147483647 | — |
| rotation_min | FLOAT | -5.0-180–180 | — |
| rotation_max | FLOAT | 5.0-180–180 | — |
| vignette_enabled | BOOLEAN | true | — |
| vignette_diameter | FLOAT | 0.850.05–3 | — |
| vignette_skew | FLOAT | 0.350.05–2 | — |
| vignette_opacity | FLOAT | 0.450–1 | — |
| vignette_offset_x | INT | 0-4096–4096 | — |
| vignette_offset_y | INT | 0-4096–4096 | — |
| vignette_rotation_offset | FLOAT | 0.0-180–180 | — |
| regions_json | STRING | [] | — |
| show_canvas | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |