Flux - How to for ComfyUI (Patreon)
Downloads
Missing 2 full-res photos, 2 files, as this post has not yet been imported.
Content
Installation steps for Comfy
Minimum Hardware Requirements
VRAM: 8-12GB+ (16-24gb recommended)
Steps to Follow
Update your Comfy UI
If you don't have Comfy, here's how to install it: https://youtu.be/KTPLOqAMR0s
Download Necessary Models
Download t5xxl_fp8_e4m3fn.safetensors and clip_l.safetensors from Hugging Face.
Place these files in the ComfyUI/models/clip/ directory.
If you have high vram and ram, you can download the FP16 version (t5xxl_fp16.safetensors) for better results. For lower memory usage, stick with t5xxl_fp8_e4m3fn.safetensors.
Download VAE Model
Download the VAE model ae.safetensors / ae.sft from https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/main
Place the file in the ComfyUI/models/vae/ folder.
Download UNet Model
Download flux1-schnell.sft from https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/main
Place the file in the ComfyUI/models/unet/ folder.
Optional: High vram usage, flux1-dev.sft from https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/main
Workflow
https://comfyanonymous.github.io/ComfyUI_examples/flux/
Resolution table, as posted by Aplakka on Reddit:
2.0 MP (Flux maximum)
1:1 exact 1448 x 1448, rounded 1408 x 1408
3:2 exact 1773 x 1182, rounded 1728 x 1152
4:3 exact 1672 x 1254, rounded 1664 x 1216
16:9 exact 1936 x 1089, rounded 1920 x 1088
21:9 exact 2212 x 948, rounded 2176 x 960
1.0 MP
1:1 exact 1024 x 1024
3:2 exact 1254 x 836, rounded 1216 x 832
4:3 exact 1182 x 887, rounded 1152 x 896
16:9 exact 1365 x 768, rounded 1344 x 768
21:9 exact 1564 x 670, rounded 1536 x 640
Realism LORA Available here:
https://huggingface.co/comfyanonymous/flux_RealismLora_converted_comfyui
LOW VRAM USAGE WITH NF4
Download NF4 v2 model https://huggingface.co/lllyasviel/flux1-dev-bnb-nf4/tree/main
Place in ComfyUI/models/checkpoints/ (not UNET as other Flux models)
Go into your custom nodes folder with cmd/terminal/powershell
git clone https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4.git
Go into Custom nodes bitsandbytes folder
pip install -r requirements.txt
Restart comfy
Load the model from CheckpointLoaderNF4 node.
TROUBLESHOOTING - NF4 Not loading after all steps completed:
Double check you have installed bitsandbytes (pip install -r requirements.txt)
Go into the folder for the Manager, edit the config.ini and change the security setting from 'normal' to 'weak'. Run Comfy, go into the manager, change the channel to 'dev' then search for the node 'NF4'.
EXPERIMENTAL:
Get Flux to run on lower memory machines (UNTESTED BY ME): https://gist.github.com/AmericanPresidentJimmyCarter/873985638e1f3541ba8b00137e7dacd9
There's now a ControlNet canny model available for download here:
https://huggingface.co/XLabs-AI/flux-controlnet-canny/tree/main
Files
Previews only