--- license: other license_name: flux-1-dev-non-commercial-license license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md language: - en base_model: - black-forest-labs/FLUX.1-dev base_model_relation: quantized pipeline_tag: text-to-image tags: - comfyui - diffusion-single-file --- For more information (including how to compress models yourself), check out https://huggingface.co/DFloat11 and https://github.com/LeanModels/DFloat11 Feel free to request for other models for compression as well, although compressing models that do not use the Flux architecture might be slightly tricky for me. ### How to Use #### ComfyUI Follow the instructions here: https://github.com/LeanModels/ComfyUI-DFloat11. After installing the DF11 custom node, use the provided workflow [json](flux1-dev-DF11-workflow.json), or simply replace the "Load Diffusion Model" node of an existing Flux workflow with the "DFloat11 Model Loader" node. If you run into any issues, feel free to leave a comment. The workflow is also embedded in the below [png](flux1-dev-DF11-workflow.png) image. ![](flux1-dev-DF11-workflow.png) #### `diffusers` Refer to this [model](https://huggingface.co/DFloat11/FLUX.1-dev-DF11) instead. ### Compression Details This is the `pattern_dict` for compressing Flux-based models in ComfyUI: ```python pattern_dict_comfyui = { "double_blocks\.\d+": ( "img_mod.lin", "img_attn.qkv", "img_attn.proj", "img_mlp.0", "img_mlp.2", "txt_mod.lin", "txt_attn.qkv", "txt_attn.proj", "txt_mlp.0", "txt_mlp.2", ), "single_blocks\.\d+": ( "linear1", "linear2", "modulation.lin", ), } ```