Skip to content

Conversation

@josephrocca
Copy link
Contributor

@josephrocca josephrocca commented Oct 19, 2025

What does this PR do?

Chroma inference is currently incorrect, since the padding token should be added for the transformer forward pass, not for the T5 encoder forward pass. The T5 embedding step should use the regular attention mask.

This change fixes that to align with official code and ComfyUI.

I've also snuck in an update to use the final checkpoint in the docs/comments: https://huggingface.co/lodestones/Chroma1-HD


Top is before fix, bottom is after fix. I used lodestones/Chroma1-Base, since it's what I had on hand. Doesn't seem to be a huge difference, except for first column. Might have a stronger effect for shorter prompts, but I didn't test.

chroma_diffusers_t5_comparison

@josephrocca josephrocca marked this pull request as draft October 19, 2025 04:19
@josephrocca
Copy link
Contributor Author

Need to run a final test before it's ready for review, since I was testing on an older diffusers version.

@josephrocca
Copy link
Contributor Author

Okay all good. Unsure who to tag, but IIRC @sayakpaul merged Chroma impl originally.

@josephrocca josephrocca marked this pull request as ready for review October 19, 2025 04:35
Chroma is a text to image generation model based on Flux.

Original model checkpoints for Chroma can be found [here](https://huggingface.co/lodestones/Chroma).
Original model checkpoints for Chroma can be found [here](https://huggingface.co/lodestones/Chroma1-HD).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional. As if there's any other official compatible checkpoint released under https://huggingface.co/lodestones/, the users will likely notice it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://huggingface.co/lodestones/Chroma is actually a deprecated repo, rather than a hub for all Chroma models. I don't think there's currently a 'hub' repo. Did you mean to imply that it should link to https://huggingface.co/lodestones rather than https://huggingface.co/lodestones/Chroma or https://huggingface.co/lodestones/Chroma1-HD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some changes - unsure if this fixes your concerns.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing this!

@sayakpaul sayakpaul requested a review from yiyixuxu October 19, 2025 07:53
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@DN6
Copy link
Collaborator

DN6 commented Oct 21, 2025

@bot /style

@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2025

Style bot fixed some files and pushed the changes.

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.

4 participants