Nodes/RyanOnTheInside/Flex Image Transform βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Flex Image Transform βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Reactive pan, rotate, and zoom

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Flex Image Transform βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • images
  • opt_feature
  • IMAGE
β—„strength1.00β–Ί
β—„feature_threshold0.00β–Ί
β—„feature_paramβ–Ύβ–Ί
β—„feature_moderelativeβ–Ί
β—„transform_typeβ–Ύβ–Ί
β—„x_value0.0β–Ί
β—„y_value0.0β–Ί
β—„edge_modeβ–Ύβ–Ί

The basic geometric transform node in RyanOnTheInside's Flex family - translate, rotate, or scale an image sequence - with the point of the whole thing being that the transform amount can be driven by a reactive Feature instead of a fixed keyframe curve. Think a subtle zoom that breathes with audio, or a pan that drifts with detected motion, without hand-animating anything.

How it works

transform_type picks the mode: translate (shift the image), rotate (spin it), or scale (zoom in/out) - and this choice determines what x_value/y_value actually mean. For translate, they're the pixel offset in each axis. For rotate, one of them typically drives the angle. For scale, they act as the zoom factor per axis. Both x_value and y_value range from -1000 to 1000, which is a wide net cast across three genuinely different transform types - the sane range for your actual use depends heavily on which transform_type you picked, so expect to dial in values by feel rather than trusting the raw numeric range as a guide.

edge_mode decides what happens at the frame's boundary once content shifts, rotates, or scales past the edge: extend stretches the edge pixels outward, wrap tiles the image around (content that exits one side re-enters the opposite side), reflect mirrors at the boundary, and none presumably leaves the revealed area transparent/empty. This matters more than it sounds - a translate or rotate with the wrong edge_mode can produce ugly smears or hard black borders where you didn't expect them.

feature_param can drive x_value or y_value (or None). feature_mode (relative/absolute), feature_threshold, and strength behave as elsewhere. Because transform_type is fixed per node instance (not itself feature-modulated), if you want, say, rotation and zoom both reacting independently, you'll chain two FlexImageTransform nodes rather than trying to get one to do both.

Inputs and outputs that matter

  • images - required.
  • transform_type - decide this first; it reframes what x_value/y_value mean.
  • x_value/y_value - your actual transform amount, once you know the mode.
  • edge_mode - easy to overlook, but it's the difference between a clean transform and visible artifacts at the frame edge.

Output is a single IMAGE.

How to install it

Via ComfyUI Manager, search "RyanOnTheInside." Manually:

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

then restart. No model download; this is a geometric image operation.

Common issues & troubleshooting

Black borders appearing after rotate or translate. That's edge_mode set to something that doesn't fill the revealed area - try extend, wrap, or reflect depending which looks most natural for your content; a solid-color background rotating will usually want extend, while a busy, textured background can often get away with wrap.

Values feel completely wrong for the effect you wanted. Since x_value/y_value mean different things depending on transform_type, a value tuned for translate (a pixel offset, potentially in the hundreds) will be wildly excessive if you switch to rotate (where a much smaller number is likely a full spin) or scale (where values near 0 barely zoom at all). Re-tune from scratch any time you change transform_type, don't assume old values carry over sensibly.

Reactive transform feels jittery instead of smooth. As with the rest of the Flex family, absolute feature_mode snaps directly to the feature's value each frame - if the feature itself is noisy, so is the transform. relative mode, or a smoothed upstream feature, will read as far more fluid motion.

CategoryRyanOnTheInside/FlexFeatures/Targets/Images

Inputs (10)

NameTypeDefaultDescription
strengthFLOAT1.000–1Overall strength of the effect (0.0 to 1.0) Higher values create more dramatic changes, while lower values are more subtle.
feature_thresholdFLOAT0.000–1Minimum feature value to trigger the effect (0.0 to 1.0) Only applies the effect when the feature value exceeds this threshold. Lower values make the effect more sensitive, higher values make it more selective.
feature_paramCOMBOChoose which parameter to modulate: - x_value: Dynamically adjust horizontal transform - y_value: Dynamically adjust vertical transform - None: No parameter modulation
feature_modeCOMBOrelativeHow to apply the feature modulation: - relative: Changes are centered around the original value - absolute: Changes scale directly from zero to the maximum
imagesIMAGEInput image sequence to be processed (IMAGE type)
transform_typeCOMBOType of transformation ('translate', 'rotate', 'scale')
x_valueFLOAT0.0-1000–1000X-axis transformation value (-1000.0 to 1000.0)
y_valueFLOAT0.0-1000–1000Y-axis transformation value (-1000.0 to 1000.0)
edge_modeCOMBO4 options: extend, wrap, reflect, none
opt_featureoptFEATUREOptional feature input for modulation Connect any feature node here to control the effect. Features can come from audio, motion, color, or other sources.

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”