Nodes/ComfyUI-Apt_Preset/img_effect_Stretch
ComfyUI Node

img_effect_Stretch

Deprecated banded stretch/squeeze distortion

By cardenluoĀ·Created 2 years agoĀ·Updated 18 days agoĀ· 309
img_effect_Stretch
  • image
  • IMAGE
ā—„strength2.0ā–ŗ
ā—„direction▾►
ā—„position0.50ā–ŗ
ā—„stretch_width0.10ā–ŗ
ā—„transition0.05ā–ŗ

The last of the pack's img_effect_* distortion nodes to cover, and like its siblings (CircleWarp, Liquify, WaveWarp) it's filed under the pack's own Deprecated category - still working, not the current recommendation for new builds. Where the others deform around a point (circular/radial), this one deforms along a band: it picks a position on one axis and stretches a strip of the image at that position, with a soft transition so the stretch doesn't look like a hard cut.

How it works

Pick a direction (horizontal or vertical) and a position along that axis - 0.1 to 0.9, so a fraction of the way across or down the image, not the full 0–1 range. Around that position, a band of width stretch_width gets stretched by strength, and transition softens the edges of that band so it blends rather than showing a seam. Think of it as grabbing a strip of the image and pulling it apart - the kind of glitch/melt look you'd get from a taffy-pull or a scanline-glitch filter, rather than a subtle correction.

The inputs and outputs that matter

  • image (required) - what you're stretching.
  • strength (FLOAT, 1–4, default 2) - how much the band stretches. Note the minimum is 1 (no distortion) rather than 0 - there's no "shrink" direction on this one, only stretch.
  • direction - horizontal or vertical.
  • position (FLOAT, 0.1–0.9, default 0.5) - where along the chosen axis the band sits.
  • stretch_width (FLOAT, 0.01–0.3, default 0.1) - how wide the affected band is, as a fraction of the image.
  • transition (FLOAT, 0.01–0.1, default 0.05) - how soft the band's edges fade in.

One output: IMAGE, the stretched result.

How to install it

ComfyUI Manager: search ComfyUI-Apt_Preset, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
pip install -r requirements.txt

install.bat is Windows-only; on Linux (comfy.icu's executor included) run pip install -r requirements.txt directly. No model downloads needed - this effect runs on the pack's general dependencies (opencv-python-headless, scipy), which come along with the rest of the pack's much larger requirement list.

Common issues

The position range is capped at 0.1–0.9, not 0–1 - if you're trying to stretch right at an edge of the image and the band won't go there, that's the schema's limit, not a bug; you can't push the stretch band all the way to the frame boundary with this node.

strength bottoms out at 1 (no effect), so if you were hoping for a "compress" direction opposite to stretch, this node doesn't have one - every value produces a stretch of some intensity, never a squeeze. If you need the opposite effect, that's a different tool.

Since this node is deprecated with no direct successor named in the current schema, treat it as feature-frozen - if the four parameters here don't get you the look you want, tuning harder is the only lever available inside this specific node. And as with the rest of the pack, a fresh ComfyUI-Apt_Preset install pulls a large, mostly-unrelated requirements.txt covering the pack's other 100+ nodes - there's a documented case of that failing to import cleanly. If you hit IMPORT FAILED, check the ComfyUI console for the real missing-package error first.

CategoryApt_Preset/🚫Deprecated/🚫

Inputs (6)

NameTypeDefaultDescription
imageIMAGE—
strengthFLOAT2.01–4—
directionCOMBO2 options: horizontal, vertical
positionFLOAT0.500.1–0.9—
stretch_widthFLOAT0.100.01–0.3—
transitionFLOAT0.050.01–0.1—

Outputs (1)

NameTypeDescription
IMAGEIMAGE—