ComfyUI Node

TBG ETUR RF UntwistingRoPE Pipe

TBG ETUR RF UntwistingRoPE Pipe

By Ltamann·Created about a year ago·Updated 19 days ago· 156
TBG ETUR RF UntwistingRoPE Pipe
  • unofficial_extensions
  • RF_UntwistingRoPE
  • INFO
enabledfalse
rf_moderf_gamma_rk2
gamma0.50
pmi_alpha0.00
otip_strength0.35
otip_clip_norm20.00
beta50.00
high_scale_start1.00
high_scale_end0.00
low_scale_start1.00
low_scale_end3.00
adain_strength0.50
blocks0-999
rf_verbosefalse
untwisting_verbosefalse

This is the node you will almost certainly never touch, and that's fine - it exists so the people who need it don't have to dig through the Refiner's internals. It's a configuration pipe for ETUR's bundled RF Inversion + UntwistingRoPE runtime, which the Refiner can apply per-tile to keep reference-image conditioning aligned. Think of it as the settings sheet for an optional, experimental alignment system: the node's only job is to build a settings object and hand it to the Refiner via its RF_UntwistingRoPE input. Output 2 (INFO) is just the settings dict serialized as a string, handy for confirming what got passed.

If you're here because a beginner guide sent you: leave enabled off. The tooltip says it plainly - "Default off. When enabled, ETUR applies its bundled RF Inversion + UntwistingRoPE runtime per tile/segment." It's default off for a reason.

How it works

RF inversion is a way of inverting a rectified-flow (RF) diffusion model - working backward from a target image to recover the noise trajectory that produced it, which is how you get an exact reference to steer refinement. UntwistingRoPE is the alignment trick layered on top: it "untwists" the rotary position embeddings in the model's attention so a reference conditioning that was encoded at a different resolution or position stays meaningfully aligned when it's injected into each tile's sampling. Put together, they let the Refiner do per-tile refinement with a strong reference anchor instead of letting each tile drift.

The settings are deep water: rf_mode picks the inversion solver (linear, rf_gamma, rf_gamma_rk2, rf_solver_2, endpoint_heun, fireflow, flowturbo_pc - default rf_gamma_rk2); gamma, beta, and pmi_alpha tune the RF inversion itself; otip_strength and otip_clip_norm govern the "optimal transport interpolation" style alignment; the four *_scale_start/end values define a high/low scale window; and adain_strength blends in adaptive instance normalization to match style statistics. blocks (default "0-999") selects which transformer blocks the untwisting applies to. The two verbose toggles just add console spam for debugging.

Inputs

  • enabled (off) - the master switch. Off means the whole pipe is inert.
  • rf_mode - the inversion solver. rf_gamma_rk2 is the default and is where you should stay until you have a reason to move.
  • blocks - block range for untwisting, "0-999" = all of them.
  • rf_verbose / untwisting_verbose - debug output.
  • unofficial_extensions (optional) - a UNTWISTING_ROPE_EXTENSIONS input for extra runtime hooks.

Output: RF_UntwistingRoPE (a RF_UntwistingRoPE_Pipe) to feed the Refiner, plus INFO string.

Install

Part of the whole pack - Manager ("TBG Enhanced Upscaler") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Ltamann/ComfyUI-TBG-ETUR
cd ComfyUI-TBG-ETUR && pip install -r requirements.txt

Restart ComfyUI. The RF runtime is vendored inside the pack (py/vendor/tbg_untwisting_rope_runtime), so it needs torch and the pack's dependencies but no extra model downloads of its own.

Common issues

  • "I enabled it and everything got slower / weirder" - yes. This is an experimental per-tile runtime with a trajectory cache and debug stores. It's not a quality knob to try "for fun." Enable it only when you have a specific reference-alignment problem, and expect to tune.
  • Nothing changes when enabled - the pipe only takes effect if it's actually wired into the Refiner's RF_UntwistingRoPE input and the Refiner is running a mode that honors it. If the wire's missing, the settings are just riding along in the graph.
  • Verbose output is overwhelming - turn rf_verbose back off unless you're actively debugging; it prints per-run trajectory info to the console.
CategoryTBG/ETUR Tiled Upscaler and Refiner

Inputs (16)

NameTypeDefaultDescription
enabledBOOLEANfalseDefault off. When enabled, ETUR applies its bundled RF Inversion + UntwistingRoPE runtime per tile/segment.
rf_modeCOMBOrf_gamma_rk27 options: linear, rf_gamma, rf_gamma_rk2, rf_solver_2, endpoint_heun, fireflow, +1
gammaFLOAT0.500–1
pmi_alphaFLOAT0.000–1
otip_strengthFLOAT0.350–1
otip_clip_normFLOAT20.000–100
betaFLOAT50.000.01–100
high_scale_startFLOAT1.00-4–8
high_scale_endFLOAT0.00-4–8
low_scale_startFLOAT1.00-4–8
low_scale_endFLOAT3.00-4–8
adain_strengthFLOAT0.500–1
blocksSTRING0-999
rf_verboseBOOLEANfalse
untwisting_verboseBOOLEANfalse
unofficial_extensionsoptUNTWISTING_ROPE_EXTENSIONS

Outputs (2)

NameTypeDescription
RF_UntwistingRoPERF_UntwistingRoPE_Pipe
INFOSTRING