-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add support for LongCat-Image #12828
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 GitHub”, 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
base: main
Are you sure you want to change the base?
Conversation
yiyixuxu
left a comment
There was a problem hiding this 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 the PR!
looks really good to me, I left some very small feedbacks, I think we can merge this soon:)
we also need doc & tests but can work on that in a follow-up PR if you prefer. Let us know
src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Outdated
Show resolved
Hide resolved
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
yiyixuxu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! I left a few more comments
|
|
||
| def _encode_prompt( self, prompt ): | ||
| all_tokens = [] | ||
| for clean_prompt_sub, matched in split_quotation(prompt[0]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we only support single prompt? if so maybe can add a check in check_inputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We’ve updated the code so that the text-to-image pipeline now accepts multiple prompts, while the edit pipeline still takes a single prompt. Both behaviors are enforced via checks in check_inputs.
src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image_edit.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image_edit.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image_edit.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/longcat_image/pipeline_longcat_image_edit.py
Outdated
Show resolved
Hide resolved
|
I think you need to add the doc page into the index here https://github.com/huggingface/diffusers/blob/main/docs/source/en/_toctree.yml also can you run |
…dit.py Co-authored-by: YiYi Xu <yixu310@gmail.com>
…dit.py Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
|
Thanks for the feedback — we’ve updated the code accordingly and run make style and make fix-copies in this commit. Please let us know if you spot anything else that should be addressed. @yiyixuxu |
What does this PR do?
This PR introduces the LongCat-Image Series into the diffusers library. The LongCat-Image Series comprises powerful and highly efficient 6B-parameter models, featuring both a state-of-the-art image generation model and a versatile image editing model. Designed to be friendly for consumer-grade hardware, this series demonstrates strong capabilities in high-fidelity image synthesis and precise, controllable image editing. The technical report and checkpoints for both models have been released.
Thanks for the support of @yiyixuxu @apolinario.