ComfyDeploy: How ComfyUI-Fluxtapoz works in ComfyUI?

What is ComfyUI-Fluxtapoz?

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

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for ComfyUI-Fluxtapoz and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

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

Update [2024.10.16]

Stylization now works! rf_inversion_stylization

It can also be used to mix or style images (although I'm still working out the settings for this) rf_inverse_mix

Node Parameters

Outverse Flux Model Pred Node

  • Ensure "reverse_ode" is set to True on the "Outverse Flux Model Pred" node. Sometimes when users upgrade this repo it doesn't load the workflow correctly.

Flux Reverse ODE Sampler

  • latent_image -- the image to guide the sampling
  • start_step -- the step that the sampler starts guiding the sampling towards the image in "latent_image"
  • end_step -- the last step for guiding the sampling (not inclusive)
  • eta -- the strength of the guidance. The paper does not decrease this below 0.7
  • eta_trend -- how the eta should increase/decrease/stay constant between start_step and end_step

Flux Forward ODE Sampler

  • gamma -- the paper leaves this at 0.5

Guidance Suggestions

  • For sampling normal flux guidance works (~3.5)
  • For unsampling use 0

Common Issues

  • Overlayed images -- try changing your start step and/or Eta. A start step that is too late won't be able to influence the image generation properly
  • Not following edits -- try fewer steps (change start/end step) or lower eta
  • Make sure your steps on the Forward (unsampling) and Reverse (sampling) samplers are the same (recommended 28 each)

Other Inversion Techniques

Inverse Noise (unsampling via DDIM)

unsampling_example

Inject Inversed Noise

See example workflow for how to use this one. It's similar to inverse noise/unsampling, but has better adherence to the input image.

inject_inversed_noise_example inject_unsampled_noise_cowboy

Acknowledgements

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}
}