mingyi456/UnCanny-Photorealism-Chroma-DF11-ComfyUI

🤗 On Hugging Facetext-to-imageapache-2.049 GBotherHF checksums availableupdated today
Magnet

Update: I have uploaded the latest v1.3 update to this model

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 models whose architecture I am unfamiliar with might be slightly tricky for me.

The original BF16 weights used for the compression were obtained from https://civitai.com/models/2086389/uncanny-photorealism-chroma

How to Use

ComfyUI

Follow the instructions here: https://github.com/LeanModels/ComfyUI-DFloat11. Alternatively, you can install my own fork of the DF11 ComfyUI custom node: https://github.com/mingyi456/ComfyUI-DFloat11-Extended instead. After installing the DF11 custom node, simply replace the "Load Diffusion Model" node of an existing workflow with the "DFloat11 Model Loader" node. If you run into any issues, feel free to leave a comment.

diffusers

Refer to this model instead.

Compression Details

This is the pattern_dict for compressing Chroma-based models in ComfyUI:

pattern_dict_comfyui = {
    r"distilled_guidance_layer\.layers\.\d+": (
        "in_layer",
        "out_layer"        
    ),
    r"double_blocks\.\d+": (
        "img_attn.qkv",
        "img_attn.proj",
        "img_mlp.0",
        "img_mlp.2",
        "txt_attn.qkv",
        "txt_attn.proj",
        "txt_mlp.0",
        "txt_mlp.2",
    ),
    r"single_blocks\.\d+": (
        "linear1",
        "linear2",
    ),
}