Nodes/ComfyUI-DiT360Plus/DiT360 Image Inverter
ComfyUI Node

DiT360 Image Inverter

The slow, careful step that lets you edit a panorama without wrecking it

By thomashollier·Created 7 months ago·Updated 3 months ago· 3
DiT360 Image Inverter
  • pipeline
  • image
  • inverted_data
source_prompt
num_inversion_steps50
gamma1.00

If you want to change one region of an existing panorama - swap the sky, remove a building, extend the ground past the edge - the naive approach is img2img: feed the image in, mask a region, denoise. And it sort of works, except everything you didn't ask to change drifts too. The DiT360ImageInverter exists to fix that, and it does so by being deliberately slow.

What it is

This is the encode half of RF-Inversion (Rout et al., 2024), the rectified-flow editing recipe that the pack's DiT360 Panorama Editor depends on. The idea: instead of starting an edit from random noise, you run the source panorama forward through the ODE for a controlled number of steps until it lands in a latent that, when denoised, reconstructs the original nearly perfectly. Then the editor takes over and redirects only the masked tokens. Invert first, edit second, preserve the rest.

The cost is real. Inversion runs the transformer roughly num_inversion_steps times at batch size 1 - at the default 50 steps that's 50 passes through a 12B model before the editor even starts its ~100 passes. This is not a snappy node, and it's not meant to be. If you just want a quick regional repaint, the pack's Kontext Panorama Editor does the same job with zero inversion. Reach for this path when you want the source preserved faithfully and you're willing to wait.

Inputs that matter

  • pipeline - from Flux Panorama Loader. Must have the DiT360 LoRA loaded or the inversion is pointless.
  • image - your source panorama. It should be 2:1 equirectangular; the node will auto-resize anything else to a 2:1, 16px-aligned canvas (using LANCZOS), so feeding it a square by accident isn't fatal, just lossy.
  • source_prompt - optional description of the image. Empty means unconditional inversion, which is fine and often preferable; a good description can help the edit stay coherent with the scene, but a wrong one can steer it.
  • num_inversion_steps - 50 is the recommended default. More steps = more faithful inversion = the edit reconstructs the source better but costs more. Don't chase 150 on a 16GB card.
  • gamma - inversion fidelity, 0–2, default 1.0. Higher sticks closer to the source; the tooltip's recommendation of 1.0 is a fine starting point.

The single output is inverted_data (type DIT360_INVERTED) - a bundle of the inverted latents plus the dimensions the editor needs. It wires straight into DiT360 Panorama Editor.

The standard workflow

Flux Panorama Loader -> DiT360 Image Inverter -> DiT360 Panorama Editor -> 360 Edge Blender
Load Image (panorama) ----^                        ^
Load Image (mask) -> DiT360 Mask Processor --------'

Load the panorama into the inverter and (via a separate Load Image) into the editor's mask path - the editor needs the original image context plus the processed mask, and the inverter needs the source tensor.

Common issues

  • Steps mismatch. The editor's steps should match the inversion steps - the pack's editing math assumes the two align. 50/50 is the boring, correct answer.
  • "It's so slow." Expected. Run it once, cache the inverted_data in a primitive if you're iterating on prompts, and only re-invert if you changed the source image.
  • Edits look nothing like the source. gamma up toward 1.5 and check tau on the editor side - preservation is governed by both ends of the chain.
CategoryDiT360Plus/editing

Inputs (5)

NameTypeDefaultDescription
pipelineDIT360_PIPELINEDiT360 pipeline from the Pipeline Loader node.
imageIMAGESource panoramic image to invert. Should be 2:1 equirectangular.
source_promptSTRINGDescription of the source image. Can be empty for unconditional inversion.
num_inversion_stepsINT5010–200Number of inversion steps. More steps = more accurate inversion. Recommended: 50.
gammaFLOAT1.000–2Inversion fidelity. Higher = more faithful to source. Recommended: 1.0.

Outputs (1)

NameTypeDescription
inverted_dataDIT360_INVERTED