Buckets:

download
raw
12.8 kB
import"../chunks/DsnmJJEf.js";import{i as Q,h as b,C as O,H as a,a as w,D as U,E as B,s as T}from"../chunks/BLbO27j4.js";import{p as J,o as I,s as e,f as x,a as N,b as R,c as m,d as S,n,r as F}from"../chunks/jDjavuwI.js";const v='{"title":"LongCat-Image","local":"longcat-image","sections":[{"title":"Key Features","local":"key-features","sections":[],"depth":3},{"title":"Usage Example","local":"usage-example","sections":[],"depth":2},{"title":"LongCatImagePipeline","local":"diffusers.LongCatImagePipeline","sections":[],"depth":2},{"title":"LongCatImagePipelineOutput","local":"diffusers.pipelines.longcat_image.LongCatImagePipelineOutput","sections":[],"depth":2}],"depth":1}';var _=S('<meta name="hf:doc:metadata"/>'),L=S('<p></p> <!> <!> <div class="flex flex-wrap space-x-1"><img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/></div> <p>We introduce LongCat-Image, a pioneering open-source and bilingual (Chinese-English) foundation model for image generation, designed to address core challenges in multilingual text rendering, photorealism, deployment efficiency, and developer accessibility prevalent in current leading models.</p> <!> <ul><li>🌟 <strong>Exceptional Efficiency and Performance</strong>: With only <strong>6B parameters</strong>, LongCat-Image surpasses numerous open-source models that are several times larger across multiple benchmarks, demonstrating the immense potential of efficient model design.</li> <li>🌟 <strong>Superior Editing Performance</strong>: LongCat-Image-Edit model achieves state-of-the-art performance among open-source models, delivering leading instruction-following and image quality with superior visual consistency.</li> <li>🌟 <strong>Powerful Chinese Text Rendering</strong>: LongCat-Image demonstrates superior accuracy and stability in rendering common Chinese characters compared to existing SOTA open-source models and achieves industry-leading coverage of the Chinese dictionary.</li> <li>🌟 <strong>Remarkable Photorealism</strong>: Through an innovative data strategy and training framework, LongCat-Image achieves remarkable photorealism in generated images.</li> <li>🌟 <strong>Comprehensive Open-Source Ecosystem</strong>: We provide a complete toolchain, from intermediate checkpoints to full training code, significantly lowering the barrier for further research and development.</li></ul> <p>For more details, please refer to the comprehensive <a href="https://arxiv.org/abs/2412.11963" rel="nofollow"><strong><em>LongCat-Image Technical Report</em></strong></a></p> <!> <!> <p>This pipeline was contributed by LongCat-Image Team. The original codebase can be found <a href="https://github.com/meituan-longcat/LongCat-Image" rel="nofollow">here</a>.</p> <p>Available models:</p> <div style="overflow-x: auto; margin-bottom: 16px;"><table style="border-collapse: collapse; width: 100%;"><thead><tr><th style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de; background-color: #f6f8fa;">Models</th><th style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de; background-color: #f6f8fa;">Type</th><th style="padding: 8px; border: 1px solid #d0d7de; background-color: #f6f8fa;">Description</th><th style="padding: 8px; border: 1px solid #d0d7de; background-color: #f6f8fa;">Download Link</th></tr></thead><tbody><tr><td style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de;">LongCat‑Image</td><td style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de;">Text‑to‑Image</td><td style="padding: 8px; border: 1px solid #d0d7de;">Final Release. The standard model for out‑of‑the‑box inference.</td><td style="padding: 8px; border: 1px solid #d0d7de;"><span style="white-space: nowrap;">🤗&nbsp;<a href="https://huggingface.co/meituan-longcat/LongCat-Image">Huggingface</a></span></td></tr><tr><td style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de;">LongCat‑Image‑Dev</td><td style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de;">Text‑to‑Image</td><td style="padding: 8px; border: 1px solid #d0d7de;">Development. Mid-training checkpoint, suitable for fine-tuning.</td><td style="padding: 8px; border: 1px solid #d0d7de;"><span style="white-space: nowrap;">🤗&nbsp;<a href="https://huggingface.co/meituan-longcat/LongCat-Image-Dev">Huggingface</a></span></td></tr><tr><td style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de;">LongCat‑Image‑Edit</td><td style="white-space: nowrap; padding: 8px; border: 1px solid #d0d7de;">Image Editing</td><td style="padding: 8px; border: 1px solid #d0d7de;">Specialized model for image editing.</td><td style="padding: 8px; border: 1px solid #d0d7de;"><span style="white-space: nowrap;">🤗&nbsp;<a href="https://huggingface.co/meituan-longcat/LongCat-Image-Edit">Huggingface</a></span></td></tr></tbody></table></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>The pipeline for text-to-image generation.</p></div> <ul><li>all</li> <li><strong>call</strong></li></ul> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Output class for Stable Diffusion pipelines.</p></div> <!> <p></p>',1);function W(y,h){J(h,!1),I(()=>{new URLSearchParams(window.location.search).get("fw")}),Q();var s=L();b("1301cws",g=>{var c=_();T(c,"content",v),N(g,c)});var o=e(x(s),2);O(o,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var l=e(o,2);a(l,{title:"LongCat-Image",local:"longcat-image",headingTag:"h1"});var r=e(l,6);a(r,{title:"Key Features",local:"key-features",headingTag:"h3"});var V=e(r,6);a(V,{title:"Usage Example",local:"usage-example",headingTag:"h2"});var d=e(V,2);w(d,{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBkaWZmdXNlcnMlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTG9uZ0NhdEltYWdlUGlwZWxpbmUlMEElMEF3ZWlnaHRfZHR5cGUlMjAlM0QlMjB0b3JjaC5iZmxvYXQxNiUwQXBpcGUlMjAlM0QlMjBMb25nQ2F0SW1hZ2VQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIybWVpdHVhbi1sb25nY2F0JTJGTG9uZ0NhdC1JbWFnZSUyMiUyQyUyMGR0eXBlJTNEdG9yY2guYmZsb2F0MTYlMjApJTBBcGlwZS50bygnY3VkYScpJTIwJTIwJTIzJTIwb3IlMjAlMjJtcHMlMjIlMkMlMjAlMjJ4cHUlMjIlMkMlMjAlMjJjcHUlMjIlMEElMjMlMjBwaXBlLmVuYWJsZV9tb2RlbF9jc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QyVFNyVBQSU4MSVFNiU5OCVCRSVFNSU4NyVCQSVFNCVCQSVCQSVFNyU4OSVBOSVFNyU5QSU4NCVFNCVCQyU5OCVFOSU5QiU4NSVFNCVCOCU4RSVFNCVCQiU4RSVFNSVBRSVCOSVFMyU4MCU4MiclMEFpbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwaGVpZ2h0JTNENzY4JTJDJTBBJTIwJTIwJTIwJTIwd2lkdGglM0QxMzQ0JTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q0LjAlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTAlMkMlMEElMjAlMjAlMjAlMjBudW1faW1hZ2VzX3Blcl9wcm9tcHQlM0QxJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEdG9yY2guR2VuZXJhdG9yKCUyMmNwdSUyMikubWFudWFsX3NlZWQoNDMpJTJDJTBBJTIwJTIwJTIwJTIwZW5hYmxlX2NmZ19yZW5vcm0lM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwZW5hYmxlX3Byb21wdF9yZXdyaXRlJTNEVHJ1ZSUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoZicuJTJGbG9uZ2NhdF9pbWFnZV90MmlfZXhhbXBsZS5wbmcnKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> diffusers
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LongCatImagePipeline
weight_dtype = torch.bfloat16
pipe = LongCatImagePipeline.from_pretrained(<span class="hljs-string">&quot;meituan-longcat/LongCat-Image&quot;</span>, dtype=torch.bfloat16 )
pipe.to(<span class="hljs-string">&#x27;cuda&#x27;</span>) <span class="hljs-comment"># or &quot;mps&quot;, &quot;xpu&quot;, &quot;cpu&quot;</span>
<span class="hljs-comment"># pipe.enable_model_cpu_offload()</span>
prompt = <span class="hljs-string">&#x27;一个年轻的亚裔女性,身穿黄色针织衫,搭配白色项链。她的双手放在膝盖上,表情恬静。背景是一堵粗糙的砖墙,午后的阳光温暖地洒在她身上,营造出一种宁静而温馨的氛围。镜头采用中距离视角,突出她的神态和服饰的细节。光线柔和地打在她的脸上,强调她的五官和饰品的质感,增加画面的层次感与亲和力。整个画面构图简洁,砖墙的纹理与阳光的光影效果相得益彰,突显出人物的优雅与从容。&#x27;</span>
image = pipe(
prompt,
height=<span class="hljs-number">768</span>,
width=<span class="hljs-number">1344</span>,
guidance_scale=<span class="hljs-number">4.0</span>,
num_inference_steps=<span class="hljs-number">50</span>,
num_images_per_prompt=<span class="hljs-number">1</span>,
generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">43</span>),
enable_cfg_renorm=<span class="hljs-literal">True</span>,
enable_prompt_rewrite=<span class="hljs-literal">True</span>,
).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">f&#x27;./longcat_image_t2i_example.png&#x27;</span>)`,lang:"py",wrap:!1});var p=e(d,8);a(p,{title:"LongCatImagePipeline",local:"diffusers.LongCatImagePipeline",headingTag:"h2"});var i=e(p,2),u=m(i);U(u,{name:"class diffusers.LongCatImagePipeline",anchor:"diffusers.LongCatImagePipeline",source:"https://github.com/huggingface/diffusers/blob/vr_14693/src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py#L205",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": Qwen2_5_VLForConditionalGeneration"},{name:"tokenizer",val:": Qwen2Tokenizer"},{name:"text_processor",val:": Qwen2VLProcessor"},{name:"transformer",val:": LongCatImageTransformer2DModel"}]}),n(2),F(i);var C=e(i,4);a(C,{title:"LongCatImagePipelineOutput",local:"diffusers.pipelines.longcat_image.LongCatImagePipelineOutput",headingTag:"h2"});var t=e(C,2),M=m(t);U(M,{name:"class diffusers.pipelines.longcat_image.LongCatImagePipelineOutput",anchor:"diffusers.pipelines.longcat_image.LongCatImagePipelineOutput",source:"https://github.com/huggingface/diffusers/blob/vr_14693/src/diffusers/pipelines/longcat_image/pipeline_output.py#L10",parameters:[{name:"images",val:": list"}],parametersDescription:[{anchor:"diffusers.pipelines.longcat_image.LongCatImagePipelineOutput.images",description:`<strong>images</strong> (<code>list[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or numpy array of shape <code>(batch_size, height, width, num_channels)</code>. PIL images or numpy array present the denoised images of the diffusion pipeline.`,name:"images"}]}),n(2),F(t);var f=e(t,2);B(f,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/longcat_image.md"}),n(2),N(y,s),R()}export{W as component};

Xet Storage Details

Size:
12.8 kB
·
Xet hash:
0ae43e95579067cced4931f8afba9c32b70b29bdf7599d774c3bd489ecd396dd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.