generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting Up ComfyUI for Flux and Other Models #46
Open
papiche
wants to merge
4
commits into
Comfy-Org:main
Choose a base branch
from
papiche:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
title: "Setting Up ComfyUI for Flux and Other Models" | ||
description: "How to setup ComfyUI for flux and other models" | ||
version: "English" | ||
--- | ||
|
||
## Setting Up ComfyUI for Flux and Other Models | ||
|
||
### Model Placement | ||
|
||
First, let's discuss where to place different types of models in your ComfyUI folder structure: | ||
|
||
1. **Checkpoints**: Place in `ComfyUI/models/checkpoints/` | ||
- Examples: Flux1-dev-fp8, Flux1-schnell-fp8 | ||
|
||
2. **UNET Models**: Place in `ComfyUI/models/unet/` | ||
- Examples: flux1-dev.safetensors, flux1-schnell.safetensors | ||
|
||
3. **VAE Models**: Place in `ComfyUI/models/vae/` | ||
- Example: flux_vae.safetensors | ||
|
||
4. **CLIP Models**: Place in `ComfyUI/models/clip/` | ||
- Examples: t5xxl_fp16.safetensors, clip_l.safetensors | ||
|
||
5. **ControlNet Models**: Place in `ComfyUI/models/controlnet/` | ||
- Examples: instantx_flux_canny.safetensors, flux_depth.safetensors | ||
|
||
6. **LoRA Models**: Place in `ComfyUI/models/loras/` | ||
|
||
7. **Upscale Models**: Place in `ComfyUI/models/upscale_models/` | ||
|
||
## Getting Started with Flux Models | ||
|
||
### Flux Dev Model | ||
|
||
1. Download the Flux Dev model: | ||
- For UNET: `flux1-dev.safetensors` (23.8GB) | ||
- For FP8 Checkpoint: `flux1-dev-fp8` (17.2GB) | ||
|
||
2. Place the model in the appropriate folder as mentioned above. | ||
|
||
3. Use the following workflow example: | ||
- For UNET version: Load the model using the "Load Diffusion Model" node. | ||
- For FP8 Checkpoint version: Use the "Load Checkpoint" node and set CFG to 1.0. | ||
|
||
4. Set your prompt and negative prompt in the respective nodes. | ||
|
||
5. Connect the nodes and click "Queue Prompt" to generate an image. | ||
|
||
### Flux Schnell Model | ||
|
||
1. Download the Flux Schnell model: | ||
- For UNET: `flux1-schnell.safetensors` (23.8GB) | ||
- For FP8 Checkpoint: `flux1-schnell-fp8` (17.2GB) | ||
|
||
2. Place the model in the appropriate folder. | ||
|
||
3. Use a similar workflow to the Flux Dev model, but adjust for the Schnell version: | ||
- Schnell is a distilled 4-step model, so you may need to adjust your sampling settings accordingly. | ||
|
||
## Using ControlNet with Flux | ||
|
||
1. Download ControlNet models for Flux, such as: | ||
- InstantX Canny: `instantx_flux_canny.safetensors` | ||
- Depth ControlNet: `flux_depth.safetensors` | ||
|
||
2. Place these files in the `ComfyUI/models/controlnet/` directory. | ||
|
||
3. In your workflow, add a "ControlNet" node and connect it to your Flux model node. | ||
|
||
4. Load your input image and apply the appropriate preprocessing (e.g., Canny edge detection). | ||
|
||
5. Connect the preprocessed image to the ControlNet node and adjust settings as needed. | ||
|
||
## Tips for Using Flux and Other Recent Models | ||
|
||
1. **Memory Management**: For lower memory usage, you can use the FP8 versions of models or set the `weight_dtype` to FP8 in the "Load Diffusion Model" node[1][5]. | ||
|
||
2. **Prompt Engineering**: Flux models excel in visual quality and image detail, particularly for text generation and complex compositions. Experiment with detailed prompts to leverage these strengths[2]. | ||
|
||
3. **Workflow Optimization**: Use the ComfyUI Manager to easily install and manage custom nodes, which can enhance your Flux workflows[3]. | ||
|
||
4. **Upscaling**: Implement the SD Ultimate upscale node for high-quality image upscaling with Flux outputs[3]. | ||
|
||
5. **Face Detailing**: For SDXL workflows, consider using the Face Detailer (DDetailer) node from the Impact Pack to improve facial details in generated images[3]. | ||
|
||
By following these guidelines and experimenting with different workflows, you'll be able to harness the power of Flux and other recent models in ComfyUI effectively. Remember to always check for the latest updates and community-shared workflows to stay current with the rapidly evolving field of AI image generation. | ||
|
||
Citations: | ||
[1] https://www.youtube.com/watch?v=cjWuPcRZ1j0 | ||
[2] https://comfyui-wiki.com/en/tutorial/advanced/flux1-comfyui-guide-workflow-and-examples | ||
[3] https://stable-diffusion-art.com/comfyui/ | ||
[4] https://comfyui-wiki.com/en/interface/files | ||
[5] https://comfyanonymous.github.io/ComfyUI_examples/flux/ | ||
[6] https://stable-diffusion-art.com/flux-comfyui/ | ||
[7] https://stablediffusion3.net/blog-how-to-use-flux-comfyui-tutorial-46551 | ||
[8] https://www.youtube.com/watch?v=RMI8WviOjIk | ||
[9] https://www.youtube.com/watch?v=5sF5Dn5Rul8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these, would love to use the ComfyUI example workflow.
https://comfyanonymous.github.io/ComfyUI_examples/flux/
Can we link the model checkpoint files directly here + workflow so users don't need to search for the files?