8000 Chroma as a FLUX.1 variant by hameerabbasi · Pull Request #11566 · huggingface/diffusers · GitHub
[go: up one dir, main page]

Skip to content

Chroma as a FLUX.1 variant #11566

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 Git 8000 Hub”, 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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

hameerabbasi
Copy link
Contributor

What does this PR do?

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Vargol
Copy link
Vargol commented May 17, 2025

Hi, is there a specific model repo this works with. I'm getting key errors loading the models from lodestones/Chroma and silveroxides/Chroma-GGUF

PR installed by using

$ pip uninstall diffusers
$ pip install git+https://github.com/huggingface/diffusers.git@refs/pull/11566/merge
$ grep chroma  lib/python3.11/site-packages/diffusers/models/transformers/transformer_flux.py 
INVALID_VARIANT_ERRMSG = "`variant` must be `'flux' or `'chroma'`."
        elif variant == "chroma":
        elif variant == "chroma":
        elif variant == "chroma":
        norm_out_cls = AdaLayerNormContinuous if variant != "chroma" else AdaLayerNormContinuousPruned
        is_chroma = isinstance(self.time_text_embed, CombinedTimestepTextProjChromaEmbeddings)
        if not is_chroma:
            if is_chroma:
            if is_chroma:
        if is_chroma:

I'm loading the models using

#ckpt_path="/Volumes/SSD2TB/AI/caches/models/chroma-unlocked-v29-Q8_0.gguf"
ckpt_path="/Volumes/SSD2TB/AI/caches/models/chroma-unlocked-v29.5.safetensors"

transformer = FluxTransformer2DModel.from_single_file(
    ckpt_path,
#   quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
    torch_dtype=torch.bfloat16,
    variant="chroma"
)

The full error is....

Traceback (most recent call last):
  File "/Volumes/SSD2TB/AI/Diffusers/gguf_chroma.py", line 48, in <module>
    transformer = FluxTransformer2DModel.from_single_file(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Volumes/SSD2TB/AI/Diffusers/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/Volumes/SSD2TB/AI/Diffusers/lib/python3.11/site-packages/diffusers/loaders/single_file_model.py", line 370, in from_single_file
    diffusers_format_checkpoint = checkpoint_mapping_fn(
                                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/Volumes/SSD2TB/AI/Diffusers/lib/python3.11/site-packages/diffusers/loaders/single_file_utils.py", line 2157, i
8EE0
n convert_flux_transformer_checkpoint_to_diffusers
    converted_state_dict["time_text_embed.timestep_embedder.linear_1.weight"] = checkpoint.pop(
                                                                                ^^^^^^^^^^^^^^^
KeyError: 'time_in.in_layer.weight'

@nitinmukesh
Copy link

@Vargol

This is still Draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0