Stack_GradientAndStroke
Gradient Fills and Double Outlines for Apt_Preset's Graphic Tools
- GradientAndStroke
The sibling to Stack_EmbossAndFill, and part of the same March 2026 "image editing and visualization" addition to Apt_Preset. Where that node handles texture fills and embossing, Stack_GradientAndStroke handles color gradients and outline strokes - the kind of settings you'd expect from a vector or text design tool rather than a diffusion pipeline. This is another config bundle, not a generation node: it packages a set of choices into a GRADIENT_AND_STROKE_DATA object for some other node in the pack to apply.
Gradient settings
- use_gradient (BOOLEAN, default
false) - turns on a two-color gradient fill instead of a flat color. - start_color (default
#ff0000, red) and end_color (default#0000ff, blue) - the two ends of the gradient. - angle (INT, -180 to 180, default 0) - the gradient's direction.
- opacity_gradient_type (enum:
none/linear/radial, defaultnone) - whether opacity itself also fades independently of color, and in what shape. - opacity_start / opacity_end (0–1, default 1 and 0.5) - the opacity fade's two endpoints, only relevant if
opacity_gradient_typeisn'tnone.
Stroke settings
- stroke_width (INT, 0–100, default 0) and stroke_color (default
#000000, black) - a basic outline. Width 0 means no visible stroke regardless of color. - stroke_opacity (0–1, default 1).
- stroke_type (enum:
normal/smooth/double, defaultnormal). - second_stroke_color (default
#ffff00, yellow) and second_stroke_width (0–50, default 0) - a second, independent outline layer, which is whatstroke_type = doubleis presumably drawing on to produce a two-tone double-outline look.
Output: GradientAndStroke, a GRADIENT_AND_STROKE_DATA bundle.
Setting it up
Both halves - gradient and stroke - are independently toggleable, so turn on only what you need. If you're after a two-color gradient, start_color/end_color/angle are the three that matter; leave opacity_gradient_type at none unless you specifically want the transparency itself to fade separately from the color. For strokes, stroke_width at 0 is effectively off no matter what color you've set, so that's the first thing to check if a stroke isn't showing up. The double-stroke setup (stroke_type = double plus the second_stroke_* fields) is for a layered outline look - set the two stroke colors to contrast for it to actually read as two distinct rings rather than one blended one.
What's not documented here
As with Stack_EmbossAndFill, this node's GRADIENT_AND_STROKE_DATA output doesn't correspond to an input type on any of the other 20 Apt_Preset nodes covered on comfy.icu, so the consuming node lives elsewhere in the pack. Check Apt_Preset's own example workflows if you're unsure what to plug it into.
Install
ComfyUI Manager: search "ComfyUI-Apt_Preset," install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart ComfyUI. Its install.bat dependency installer is a Windows batch file - on Linux or a cloud box, check what it installs and pip-install those packages directly, or let ComfyUI Manager's "install missing nodes" flow handle it.
Troubleshooting
Nothing changing after you add this node is expected until you flip use_gradient on, or set a stroke_width above 0 - both effects default to off.
This pack has real, reported import failures - a comfyui subreddit thread shows a console error reading (IMPORT FAILED): ...ComfyUI-Apt_Preset for someone loading a workflow that used it. ComfyUI Manager's "install missing custom nodes" resolved it, as did manually re-cloning the repository and restarting.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| use_gradient | BOOLEAN | false | — |
| start_color | STRING | #ff0000 | — |
| end_color | STRING | #0000ff | — |
| angle | INT | 0-180–180 | — |
| opacity_gradient_type | COMBO | none | 3 options: none, linear, radial |
| opacity_start | FLOAT | 1.000–1 | — |
| opacity_end | FLOAT | 0.500–1 | — |
| stroke_width | INT | 00–100 | — |
| stroke_color | STRING | #000000 | — |
| stroke_opacity | FLOAT | 1.000–1 | — |
| stroke_type | COMBO | normal | 3 options: normal, smooth, double |
| second_stroke_color | STRING | #ffff00 | — |
| second_stroke_width | INT | 00–50 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| GradientAndStroke | GRADIENT_AND_STROKE_DATA | — |