Nodes/ComfyUI-Fluxtapoz/Inverse Flux Model Pred
ComfyUI Node Runs on cloud

Inverse Flux Model Pred

The inverse half of the RF-Edit model wrapper

By logtd·Created 2 years ago·Updated 2 years ago· 1,392
Inverse Flux Model Pred
  • model
  • MODEL
max_shift1.15
base_shift0.50
width1024
height1024

InFluxModelSamplingPred is a model wrapper for the "unsample" side of RF-Edit and Fireflow. It takes your Flux model and reconfigures how its output is interpreted during the forward (noise-adding) pass, so the inversion half of an edit produces a latent that the reverse half can faithfully rebuild. Like its counterpart OutFluxModelSamplingPred, it exists because running a model backwards isn't just running it with flipped sigmas - the prediction math needs to be swapped too.

What it changes

Flux normally works in a "velocity/flow" prediction regime where the model output is combined with the input to estimate the clean sample. For inversion you want a regime where the model output is treated as-is - that's what the pack's InverseCONST sampling type does: calculate_denoised returns the model output directly, and noise scaling leaves the latent alone. This node clones your model, attaches that sampling behavior to a ModelSamplingFlux base, and hands you the patched model back.

The four inputs are the same shift parameters ComfyUI's own ModelSamplingFlux uses:

  • max_shift (default 1.15) and base_shift (default 0.5) - the endpoints that define how the timestep shift scales with resolution.
  • width and height (default 1024) - used to compute the actual shift for your latent's resolution. If your image isn't square, set these to match it; the shift formula interpolates between base and max shift by resolution.

Outputs

One MODEL, which you feed onward into the pack's RF-Edit plumbing - in the example workflow it goes in front of the flip/sampler stage, with OutFluxModelSamplingPred handling the other (resample) end. It needs the modified Flux blocks from ConfigureModifiedFlux in the chain to be useful.

Installation

The usual: ComfyUI Manager → search "ComfyUI-Fluxtapoz" → install → restart, or git clone https://github.com/logtd/ComfyUI-Fluxtapoz into custom_nodes. Nothing to download; einshape is the only dependency.

Common issues

The most common mistake is using this node on both ends of an RF-Edit graph. The forward pass and the reverse pass want different prediction regimes - that's the whole reason the pack ships two nodes. If your "edited" output looks like noise or the structure comes back destroyed, check that the inverse wrapper is on the unsample side and the outverse wrapper on the resample side, not both the same. And if you resized your input, update width/height here too - the defaults assume 1024×1024, and the shift drives the whole schedule.

Categoryfluxtapoz

Inputs (5)

NameTypeDefaultDescription
modelMODEL
max_shiftFLOAT1.150–100
base_shiftFLOAT0.500–100
widthINT102416–16384
heightINT102416–16384

Outputs (1)

NameTypeDescription
MODELMODEL