Downloads · 30 days
57
6% of all-time downloads
mingyi456/Chroma1-HD-DF11-ComfyUI
Chroma1-HD-DF11-ComfyUI is a text-to-image model from mingyi456. Use it when you need an image from a text prompt. It is set up for diffusion-single-file. The card lists the license as apache-2.0.
After getting the DF11 compressed versions of Flux to work in ComfyUI, I wanted to try adapting the code to work with other model architectures. Chroma, as expected is easy to do, but I believe others will be harder.
Downloads · 30 days
57
6% of all-time downloads
All-time downloads
909
Public
Repo size
24.3 GB
Likes
4
Public
Click a slice to open those files.
.safetensors24.3 GB · 100%
From the Hugging Face model README
distilled_guidance_layers) in my original upload. There is <u>no need to download again</u> if you are not having any issues with the older version, but please either update to the latest version of my DF11 custom node fork, or update the patched pattern_dict as shown below if you are still using the official node. I apologize for my earlier oversight, and I will update the other Chroma-based models (just the Flash version for ComfyUI, the diffusers-native models come bundled with the correct pattern_dict in the config file) soon.After getting the DF11 compressed versions of Flux to work in ComfyUI, I wanted to try adapting the code to work with other model architectures. Chroma, as expected is easy to do, but I believe others will be harder.
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 (for either the diffusers library or ComfyUI), although compressing models that are of architectures that are unfamiliar to me might be more difficult.
Follow the instructions here: https://github.com/LeanModels/ComfyUI-DFloat11. Because the stock DF11 custom node currently only supports Flux-based models, the code needs to be manually patched to support Chroma (I intend to fork the repo and maybe submit a PR at some point, but this shall suffice for now). All that is needed is to explicitly add an entry for "Chroma" in the MODEL_TO_PATTERN_DICT dictionary. The patched code should be as follows:
class DFloat11ModelLoader:
"""
A custom node to load a DFloat11 diffusion model from the `diffusion_models` directory.
DFloat11 models are >30% smaller than their float16 counterparts, yet produce bit-for-bit identical outputs.
"""
MODEL_TO_PATTERN_DICT = {
"Flux": {
"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",
),
},
"Chroma": {
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",
),
}.
}
Finally, use the provided workflow json, or simply replace the "Load Diffusion Model" node of an existing Chroma workflow with the patched "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 image.

diffusersRefer to this model instead.
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",
),
}