Files
logtd-ComfyUI-Fluxtapoz/README.md
T
2024-11-27 22:59:10 -07:00

86 lines
3.5 KiB
Markdown

# 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](https://rf-inversion.github.io/))
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](https://github.com/logtd/ComfyUI-Fluxtapoz/blob/main/example_workflows/example_rf_inversion_updated.json) for RF-Inversion.
![rf_inversion](https://github.com/user-attachments/assets/f0517649-4dbb-4371-a8d5-3ae90e3b6368)
### RF-Inversion Stylization
RF-Inversion can also be used to stylize images.
Use [this workflow](https://github.com/logtd/ComfyUI-Fluxtapoz/blob/main/example_workflows/example_rf_inversion_stylization.json) to style images.
![rf_inversion_style](https://github.com/user-attachments/assets/bb1a1aef-74f1-4ad3-9687-d3d8d41ce7d1)
## RF-Edit (Unsampling from [RF-Solver-Edit](https://github.com/wangjiangshan0725/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](https://github.com/logtd/ComfyUI-Fluxtapoz/blob/main/example_workflows/example_rf_edit_workflow_alternative.json) for RF-Edit.
![rf_edit_wolf](https://github.com/user-attachments/assets/ad583ad0-7e04-4bc5-9d3c-f08d4cc493a0)
## 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](https://github.com/instantX-research/Regional-Prompting-FLUX).
Use [this workflow](https://github.com/logtd/ComfyUI-Fluxtapoz/blob/main/example_workflows/example_flux_regional.json) for regional prompting.
![ComfyUI_temp_kzsib_00029_](https://github.com/user-attachments/assets/364ea890-8585-43f4-9ffa-f0a24a775f27)
## 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_](https://github.com/user-attachments/assets/6e8bf072-dcc8-454e-bf97-b76a5694db91)
## Acknowledgements
[RF-Inversion](https://rf-inversion.github.io/)
```
@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](https://github.com/wangjiangshan0725/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}
}
```
[InstantX Regional Prompting](https://github.com/instantX-research/Regional-Prompting-FLUX)
```
@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}
}
```