Extensions/ComfyUI-Fluxtapoz
ComfyUI Extension Runs on cloud

ComfyUI-Fluxtapoz

ComfyUI nodes for image editing with Flux, such as RF-Inversion and more

By logtd·Created 2 years ago·Updated 2 years ago· 1,392
logtd/ComfyUI-Fluxtapoz
Nodes22
On cloudRunnable
Categoryfluxtapoz, fluxtapoz/attn
Stars1,392
Updated2 years ago

Nodes (22)

Apply Flux Regional Conds

Where regional prompting actually enforces its masks

fluxtapoz
Configure Modified Flux

This is the node the whole Fluxtapoz pack is hiding behind

fluxtapoz
Create Flux Regional Cond

Give one corner of the image its own prompt

fluxtapoz
RF-Edit Forward Sampler

The RF-Edit half that records attention before you change anything

fluxtapoz
Flow Edit Guider

Skip the noise round-trip entirely

fluxtapoz
RF-Edit Reverse Sampler

The RF-Edit half that injects the saved attention and rebuilds

fluxtapoz
Flow Edit Sampler

The sampler that skips the inversion and goes straight to the edit

fluxtapoz
Flux Attention Override

Pick which attention layers the pack's tricks run on

fluxtapoz/attn
Flux DeGuidance

The tiny node that tells Flux how hard to follow your prompt

fluxtapoz
Flux Forward ODE Sampler

Turn an image back into noise, semantically

fluxtapoz
Flux Inverse Sampler

The no-frills inversion sampler for when you just want to unsample

fluxtapoz
Flux Mix Noise

The noise-mixing utility

fluxtapoz
Flux Reverse ODE Sampler

Walk noise back into your image

fluxtapoz
Flip Flux Sigmas

Flip your sigmas backwards without tripping over zero

fluxtapoz
Inverse Flux Model Pred

The inverse half of the RF-Edit model wrapper

fluxtapoz
Outverse Flux Model Pred

The outverse half that rebuilds your image after an edit

fluxtapoz
Apply Flux PAG Attention

More detail without a single extra checkpoint

fluxtapoz/attn
RF-Edit Prep Attn Inj

A pass-through node that exists to fight ComfyUI's execution order

fluxtapoz
Regional Style Model Apply

Bolt a reference style onto your Flux prompt — with a strength dial

fluxtapoz
RF-Edit Double Layers Override

The 19 double-block switches that decide how much of your original survives an RF-Edit

fluxtapoz
RF-Edit Single Layers Override

The single-block switches do the heavy lifting

fluxtapoz
Apply Flux SEG Attention

The sharper, fiddlier detail booster

fluxtapoz/attn
Readme

ComfyUI-Fluxtapoz

A set of nodes for editing images using Flux in ComfyUI

Examples

See example_workflows directory for examples.

No ControlNets are used in any of the following examples.

Rectified Flow Inversion (Unsampling from RF Inversion)

Admittedly this has some small differences between the example images in the paper, but it's very close. Will be updating as I find the issue. It's currently my recommended way to unsample an image for editing or style transfer.

Use this workflow for RF-Inversion.

rf_inversion

RF-Inversion Stylization

RF-Inversion can also be used to stylize images.

Use this workflow to style images.

rf_inversion_style

RF-Edit (Unsampling from RF-Solver-Edit)

RF-Edit is an alternative way to edit images. It may suit some use cases better than RF-Inversion and I recommend trying both.

Use this workflow for RF-Edit.

rf_edit_wolf

Fireflow (Unsampling from Fireflow inversion)

For a faster inversion method there is also Fireflow for image editing.

Use this workflow for Fireflow.

fireflow_pirate_example

Flow Edit

This is an implementation of image editing from FlowEdit.

It is an inversion free way to edit images.

Use this workflow to get started.

flux_flowedit

Regional Prompting

Regional prompting allows you to prompt specific areas of the latent to give more control. You can combine it with Redux, but Redux is so powerful it dominates the generation. This implementation is based on InstantX Regional Prompting.

Use this workflow for regional prompting.

ComfyUI_temp_kzsib_00029_

Enhancement

There are two nodes for Perturbed Attention Guidance (PAG) and Smoothed Energy Guidance (SEG) that can add detail to images.

The following from left to right: Vanilla Flux, PAG, SEG ComfyUI_00069_

Acknowledgements

Thank you to all researchers involved in the tools implemented in this repo.

<details> <summary>Click to see all acknowledgements</summary>

RF-Inversion

@article{rout2024rfinversion,
  title={Semantic Image Inversion and Editing using Rectified Stochastic Differential Equations},
  author={Litu Rout and Yujia Chen and Nataniel Ruiz and Constantine Caramanis and Sanjay Shakkottai and Wen-Sheng Chu},
  journal={arXiv preprint arXiv:2410.10792},
  year={2024}
}

RF-Solver-Edit

@article{wang2024taming,
  title={Taming Rectified Flow for Inversion and Editing},
  author={Wang, Jiangshan and Pu, Junfu and Qi, Zhongang and Guo, Jiayi and Ma, Yue and Huang, Nisha and Chen, Yuxin and Li, Xiu and Shan, Ying},
  journal={arXiv preprint arXiv:2411.04746},
  year={2024}
}

Fireflow

@misc{deng2024fireflowfastinversionrectified,
      title={FireFlow: Fast Inversion of Rectified Flow for Image Semantic Editing}, 
      author={Yingying Deng and Xiangyu He and Changwang Mei and Peisong Wang and Fan Tang},
      year={2024},
      eprint={2412.07517},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2412.07517}, 
}

FlowEdit

@article{kulikov2024flowedit,
	title = {FlowEdit: Inversion-Free Text-Based Editing Using Pre-Trained Flow Models},
	author = {Kulikov, Vladimir and Kleiner, Matan and Huberman-Spiegelglas, Inbar and Michaeli, Tomer},
	journal = {arXiv preprint arXiv:2412.08629},
	year = {2024}
	}

InstantX Regional Prompting

@article{chen2024training,
  title={Training-free Regional Prompting for Diffusion Transformers},
  author={Chen, Anthony and Xu, Jianjin and Zheng, Wenzhao and Dai, Gaole and Wang, Yida and Zhang, Renrui and Wang, Haofan and Zhang, Shanghang},
  journal={arXiv preprint arXiv:2411.02395},
  year={2024}
}
</details>