Add support for LongCat-Image#12828
Conversation
yiyixuxu
left a comment
There was a problem hiding this comment.
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.
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.
are we only support single prompt? if so maybe can add a check in check_inputs
There was a problem hiding this comment.
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 |
|
@bot /style |
|
Style bot fixed some files and pushed the changes. |
|
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. |
|
My apologies. During further testing with additional examples, I identified an issue and have already implemented a fix. I’m not completely sure whether this change might affect your merge. |
|
load_lora_weights(), unload_lora_weights these doesn't work with LongCatImagePipeline. @junqiangwu |

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.