TBG ETUR RF UntwistingRoPE Pipe
TBG ETUR RF UntwistingRoPE Pipe
- unofficial_extensions
- RF_UntwistingRoPE
- INFO
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_rk2is 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_EXTENSIONSinput 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_UntwistingRoPEinput 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_verboseback off unless you're actively debugging; it prints per-run trajectory info to the console.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | false | Default off. When enabled, ETUR applies its bundled RF Inversion + UntwistingRoPE runtime per tile/segment. |
| rf_mode | COMBO | rf_gamma_rk2 | 7 options: linear, rf_gamma, rf_gamma_rk2, rf_solver_2, endpoint_heun, fireflow, +1 |
| gamma | FLOAT | 0.500–1 | — |
| pmi_alpha | FLOAT | 0.000–1 | — |
| otip_strength | FLOAT | 0.350–1 | — |
| otip_clip_norm | FLOAT | 20.000–100 | — |
| beta | FLOAT | 50.000.01–100 | — |
| high_scale_start | FLOAT | 1.00-4–8 | — |
| high_scale_end | FLOAT | 0.00-4–8 | — |
| low_scale_start | FLOAT | 1.00-4–8 | — |
| low_scale_end | FLOAT | 3.00-4–8 | — |
| adain_strength | FLOAT | 0.500–1 | — |
| blocks | STRING | 0-999 | — |
| rf_verbose | BOOLEAN | false | — |
| untwisting_verbose | BOOLEAN | false | — |
| unofficial_extensionsopt | UNTWISTING_ROPE_EXTENSIONS | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| RF_UntwistingRoPE | RF_UntwistingRoPE_Pipe | — |
| INFO | STRING | — |