Nodes/comfyui_bmad_nodes/RemapInsideParabolasAdvanced
ComfyUI Node Runs on cloud

RemapInsideParabolasAdvanced

Curve-fit fixes for when the simple parabola warp comes out twisted

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
RemapInsideParabolasAdvanced
  • dst_mask_with_2_parabolas
  • REMAP
curve_wise_adjust1.00
ortho_wise_adjust1.00
flip_orthofalse

The simple RemapInsideParabolas node is great right up until the moment the warp comes out wrong. The band hugs one curve fine but squashes against the other, or the whole thing drifts sideways, and there's not a single knob to reach for - just one mask input and a prayer. That's exactly the gap this node fills. It's the same two-parabola bend, but with three adjustment dials so you can fix the ways the simple version goes off.

Same family rules: it's a REMAP generator, output feeds the Remap node. RemapInsideParabolasAdvanced → Remap → image.

How it works

The mechanism is the same as the simple version - fit parabolas to the two curves in your mask, map a straight band of the source between them - but the mapping gets per-axis correction before it's applied. There are two directions in play along the band: the curve-wise direction (along the length of the parabolas) and the ortho-wise direction (perpendicular, across the band). Each gets its own adjustment factor, applied as a power curve so the spacing can be compressed or expanded non-linearly.

  • curve_wise_adjust (0.3–2, default 1) - stretches or compresses the mapping along the length of the curves. Values under 1 compress toward the center, over 1 expand it. This fixes "the middle of the band is bunched up."
  • ortho_wise_adjust (1–3, default 1) - controls the distribution across the band, between the two curves.
  • flip_ortho (BOOLEAN) - swaps which way the ortho adjustment is applied, for when the band's distortion is mirrored.

The out-of-bounds bookkeeping is handled internally (the source code marks invalid regions so nothing bleeds in from outside the curves).

The inputs and output

  • dst_mask_with_2_parabolas (MASK) - the same two-curve mask as the simple version.
  • curve_wise_adjust, ortho_wise_adjust, flip_ortho - the three dials above.

Output: REMAP, at the mask's dimensions.

When to use it over the simple version

Honestly? Almost always, once you know the concept works. The simple node proves the shape; this one makes it right. The workflow is: get the curves close with the simple version, then swap in Advanced and correct the residual bunching - usually curve_wise_adjust first, since that's where asymmetric text-wrapping visibly fails. And if flipping the ortho direction suddenly makes everything worse, flip it back - the flip_ortho toggle exists precisely because "which way is up" isn't obvious until you try both.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_bmad_nodes

restart, or grab comfyui_bmad_nodes via ComfyUI Manager. OpenCV requirement covers it; no model downloads.

It's a fiddly node in a niche corner of the pack, and it won't save you if your mask curves are garbage - no amount of curve_wise_adjust fixes a hand-drawn squiggle that isn't a parabola. Draw clean curves first; use the dials to refine, not to rescue.

CategoryBmad/CV/Transform

Inputs (4)

NameTypeDefaultDescription
dst_mask_with_2_parabolasMASK
curve_wise_adjustFLOAT1.000.3–2
ortho_wise_adjustFLOAT1.001–3
flip_orthoBOOLEANfalse

Outputs (1)

NameTypeDescription
REMAPREMAP