Buckets:
| import{s as En,o as Vn,n as dn}from"../chunks/scheduler.53228c21.js";import{S as zn,i as Ln,e as i,s as o,c as p,h as Hn,a as l,d as n,b as a,f as k,g as c,j as b,k as I,l as t,m as d,n as g,t as h,o as f,p as _}from"../chunks/index.cac5d66a.js";import{C as Xn}from"../chunks/CopyLLMTxtMenu.efae84b2.js";import{D as x}from"../chunks/Docstring.494cc782.js";import{C as Oe}from"../chunks/CodeBlock.606cbaf4.js";import{E as ln}from"../chunks/ExampleCodeBlock.3b7276d8.js";import{H as qe,E as Rn}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.de76e98b.js";function Dn(W){let m,U="Examples:",T,u,w;return u=new Oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hUGlwZWxpbmUlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmxvZGVzdG9uZXMlMkZDaHJvbWExLUhEJTIyJTBBY2twdF9wYXRoJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmxvZGVzdG9uZXMlMkZDaHJvbWExLUhEJTJGYmxvYiUyRm1haW4lMkZDaHJvbWExLUhELnNhZmV0ZW5zb3JzJTIyJTBBdHJhbnNmb3JtZXIlMjAlM0QlMjBDaHJvbWFUcmFuc2Zvcm1lcjJETW9kZWwuZnJvbV9zaW5nbGVfZmlsZShja3B0X3BhdGglMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUlMjAlM0QlMjBDaHJvbWFQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMkMlMEElMjAlMjAlMjAlMjB0cmFuc2Zvcm1lciUzRHRyYW5zZm9ybWVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUyQyUwQSklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBcHJvbXB0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyQSUyMGhpZ2gtZmFzaGlvbiUyMGNsb3NlLXVwJTIwcG9ydHJhaXQlMjBvZiUyMGElMjBibG9uZGUlMjB3b21hbiUyMGluJTIwY2xlYXIlMjBzdW5nbGFzc2VzLiUyMFRoZSUyMGltYWdlJTIwdXNlcyUyMGElMjBib2xkJTIwdGVhbCUyMGFuZCUyMHJlZCUyMGNvbG9yJTIwc3BsaXQlMjBmb3IlMjBkcmFtYXRpYyUyMGxpZ2h0aW5nLiUyMFRoZSUyMGJhY2tncm91bmQlMjBpcyUyMGElMjBzaW1wbGUlMjB0ZWFsLWdyZWVuLiUyMFRoZSUyMHBob3RvJTIwaXMlMjBzaGFycCUyMGFuZCUyMHdlbGwtY29tcG9zZWQlMkMlMjBhbmQlMjBpcyUyMGRlc2lnbmVkJTIwZm9yJTIwdmlld2luZyUyMHdpdGglMjBhbmFnbHlwaCUyMDNEJTIwZ2xhc3NlcyUyMGZvciUyMG9wdGltYWwlMjBlZmZlY3QuJTIwSXQlMjBsb29rcyUyMHByb2Zlc3Npb25hbGx5JTIwZG9uZS4lMjIlMEElNUQlMEFuZWdhdGl2ZV9wcm9tcHQlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjJsb3clMjBxdWFsaXR5JTJDJTIwdWdseSUyQyUyMHVuZmluaXNoZWQlMkMlMjBvdXQlMjBvZiUyMGZvY3VzJTJDJTIwZGVmb3JtZWQlMkMlMjBkaXNmaWd1cmUlMkMlMjBibHVycnklMkMlMjBzbXVkZ2VkJTJDJTIwcmVzdHJpY3RlZCUyMHBhbGV0dGUlMkMlMjBmbGF0JTIwY29sb3JzJTIyJTBBJTVEJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMG5lZ2F0aXZlX3Byb21wdCUzRG5lZ2F0aXZlX3Byb21wdCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyY2hyb21hLnBuZyUyMik=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ChromaPipeline | |
| <span class="hljs-meta">>>> </span>model_id = <span class="hljs-string">"lodestones/Chroma1-HD"</span> | |
| <span class="hljs-meta">>>> </span>ckpt_path = <span class="hljs-string">"https://huggingface.co/lodestones/Chroma1-HD/blob/main/Chroma1-HD.safetensors"</span> | |
| <span class="hljs-meta">>>> </span>transformer = ChromaTransformer2DModel.from_single_file(ckpt_path, torch_dtype=torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe = ChromaPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> model_id, | |
| <span class="hljs-meta">... </span> transformer=transformer, | |
| <span class="hljs-meta">... </span> torch_dtype=torch.bfloat16, | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe.enable_model_cpu_offload() | |
| <span class="hljs-meta">>>> </span>prompt = [ | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"A high-fashion close-up portrait of a blonde woman in clear sunglasses. The image uses a bold teal and red color split for dramatic lighting. The background is a simple teal-green. The photo is sharp and well-composed, and is designed for viewing with anaglyph 3D glasses for optimal effect. It looks professionally done."</span> | |
| <span class="hljs-meta">... </span>] | |
| <span class="hljs-meta">>>> </span>negative_prompt = [ | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors"</span> | |
| <span class="hljs-meta">... </span>] | |
| <span class="hljs-meta">>>> </span>image = pipe(prompt, negative_prompt=negative_prompt).images[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image.save(<span class="hljs-string">"chroma.png"</span>)`,lang:"py",wrap:!1}}),{c(){m=i("p"),m.textContent=U,T=o(),p(u.$$.fragment)},l(r){m=l(r,"P",{"data-svelte-h":!0}),b(m)!=="svelte-kvfsh7"&&(m.textContent=U),T=a(r),c(u.$$.fragment,r)},m(r,C){d(r,m,C),d(r,T,C),g(u,r,C),w=!0},p:dn,i(r){w||(h(u.$$.fragment,r),w=!0)},o(r){f(u.$$.fragment,r),w=!1},d(r){r&&(n(m),n(T)),_(u,r)}}}function Yn(W){let m,U="Examples:",T,u,w;return u=new Oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsJTJDJTIwQ2hyb21hSW1nMkltZ1BpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJsb2Rlc3RvbmVzJTJGQ2hyb21hMS1IRCUyMiUwQWNrcHRfcGF0aCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZsb2Rlc3RvbmVzJTJGQ2hyb21hMS1IRCUyRmJsb2IlMkZtYWluJTJGQ2hyb21hMS1IRC5zYWZldGVuc29ycyUyMiUwQXBpcGUlMjAlM0QlMjBDaHJvbWFJbWcySW1nUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTBBJTIwJTIwJTIwJTIwdHJhbnNmb3JtZXIlM0R0cmFuc2Zvcm1lciUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMEEpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQWluaXRfaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uJTJGbWFpbiUyRmFzc2V0cyUyRnN0YWJsZS1zYW1wbGVzJTJGaW1nMmltZyUyRnNrZXRjaC1tb3VudGFpbnMtaW5wdXQuanBnJTIyJTBBKSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBzY2VuaWMlMjBmYXN0YXN5JTIwbGFuZHNjYXBlJTIwd2l0aCUyMGElMjByaXZlciUyMGFuZCUyMG1vdW50YWlucyUyMGluJTIwdGhlJTIwYmFja2dyb3VuZCUyQyUyMHZpYnJhbnQlMjBjb2xvcnMlMkMlMjBkZXRhaWxlZCUyQyUyMGhpZ2glMjByZXNvbHV0aW9uJTIyJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTIybG93JTIwcXVhbGl0eSUyQyUyMHVnbHklMkMlMjB1bmZpbmlzaGVkJTJDJTIwb3V0JTIwb2YlMjBmb2N1cyUyQyUyMGRlZm9ybWVkJTJDJTIwZGlzZmlndXJlJTJDJTIwYmx1cnJ5JTJDJTIwc211ZGdlZCUyQyUyMHJlc3RyaWN0ZWQlMjBwYWxldHRlJTJDJTIwZmxhdCUyMGNvbG9ycyUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBpbWFnZSUzRGluaXRfaW1hZ2UlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNocm9tYS1pbWcyaW1nLnBuZyUyMik=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ChromaTransformer2DModel, ChromaImg2ImgPipeline | |
| <span class="hljs-meta">>>> </span>model_id = <span class="hljs-string">"lodestones/Chroma1-HD"</span> | |
| <span class="hljs-meta">>>> </span>ckpt_path = <span class="hljs-string">"https://huggingface.co/lodestones/Chroma1-HD/blob/main/Chroma1-HD.safetensors"</span> | |
| <span class="hljs-meta">>>> </span>pipe = ChromaImg2ImgPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> model_id, | |
| <span class="hljs-meta">... </span> transformer=transformer, | |
| <span class="hljs-meta">... </span> torch_dtype=torch.bfloat16, | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe.enable_model_cpu_offload() | |
| <span class="hljs-meta">>>> </span>init_image = load_image( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"a scenic fastasy landscape with a river and mountains in the background, vibrant colors, detailed, high resolution"</span> | |
| <span class="hljs-meta">>>> </span>negative_prompt = <span class="hljs-string">"low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors"</span> | |
| <span class="hljs-meta">>>> </span>image = pipe(prompt, image=init_image, negative_prompt=negative_prompt).images[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image.save(<span class="hljs-string">"chroma-img2img.png"</span>)`,lang:"py",wrap:!1}}),{c(){m=i("p"),m.textContent=U,T=o(),p(u.$$.fragment)},l(r){m=l(r,"P",{"data-svelte-h":!0}),b(m)!=="svelte-kvfsh7"&&(m.textContent=U),T=a(r),c(u.$$.fragment,r)},m(r,C){d(r,m,C),d(r,T,C),g(u,r,C),w=!0},p:dn,i(r){w||(h(u.$$.fragment,r),w=!0)},o(r){f(u.$$.fragment,r),w=!1},d(r){r&&(n(m),n(T)),_(u,r)}}}function Fn(W){let m,U="Examples:",T,u,w;return u=new Oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hSW5wYWludFBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEElMEFwaXBlJTIwJTNEJTIwQ2hyb21hSW5wYWludFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJsb2Rlc3RvbmVzJTJGQ2hyb21hMS1IRCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQXByb21wdCUyMCUzRCUyMCUyMkZhY2UlMjBvZiUyMGElMjB5ZWxsb3clMjBjYXQlMkMlMjBoaWdoJTIwcmVzb2x1dGlvbiUyQyUyMHNpdHRpbmclMjBvbiUyMGElMjBwYXJrJTIwYmVuY2glMjIlMEFpbWdfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGQ29tcFZpcyUyRmxhdGVudC1kaWZmdXNpb24lMkZtYWluJTJGZGF0YSUyRmlucGFpbnRpbmdfZXhhbXBsZXMlMkZvdmVydHVyZS1jcmVhdGlvbnMtNXNJNmZRZ1lJdW8ucG5nJTIyJTBBbWFza191cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZDb21wVmlzJTJGbGF0ZW50LWRpZmZ1c2lvbiUyRm1haW4lMkZkYXRhJTJGaW5wYWludGluZ19leGFtcGxlcyUyRm92ZXJ0dXJlLWNyZWF0aW9ucy01c0k2ZlFnWUl1b19tYXNrLnBuZyUyMiUwQXNvdXJjZSUyMCUzRCUyMGxvYWRfaW1hZ2UoaW1nX3VybCklMEFtYXNrJTIwJTNEJTIwbG9hZF9pbWFnZShtYXNrX3VybCklMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTNEcHJvbXB0JTJDJTIwaW1hZ2UlM0Rzb3VyY2UlMkMlMjBtYXNrX2ltYWdlJTNEbWFzaykuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyY2hyb21hX2lucGFpbnRpbmcucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ChromaInpaintPipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image | |
| <span class="hljs-meta">>>> </span>pipe = ChromaInpaintPipeline.from_pretrained(<span class="hljs-string">"lodestones/Chroma1-HD"</span>, torch_dtype=torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"Face of a yellow cat, high resolution, sitting on a park bench"</span> | |
| <span class="hljs-meta">>>> </span>img_url = <span class="hljs-string">"https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"</span> | |
| <span class="hljs-meta">>>> </span>mask_url = <span class="hljs-string">"https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"</span> | |
| <span class="hljs-meta">>>> </span>source = load_image(img_url) | |
| <span class="hljs-meta">>>> </span>mask = load_image(mask_url) | |
| <span class="hljs-meta">>>> </span>image = pipe(prompt=prompt, image=source, mask_image=mask).images[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image.save(<span class="hljs-string">"chroma_inpainting.png"</span>)`,lang:"py",wrap:!1}}),{c(){m=i("p"),m.textContent=U,T=o(),p(u.$$.fragment)},l(r){m=l(r,"P",{"data-svelte-h":!0}),b(m)!=="svelte-kvfsh7"&&(m.textContent=U),T=a(r),c(u.$$.fragment,r)},m(r,C){d(r,m,C),d(r,T,C),g(u,r,C),w=!0},p:dn,i(r){w||(h(u.$$.fragment,r),w=!0)},o(r){f(u.$$.fragment,r),w=!1},d(r){r&&(n(m),n(T)),_(u,r)}}}function Qn(W){let m,U,T,u,w,r,C,Ke,B,mn='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/> <img alt="MPS" src="https://img.shields.io/badge/MPS-000000?style=flat&logo=apple&logoColor=white%22"/>',et,q,pn="Chroma is a text to image generation model based on Flux.",tt,S,cn="Original model checkpoints for Chroma can be found here:",nt,O,gn='<li>High-resolution finetune: <a href="https://huggingface.co/lodestones/Chroma1-HD" rel="nofollow">lodestones/Chroma1-HD</a></li> <li>Base model: <a href="https://huggingface.co/lodestones/Chroma1-Base" rel="nofollow">lodestones/Chroma1-Base</a></li> <li>Original repo with progress checkpoints: <a href="https://huggingface.co/lodestones/Chroma" rel="nofollow">lodestones/Chroma</a> (loading this repo with <code>from_pretrained</code> will load a Diffusers-compatible version of the <code>unlocked-v37</code> checkpoint)</li>',ot,E,hn="<p>Chroma can use all the same optimizations as Flux.</p>",at,K,st,ee,rt,te,it,ne,fn="To use updated model checkpoints that are not in the Diffusers format, you can use the <code>ChromaTransformer2DModel</code> class to load the model from a single file in the original format. This is also useful when trying to load finetunes or quantized versions of the models that have been published by the community.",lt,oe,_n="The following example demonstrates how to run Chroma from a single file.",dt,ae,un="Then run the following example",mt,se,pt,re,ct,y,ie,Jt,xe,bn="The Chroma pipeline for text-to-image generation.",xt,Ze,yn='Reference: <a href="https://huggingface.co/lodestones/Chroma1-HD/" rel="nofollow">https://huggingface.co/lodestones/Chroma1-HD/</a>',Zt,j,le,Ut,Ue,vn="Function invoked when calling the pipeline for generation.",jt,V,Pt,z,de,$t,je,wn=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Gt,L,me,Nt,Pe,Mn=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Wt,H,pe,Bt,$e,In=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to | |
| compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Et,X,ce,Vt,Ge,Tn=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to | |
| compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow | |
| processing larger images.`,zt,Ne,ge,gt,he,ht,v,fe,Lt,We,Cn="The Chroma pipeline for image-to-image generation.",Ht,Be,kn='Reference: <a href="https://huggingface.co/lodestones/Chroma1-HD/" rel="nofollow">https://huggingface.co/lodestones/Chroma1-HD/</a>',Xt,P,_e,Rt,Ee,Jn="Function invoked when calling the pipeline for generation.",Dt,R,Yt,D,ue,Ft,Ve,xn=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Qt,Y,be,At,ze,Zn=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,qt,F,ye,St,Le,Un=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to | |
| compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Ot,Q,ve,Kt,He,jn=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to | |
| compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow | |
| processing larger images.`,en,Xe,we,ft,Me,_t,Z,Ie,tn,Re,Pn="The Flux pipeline for image inpainting.",nn,De,$n='Reference: <a href="https://blackforestlabs.ai/announcing-black-forest-labs/" rel="nofollow">https://blackforestlabs.ai/announcing-black-forest-labs/</a>',on,$,Te,an,Ye,Gn="Function invoked when calling the pipeline for generation.",sn,A,rn,Fe,Ce,ut,ke,bt,Se,yt;return w=new Xn({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),C=new qe({props:{title:"Chroma",local:"chroma",headingTag:"h1"}}),K=new qe({props:{title:"Inference",local:"inference",headingTag:"h2"}}),ee=new Oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwQ2hyb21hUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMmxvZGVzdG9uZXMlMkZDaHJvbWExLUhEJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyQSUyMGhpZ2gtZmFzaGlvbiUyMGNsb3NlLXVwJTIwcG9ydHJhaXQlMjBvZiUyMGElMjBibG9uZGUlMjB3b21hbiUyMGluJTIwY2xlYXIlMjBzdW5nbGFzc2VzLiUyMFRoZSUyMGltYWdlJTIwdXNlcyUyMGElMjBib2xkJTIwdGVhbCUyMGFuZCUyMHJlZCUyMGNvbG9yJTIwc3BsaXQlMjBmb3IlMjBkcmFtYXRpYyUyMGxpZ2h0aW5nLiUyMFRoZSUyMGJhY2tncm91bmQlMjBpcyUyMGElMjBzaW1wbGUlMjB0ZWFsLWdyZWVuLiUyMFRoZSUyMHBob3RvJTIwaXMlMjBzaGFycCUyMGFuZCUyMHdlbGwtY29tcG9zZWQlMkMlMjBhbmQlMjBpcyUyMGRlc2lnbmVkJTIwZm9yJTIwdmlld2luZyUyMHdpdGglMjBhbmFnbHlwaCUyMDNEJTIwZ2xhc3NlcyUyMGZvciUyMG9wdGltYWwlMjBlZmZlY3QuJTIwSXQlMjBsb29rcyUyMHByb2Zlc3Npb25hbGx5JTIwZG9uZS4lMjIlMEElNUQlMEFuZWdhdGl2ZV9wcm9tcHQlMjAlM0QlMjAlMjAlNUIlMjJsb3clMjBxdWFsaXR5JTJDJTIwdWdseSUyQyUyMHVuZmluaXNoZWQlMkMlMjBvdXQlMjBvZiUyMGZvY3VzJTJDJTIwZGVmb3JtZWQlMkMlMjBkaXNmaWd1cmUlMkMlMjBibHVycnklMkMlMjBzbXVkZ2VkJTJDJTIwcmVzdHJpY3RlZCUyMHBhbGV0dGUlMkMlMjBmbGF0JTIwY29sb3JzJTIyJTVEJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMG5lZ2F0aXZlX3Byb21wdCUzRG5lZ2F0aXZlX3Byb21wdCUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRHRvcmNoLkdlbmVyYXRvciglMjJjcHUlMjIpLm1hbnVhbF9zZWVkKDQzMyklMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENDAlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDMuMCUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbWFnZXNfcGVyX3Byb21wdCUzRDElMkMlMEEpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNocm9tYS5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ChromaPipeline | |
| pipe = ChromaPipeline.from_pretrained(<span class="hljs-string">"lodestones/Chroma1-HD"</span>, torch_dtype=torch.bfloat16) | |
| pipe.enable_model_cpu_offload() | |
| prompt = [ | |
| <span class="hljs-string">"A high-fashion close-up portrait of a blonde woman in clear sunglasses. The image uses a bold teal and red color split for dramatic lighting. The background is a simple teal-green. The photo is sharp and well-composed, and is designed for viewing with anaglyph 3D glasses for optimal effect. It looks professionally done."</span> | |
| ] | |
| negative_prompt = [<span class="hljs-string">"low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors"</span>] | |
| image = pipe( | |
| prompt=prompt, | |
| negative_prompt=negative_prompt, | |
| generator=torch.Generator(<span class="hljs-string">"cpu"</span>).manual_seed(<span class="hljs-number">433</span>), | |
| num_inference_steps=<span class="hljs-number">40</span>, | |
| guidance_scale=<span class="hljs-number">3.0</span>, | |
| num_images_per_prompt=<span class="hljs-number">1</span>, | |
| ).images[<span class="hljs-number">0</span>] | |
| image.save(<span class="hljs-string">"chroma.png"</span>)`,lang:"python",wrap:!1}}),te=new qe({props:{title:"Loading from a single file",local:"loading-from-a-single-file",headingTag:"h2"}}),se=new Oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsJTJDJTIwQ2hyb21hUGlwZWxpbmUlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmxvZGVzdG9uZXMlMkZDaHJvbWExLUhEJTIyJTBBZHR5cGUlMjAlM0QlMjB0b3JjaC5iZmxvYXQxNiUwQSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsLmZyb21fc2luZ2xlX2ZpbGUoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmxvZGVzdG9uZXMlMkZDaHJvbWExLUhEJTJGYmxvYiUyRm1haW4lMkZDaHJvbWExLUhELnNhZmV0ZW5zb3JzJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0RkdHlwZSklMEElMEFwaXBlJTIwJTNEJTIwQ2hyb21hUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkJTJDJTIwdHJhbnNmb3JtZXIlM0R0cmFuc2Zvcm1lciUyQyUyMHRvcmNoX2R0eXBlJTNEZHR5cGUpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQSUwQXByb21wdCUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkElMjBoaWdoLWZhc2hpb24lMjBjbG9zZS11cCUyMHBvcnRyYWl0JTIwb2YlMjBhJTIwYmxvbmRlJTIwd29tYW4lMjBpbiUyMGNsZWFyJTIwc3VuZ2xhc3Nlcy4lMjBUaGUlMjBpbWFnZSUyMHVzZXMlMjBhJTIwYm9sZCUyMHRlYWwlMjBhbmQlMjByZWQlMjBjb2xvciUyMHNwbGl0JTIwZm9yJTIwZHJhbWF0aWMlMjBsaWdodGluZy4lMjBUaGUlMjBiYWNrZ3JvdW5kJTIwaXMlMjBhJTIwc2ltcGxlJTIwdGVhbC1ncmVlbi4lMjBUaGUlMjBwaG90byUyMGlzJTIwc2hhcnAlMjBhbmQlMjB3ZWxsLWNvbXBvc2VkJTJDJTIwYW5kJTIwaXMlMjBkZXNpZ25lZCUyMGZvciUyMHZpZXdpbmclMjB3aXRoJTIwYW5hZ2x5cGglMjAzRCUyMGdsYXNzZXMlMjBmb3IlMjBvcHRpbWFsJTIwZWZmZWN0LiUyMEl0JTIwbG9va3MlMjBwcm9mZXNzaW9uYWxseSUyMGRvbmUuJTIyJTBBJTVEJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTIwJTVCJTIybG93JTIwcXVhbGl0eSUyQyUyMHVnbHklMkMlMjB1bmZpbmlzaGVkJTJDJTIwb3V0JTIwb2YlMjBmb2N1cyUyQyUyMGRlZm9ybWVkJTJDJTIwZGlzZmlndXJlJTJDJTIwYmx1cnJ5JTJDJTIwc211ZGdlZCUyQyUyMHJlc3RyaWN0ZWQlMjBwYWxldHRlJTJDJTIwZmxhdCUyMGNvbG9ycyUyMiU1RCUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBnZW5lcmF0b3IlM0R0b3JjaC5HZW5lcmF0b3IoJTIyY3B1JTIyKS5tYW51YWxfc2VlZCg0MzMpJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDQwJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0QzLjAlMkMlMEEpLmltYWdlcyU1QjAlNUQlMEElMEFpbWFnZS5zYXZlKCUyMmNocm9tYS1zaW5nbGUtZmlsZS5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ChromaTransformer2DModel, ChromaPipeline | |
| model_id = <span class="hljs-string">"lodestones/Chroma1-HD"</span> | |
| dtype = torch.bfloat16 | |
| transformer = ChromaTransformer2DModel.from_single_file(<span class="hljs-string">"https://huggingface.co/lodestones/Chroma1-HD/blob/main/Chroma1-HD.safetensors"</span>, torch_dtype=dtype) | |
| pipe = ChromaPipeline.from_pretrained(model_id, transformer=transformer, torch_dtype=dtype) | |
| pipe.enable_model_cpu_offload() | |
| prompt = [ | |
| <span class="hljs-string">"A high-fashion close-up portrait of a blonde woman in clear sunglasses. The image uses a bold teal and red color split for dramatic lighting. The background is a simple teal-green. The photo is sharp and well-composed, and is designed for viewing with anaglyph 3D glasses for optimal effect. It looks professionally done."</span> | |
| ] | |
| negative_prompt = [<span class="hljs-string">"low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors"</span>] | |
| image = pipe( | |
| prompt=prompt, | |
| negative_prompt=negative_prompt, | |
| generator=torch.Generator(<span class="hljs-string">"cpu"</span>).manual_seed(<span class="hljs-number">433</span>), | |
| num_inference_steps=<span class="hljs-number">40</span>, | |
| guidance_scale=<span class="hljs-number">3.0</span>, | |
| ).images[<span class="hljs-number">0</span>] | |
| image.save(<span class="hljs-string">"chroma-single-file.png"</span>)`,lang:"python",wrap:!1}}),re=new qe({props:{title:"ChromaPipeline",local:"diffusers.ChromaPipeline",headingTag:"h2"}}),ie=new x({props:{name:"class diffusers.ChromaPipeline",anchor:"diffusers.ChromaPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": T5EncoderModel"},{name:"tokenizer",val:": T5Tokenizer"},{name:"transformer",val:": ChromaTransformer2DModel"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"},{name:"feature_extractor",val:": CLIPImageProcessor = None"}],parametersDescription:[{anchor:"diffusers.ChromaPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/pr_13832/en/api/models/chroma_transformer#diffusers.ChromaTransformer2DModel">ChromaTransformer2DModel</a>) — | |
| Conditional Transformer (MMDiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.ChromaPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_13832/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) — | |
| A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.ChromaPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_13832/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representation`,name:"vae"},{anchor:"diffusers.ChromaPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) — | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically | |
| the <a href="https://huggingface.co/google/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.ChromaPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5TokenizerFast</code>) — | |
| Second Tokenizer of class | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma.py#L151"}}),le=new x({props:{name:"__call__",anchor:"diffusers.ChromaPipeline.__call__",parameters:[{name:"prompt",val:": str | list[str] = None"},{name:"negative_prompt",val:": str | list[str] = None"},{name:"height",val:": int | None = None"},{name:"width",val:": int | None = None"},{name:"num_inference_steps",val:": int = 35"},{name:"sigmas",val:": list[float] | None = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"num_images_per_prompt",val:": int | None = 1"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"ip_adapter_image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] | None = None"},{name:"ip_adapter_image_embeds",val:": list[torch.Tensor] | None = None"},{name:"negative_ip_adapter_image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] | None = None"},{name:"negative_ip_adapter_image_embeds",val:": list[torch.Tensor] | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"output_type",val:": str | None = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"joint_attention_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": list = ['latents']"},{name:"max_sequence_length",val:": int = 512"}],parametersDescription:[{anchor:"diffusers.ChromaPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>. | |
| instead.`,name:"prompt"},{anchor:"diffusers.ChromaPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is | |
| not greater than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.ChromaPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) — | |
| The height in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"height"},{anchor:"diffusers.ChromaPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) — | |
| The width in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"width"},{anchor:"diffusers.ChromaPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) — | |
| The number of denoising steps. More denoising steps usually lead to a higher quality image at the | |
| expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.ChromaPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>list[float]</code>, <em>optional</em>) — | |
| Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in | |
| their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed | |
| will be used.`,name:"sigmas"},{anchor:"diffusers.ChromaPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 3.5) — | |
| Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion | |
| Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2. | |
| of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting | |
| <code>guidance_scale > 1</code>. Higher guidance scale encourages to generate images that are closely linked to | |
| the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.ChromaPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.ChromaPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) — | |
| One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a> | |
| to make generation deterministic.`,name:"generator"},{anchor:"diffusers.ChromaPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image | |
| generation. Can be used to tweak the same generation with different prompts. If not provided, a latents | |
| tensor will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.ChromaPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.ChromaPipeline.__call__.ip_adapter_image",description:"<strong>ip_adapter_image</strong> — (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.",name:"ip_adapter_image"},{anchor:"diffusers.ChromaPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>list[torch.Tensor]</code>, <em>optional</em>) — | |
| Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of | |
| IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. If not | |
| provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"ip_adapter_image_embeds"},{anchor:"diffusers.ChromaPipeline.__call__.negative_ip_adapter_image",description:`<strong>negative_ip_adapter_image</strong> — | |
| (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.`,name:"negative_ip_adapter_image"},{anchor:"diffusers.ChromaPipeline.__call__.negative_ip_adapter_image_embeds",description:`<strong>negative_ip_adapter_image_embeds</strong> (<code>list[torch.Tensor]</code>, <em>optional</em>) — | |
| Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of | |
| IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. If not | |
| provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"negative_ip_adapter_image_embeds"},{anchor:"diffusers.ChromaPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt | |
| weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input | |
| argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.ChromaPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (torch.Tensor, <em>optional</em>) — | |
| Attention mask for the prompt embeddings. Used to mask out padding tokens in the prompt sequence. | |
| Chroma requires a single padding token remain unmasked. Please refer to | |
| <a href="https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training" rel="nofollow">https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training</a>`,name:"prompt_attention_mask"},{anchor:"diffusers.ChromaPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (torch.Tensor, <em>optional</em>) — | |
| Attention mask for the negative prompt embeddings. Used to mask out padding tokens in the negative | |
| prompt sequence. Chroma requires a single padding token remain unmasked. PLease refer to | |
| <a href="https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training" rel="nofollow">https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training</a>`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.ChromaPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generate image. Choose between | |
| <a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.ChromaPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.flux.ChromaPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.ChromaPipeline.__call__.joint_attention_kwargs",description:`<strong>joint_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"joint_attention_kwargs"},{anchor:"diffusers.ChromaPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function that calls at the end of each denoising steps during the inference. The function is called | |
| with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by | |
| <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.ChromaPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>list</code>, <em>optional</em>) — | |
| The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list | |
| will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the | |
| <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.ChromaPipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 512) — Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma.py#L641",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~pipelines.chroma.ChromaPipelineOutput</code> if | |
| <code>return_dict</code> is True, otherwise a <code>tuple</code>. When returning a tuple, the first element is a list with the | |
| generated images.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~pipelines.chroma.ChromaPipelineOutput</code> or <code>tuple</code></p> | |
| `}}),V=new ln({props:{anchor:"diffusers.ChromaPipeline.__call__.example",$$slots:{default:[Dn]},$$scope:{ctx:W}}}),de=new x({props:{name:"disable_vae_slicing",anchor:"diffusers.ChromaPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma.py#L523"}}),me=new x({props:{name:"disable_vae_tiling",anchor:"diffusers.ChromaPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma.py#L550"}}),pe=new x({props:{name:"enable_vae_slicing",anchor:"diffusers.ChromaPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma.py#L510"}}),ce=new x({props:{name:"enable_vae_tiling",anchor:"diffusers.ChromaPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma.py#L536"}}),ge=new x({props:{name:"encode_prompt",anchor:"diffusers.ChromaPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"negative_prompt",val:": str | list[str] = None"},{name:"device",val:": torch.device | None = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"max_sequence_length",val:": int = 512"},{name:"lora_scale",val:": float | None = None"}],parametersDescription:[{anchor:"diffusers.ChromaPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.ChromaPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt not to guide the image generation. If not defined, one has to pass <code>negative_prompt_embeds</code> | |
| instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.ChromaPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>): | |
| torch device`,name:"device"},{anchor:"diffusers.ChromaPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.ChromaPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.ChromaPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) — | |
| A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma.py#L265"}}),he=new qe({props:{title:"ChromaImg2ImgPipeline",local:"diffusers.ChromaImg2ImgPipeline",headingTag:"h2"}}),fe=new x({props:{name:"class diffusers.ChromaImg2ImgPipeline",anchor:"diffusers.ChromaImg2ImgPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": T5EncoderModel"},{name:"tokenizer",val:": T5Tokenizer"},{name:"transformer",val:": ChromaTransformer2DModel"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"},{name:"feature_extractor",val:": CLIPImageProcessor = None"}],parametersDescription:[{anchor:"diffusers.ChromaImg2ImgPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/pr_13832/en/api/models/chroma_transformer#diffusers.ChromaTransformer2DModel">ChromaTransformer2DModel</a>) — | |
| Conditional Transformer (MMDiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.ChromaImg2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_13832/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) — | |
| A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.ChromaImg2ImgPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_13832/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representation`,name:"vae"},{anchor:"diffusers.ChromaImg2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) — | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically | |
| the <a href="https://huggingface.co/google/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.ChromaImg2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5TokenizerFast</code>) — | |
| Second Tokenizer of class | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L163"}}),_e=new x({props:{name:"__call__",anchor:"diffusers.ChromaImg2ImgPipeline.__call__",parameters:[{name:"prompt",val:": str | list[str] = None"},{name:"negative_prompt",val:": str | list[str] = None"},{name:"image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] = None"},{name:"height",val:": int | None = None"},{name:"width",val:": int | None = None"},{name:"num_inference_steps",val:": int = 35"},{name:"sigmas",val:": list[float] | None = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"strength",val:": float = 0.9"},{name:"num_images_per_prompt",val:": int | None = 1"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"ip_adapter_image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] | None = None"},{name:"ip_adapter_image_embeds",val:": list[torch.Tensor] | None = None"},{name:"negative_ip_adapter_image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] | None = None"},{name:"negative_ip_adapter_image_embeds",val:": list[torch.Tensor] | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"output_type",val:": str | None = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"joint_attention_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": list = ['latents']"},{name:"max_sequence_length",val:": int = 512"}],parametersDescription:[{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>. | |
| instead.`,name:"prompt"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is | |
| not greater than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.image",description:`<strong>image</strong> (<code>PipelineImageInput</code>) — | |
| The image input for the pipeline.`,name:"image"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) — | |
| The height in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"height"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) — | |
| The width in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"width"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 35) — | |
| The number of denoising steps. More denoising steps usually lead to a higher quality image at the | |
| expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>list[float]</code>, <em>optional</em>) — | |
| Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in | |
| their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed | |
| will be used.`,name:"sigmas"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 3.5) — | |
| Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion | |
| Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2. | |
| of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting | |
| <code>guidance_scale > 1</code>. Higher guidance scale encourages to generate images that are closely linked to | |
| the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.strength",description:`<strong>strength</strong> (\`float, <em>optional</em>, defaults to 0.9) — | |
| Conceptually, indicates how much to transform the reference image. Must be between 0 and 1. image will | |
| be used as a starting point, adding more noise to it the larger the strength. The number of denoising | |
| steps depends on the amount of noise initially added. When strength is 1, added noise will be maximum | |
| and the denoising process will run for the full number of iterations specified in num_inference_steps. | |
| A value of 1, therefore, essentially ignores image.`,name:"strength"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) — | |
| One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a> | |
| to make generation deterministic.`,name:"generator"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image | |
| generation. Can be used to tweak the same generation with different prompts. If not provided, a latents | |
| tensor will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.ip_adapter_image",description:"<strong>ip_adapter_image</strong> — (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.",name:"ip_adapter_image"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>list[torch.Tensor]</code>, <em>optional</em>) — | |
| Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of | |
| IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. If not | |
| provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"ip_adapter_image_embeds"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.negative_ip_adapter_image",description:`<strong>negative_ip_adapter_image</strong> — | |
| (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.`,name:"negative_ip_adapter_image"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.negative_ip_adapter_image_embeds",description:`<strong>negative_ip_adapter_image_embeds</strong> (<code>list[torch.Tensor]</code>, <em>optional</em>) — | |
| Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of | |
| IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. If not | |
| provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"negative_ip_adapter_image_embeds"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt | |
| weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input | |
| argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (torch.Tensor, <em>optional</em>) — | |
| Attention mask for the prompt embeddings. Used to mask out padding tokens in the prompt sequence. | |
| Chroma requires a single padding token remain unmasked. Please refer to | |
| <a href="https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training" rel="nofollow">https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training</a>`,name:"prompt_attention_mask"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (torch.Tensor, <em>optional</em>) — | |
| Attention mask for the negative prompt embeddings. Used to mask out padding tokens in the negative | |
| prompt sequence. Chroma requires a single padding token remain unmasked. PLease refer to | |
| <a href="https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training" rel="nofollow">https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training</a>`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generate image. Choose between | |
| <a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.flux.ChromaPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.joint_attention_kwargs",description:`<strong>joint_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"joint_attention_kwargs"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function that calls at the end of each denoising steps during the inference. The function is called | |
| with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by | |
| <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>list</code>, <em>optional</em>) — | |
| The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list | |
| will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the | |
| <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 512) — Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L700",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~pipelines.chroma.ChromaPipelineOutput</code> if | |
| <code>return_dict</code> is True, otherwise a <code>tuple</code>. When returning a tuple, the first element is a list with the | |
| generated images.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~pipelines.chroma.ChromaPipelineOutput</code> or <code>tuple</code></p> | |
| `}}),R=new ln({props:{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.example",$$slots:{default:[Yn]},$$scope:{ctx:W}}}),ue=new x({props:{name:"disable_vae_slicing",anchor:"diffusers.ChromaImg2ImgPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L555"}}),be=new x({props:{name:"disable_vae_tiling",anchor:"diffusers.ChromaImg2ImgPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L582"}}),ye=new x({props:{name:"enable_vae_slicing",anchor:"diffusers.ChromaImg2ImgPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L542"}}),ve=new x({props:{name:"enable_vae_tiling",anchor:"diffusers.ChromaImg2ImgPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L568"}}),we=new x({props:{name:"encode_prompt",anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"negative_prompt",val:": str | list[str] = None"},{name:"device",val:": torch.device | None = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"max_sequence_length",val:": int = 512"},{name:"lora_scale",val:": float | None = None"}],parametersDescription:[{anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt not to guide the image generation. If not defined, one has to pass <code>negative_prompt_embeds</code> | |
| instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>): | |
| torch device`,name:"device"},{anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) — | |
| A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L292"}}),Me=new qe({props:{title:"ChromaInpaintPipeline",local:"diffusers.ChromaInpaintPipeline",headingTag:"h2"}}),Ie=new x({props:{name:"class diffusers.ChromaInpaintPipeline",anchor:"diffusers.ChromaInpaintPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": T5EncoderModel"},{name:"tokenizer",val:": T5Tokenizer"},{name:"transformer",val:": ChromaTransformer2DModel"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"},{name:"feature_extractor",val:": CLIPImageProcessor = None"}],parametersDescription:[{anchor:"diffusers.ChromaInpaintPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/pr_13832/en/api/models/chroma_transformer#diffusers.ChromaTransformer2DModel">ChromaTransformer2DModel</a>) — | |
| Conditional Transformer (MMDiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.ChromaInpaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_13832/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>) — | |
| A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.ChromaInpaintPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_13832/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.ChromaInpaintPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) — | |
| <a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically | |
| the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.ChromaInpaintPipeline.text_encoder_2",description:`<strong>text_encoder_2</strong> (<code>T5EncoderModel</code>) — | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically | |
| the <a href="https://huggingface.co/google/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder_2"},{anchor:"diffusers.ChromaInpaintPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) — | |
| Tokenizer of class | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.ChromaInpaintPipeline.tokenizer_2",description:`<strong>tokenizer_2</strong> (<code>T5TokenizerFast</code>) — | |
| Second Tokenizer of class | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer_2"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py#L169"}}),Te=new x({props:{name:"__call__",anchor:"diffusers.ChromaInpaintPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"true_cfg_scale",val:": float = 1.0"},{name:"image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] = None"},{name:"mask_image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] = None"},{name:"masked_image_latents",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor] = None"},{name:"height",val:": int | None = None"},{name:"width",val:": int | None = None"},{name:"padding_mask_crop",val:": int | None = None"},{name:"strength",val:": float = 0.6"},{name:"num_inference_steps",val:": int = 28"},{name:"sigmas",val:": list[float] | None = None"},{name:"guidance_scale",val:": float = 7.0"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, list[PIL.Image.Image], list[numpy.ndarray], list[torch.Tensor], NoneType] = None"},{name:"ip_adapter_image_embeds",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"negative_ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, list[PIL.Image.Image], list[numpy.ndarray], list[torch.Tensor], NoneType] = None"},{name:"negative_ip_adapter_image_embeds",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": str = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"joint_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 256"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"}],parametersDescription:[{anchor:"diffusers.ChromaInpaintPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>. | |
| instead.`,name:"prompt"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is | |
| not greater than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.true_cfg_scale",description:`<strong>true_cfg_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) — | |
| True classifier-free guidance (guidance scale) is enabled when <code>true_cfg_scale</code> > 1 and | |
| <code>negative_prompt</code> is provided.`,name:"true_cfg_scale"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.image",description:`<strong>image</strong> (<code>PipelineImageInput</code>) — | |
| The image input for the pipeline.`,name:"image"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.mask_image",description:`<strong>mask_image</strong> (<code>PipelineImageInput</code>) — | |
| <code>Image</code>, numpy array or tensor representing an image batch to mask <code>image</code>. White pixels in the mask | |
| are repainted while black pixels are preserved.`,name:"mask_image"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.masked_image_latents",description:`<strong>masked_image_latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-encoded latent representation of the masked image. If not provided, it will be computed from | |
| <code>mask_image</code> and <code>image</code>.`,name:"masked_image_latents"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) — | |
| The height in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"height"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) — | |
| The width in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"width"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.padding_mask_crop",description:`<strong>padding_mask_crop</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| The size of margin in the crop to be applied to the image and masking. If <code>None</code>, no crop is applied to | |
| image and mask_image. If <code>padding_mask_crop</code> is not <code>None</code>, it will first find a rectangular region | |
| with the same aspect ratio of the image and contains all masked area, and then expand that area based | |
| on <code>padding_mask_crop</code>. The image and mask_image will then be cropped based on the expanded area before | |
| resizing to the original image size for inpainting.`,name:"padding_mask_crop"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 35) — | |
| The number of denoising steps. More denoising steps usually lead to a higher quality image at the | |
| expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) — | |
| Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in | |
| their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed | |
| will be used.`,name:"sigmas"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 3.5) — | |
| Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion | |
| Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2. | |
| of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting | |
| <code>guidance_scale > 1</code>. Higher guidance scale encourages to generate images that are closely linked to | |
| the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.strength",description:`<strong>strength</strong> (\`float, <em>optional</em>, defaults to 0.9) — | |
| Conceptually, indicates how much to transform the reference image. Must be between 0 and 1. image will | |
| be used as a starting point, adding more noise to it the larger the strength. The number of denoising | |
| steps depends on the amount of noise initially added. When strength is 1, added noise will be maximum | |
| and the denoising process will run for the full number of iterations specified in num_inference_steps. | |
| A value of 1, therefore, essentially ignores image.`,name:"strength"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) — | |
| One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a> | |
| to make generation deterministic.`,name:"generator"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image | |
| generation. Can be used to tweak the same generation with different prompts. If not provided, a latents | |
| tensor will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.ip_adapter_image",description:"<strong>ip_adapter_image</strong> — (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.",name:"ip_adapter_image"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>List[torch.Tensor]</code>, <em>optional</em>) — | |
| Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of | |
| IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. If not | |
| provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"ip_adapter_image_embeds"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.negative_ip_adapter_image",description:`<strong>negative_ip_adapter_image</strong> — | |
| (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.`,name:"negative_ip_adapter_image"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.negative_ip_adapter_image_embeds",description:`<strong>negative_ip_adapter_image_embeds</strong> (<code>List[torch.Tensor]</code>, <em>optional</em>) — | |
| Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of | |
| IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. If not | |
| provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"negative_ip_adapter_image_embeds"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt | |
| weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input | |
| argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (torch.Tensor, <em>optional</em>) — | |
| Attention mask for the prompt embeddings. Used to mask out padding tokens in the prompt sequence. | |
| Chroma requires a single padding token remain unmasked. Please refer to | |
| <a href="https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training" rel="nofollow">https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training</a>`,name:"prompt_attention_mask"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (torch.Tensor, <em>optional</em>) — | |
| Attention mask for the negative prompt embeddings. Used to mask out padding tokens in the negative | |
| prompt sequence. Chroma requires a single padding token remain unmasked. PLease refer to | |
| <a href="https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training" rel="nofollow">https://huggingface.co/lodestones/Chroma#tldr-masking-t5-padding-tokens-enhanced-fidelity-and-increased-stability-during-training</a>`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generate image. Choose between | |
| <a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.chroma.ChromaPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.joint_attention_kwargs",description:`<strong>joint_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"joint_attention_kwargs"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function that calls at the end of each denoising steps during the inference. The function is called | |
| with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by | |
| <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) — | |
| The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list | |
| will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the | |
| <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.ChromaInpaintPipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 512) — Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py#L764",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~pipelines.chroma.ChromaPipelineOutput</code> if | |
| <code>return_dict</code> is True, otherwise a <code>tuple</code>. When returning a tuple, the first element is a list with the | |
| generated images.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~pipelines.chroma.ChromaPipelineOutput</code> or <code>tuple</code></p> | |
| `}}),A=new ln({props:{anchor:"diffusers.ChromaInpaintPipeline.__call__.example",$$slots:{default:[Fn]},$$scope:{ctx:W}}}),Ce=new x({props:{name:"encode_prompt",anchor:"diffusers.ChromaInpaintPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"device",val:": torch.device | None = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"max_sequence_length",val:": int = 256"},{name:"lora_scale",val:": bool | None = None"}],parametersDescription:[{anchor:"diffusers.ChromaInpaintPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.ChromaInpaintPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt not to guide the image generation. If not defined, one has to pass <code>negative_prompt_embeds</code> | |
| instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.ChromaInpaintPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>): | |
| torch device`,name:"device"},{anchor:"diffusers.ChromaInpaintPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.ChromaInpaintPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.ChromaInpaintPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) — | |
| A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/vr_13832/src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py#L293"}}),ke=new Rn({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/chroma.md"}}),{c(){m=i("meta"),U=o(),T=i("p"),u=o(),p(w.$$.fragment),r=o(),p(C.$$.fragment),Ke=o(),B=i("div"),B.innerHTML=mn,et=o(),q=i("p"),q.textContent=pn,tt=o(),S=i("p"),S.textContent=cn,nt=o(),O=i("ul"),O.innerHTML=gn,ot=o(),E=i("blockquote"),E.innerHTML=hn,at=o(),p(K.$$.fragment),st=o(),p(ee.$$.fragment),rt=o(),p(te.$$.fragment),it=o(),ne=i("p"),ne.innerHTML=fn,lt=o(),oe=i("p"),oe.textContent=_n,dt=o(),ae=i("p"),ae.textContent=un,mt=o(),p(se.$$.fragment),pt=o(),p(re.$$.fragment),ct=o(),y=i("div"),p(ie.$$.fragment),Jt=o(),xe=i("p"),xe.textContent=bn,xt=o(),Ze=i("p"),Ze.innerHTML=yn,Zt=o(),j=i("div"),p(le.$$.fragment),Ut=o(),Ue=i("p"),Ue.textContent=vn,jt=o(),p(V.$$.fragment),Pt=o(),z=i("div"),p(de.$$.fragment),$t=o(),je=i("p"),je.innerHTML=wn,Gt=o(),L=i("div"),p(me.$$.fragment),Nt=o(),Pe=i("p"),Pe.innerHTML=Mn,Wt=o(),H=i("div"),p(pe.$$.fragment),Bt=o(),$e=i("p"),$e.textContent=In,Et=o(),X=i("div"),p(ce.$$.fragment),Vt=o(),Ge=i("p"),Ge.textContent=Tn,zt=o(),Ne=i("div"),p(ge.$$.fragment),gt=o(),p(he.$$.fragment),ht=o(),v=i("div"),p(fe.$$.fragment),Lt=o(),We=i("p"),We.textContent=Cn,Ht=o(),Be=i("p"),Be.innerHTML=kn,Xt=o(),P=i("div"),p(_e.$$.fragment),Rt=o(),Ee=i("p"),Ee.textContent=Jn,Dt=o(),p(R.$$.fragment),Yt=o(),D=i("div"),p(ue.$$.fragment),Ft=o(),Ve=i("p"),Ve.innerHTML=xn,Qt=o(),Y=i("div"),p(be.$$.fragment),At=o(),ze=i("p"),ze.innerHTML=Zn,qt=o(),F=i("div"),p(ye.$$.fragment),St=o(),Le=i("p"),Le.textContent=Un,Ot=o(),Q=i("div"),p(ve.$$.fragment),Kt=o(),He=i("p"),He.textContent=jn,en=o(),Xe=i("div"),p(we.$$.fragment),ft=o(),p(Me.$$.fragment),_t=o(),Z=i("div"),p(Ie.$$.fragment),tn=o(),Re=i("p"),Re.textContent=Pn,nn=o(),De=i("p"),De.innerHTML=$n,on=o(),$=i("div"),p(Te.$$.fragment),an=o(),Ye=i("p"),Ye.textContent=Gn,sn=o(),p(A.$$.fragment),rn=o(),Fe=i("div"),p(Ce.$$.fragment),ut=o(),p(ke.$$.fragment),bt=o(),Se=i("p"),this.h()},l(e){const s=Hn("svelte-u9bgzb",document.head);m=l(s,"META",{name:!0,content:!0}),s.forEach(n),U=a(e),T=l(e,"P",{}),k(T).forEach(n),u=a(e),c(w.$$.fragment,e),r=a(e),c(C.$$.fragment,e),Ke=a(e),B=l(e,"DIV",{class:!0,"data-svelte-h":!0}),b(B)!=="svelte-1elo7hh"&&(B.innerHTML=mn),et=a(e),q=l(e,"P",{"data-svelte-h":!0}),b(q)!=="svelte-zz935e"&&(q.textContent=pn),tt=a(e),S=l(e,"P",{"data-svelte-h":!0}),b(S)!=="svelte-9mb6m9"&&(S.textContent=cn),nt=a(e),O=l(e,"UL",{"data-svelte-h":!0}),b(O)!=="svelte-1mx6of9"&&(O.innerHTML=gn),ot=a(e),E=l(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),b(E)!=="svelte-1hm6mkx"&&(E.innerHTML=hn),at=a(e),c(K.$$.fragment,e),st=a(e),c(ee.$$.fragment,e),rt=a(e),c(te.$$.fragment,e),it=a(e),ne=l(e,"P",{"data-svelte-h":!0}),b(ne)!=="svelte-1dlqcbc"&&(ne.innerHTML=fn),lt=a(e),oe=l(e,"P",{"data-svelte-h":!0}),b(oe)!=="svelte-1fix8nw"&&(oe.textContent=_n),dt=a(e),ae=l(e,"P",{"data-svelte-h":!0}),b(ae)!=="svelte-15rpvn4"&&(ae.textContent=un),mt=a(e),c(se.$$.fragment,e),pt=a(e),c(re.$$.fragment,e),ct=a(e),y=l(e,"DIV",{class:!0});var M=k(y);c(ie.$$.fragment,M),Jt=a(M),xe=l(M,"P",{"data-svelte-h":!0}),b(xe)!=="svelte-x23rez"&&(xe.textContent=bn),xt=a(M),Ze=l(M,"P",{"data-svelte-h":!0}),b(Ze)!=="svelte-au8uhu"&&(Ze.innerHTML=yn),Zt=a(M),j=l(M,"DIV",{class:!0});var N=k(j);c(le.$$.fragment,N),Ut=a(N),Ue=l(N,"P",{"data-svelte-h":!0}),b(Ue)!=="svelte-v78lg8"&&(Ue.textContent=vn),jt=a(N),c(V.$$.fragment,N),N.forEach(n),Pt=a(M),z=l(M,"DIV",{class:!0});var Je=k(z);c(de.$$.fragment,Je),$t=a(Je),je=l(Je,"P",{"data-svelte-h":!0}),b(je)!=="svelte-1s3c06i"&&(je.innerHTML=wn),Je.forEach(n),Gt=a(M),L=l(M,"DIV",{class:!0});var vt=k(L);c(me.$$.fragment,vt),Nt=a(vt),Pe=l(vt,"P",{"data-svelte-h":!0}),b(Pe)!=="svelte-pkn4ui"&&(Pe.innerHTML=Mn),vt.forEach(n),Wt=a(M),H=l(M,"DIV",{class:!0});var wt=k(H);c(pe.$$.fragment,wt),Bt=a(wt),$e=l(wt,"P",{"data-svelte-h":!0}),b($e)!=="svelte-14bnrb6"&&($e.textContent=In),wt.forEach(n),Et=a(M),X=l(M,"DIV",{class:!0});var Mt=k(X);c(ce.$$.fragment,Mt),Vt=a(Mt),Ge=l(Mt,"P",{"data-svelte-h":!0}),b(Ge)!=="svelte-1xwrf7t"&&(Ge.textContent=Tn),Mt.forEach(n),zt=a(M),Ne=l(M,"DIV",{class:!0});var Nn=k(Ne);c(ge.$$.fragment,Nn),Nn.forEach(n),M.forEach(n),gt=a(e),c(he.$$.fragment,e),ht=a(e),v=l(e,"DIV",{class:!0});var J=k(v);c(fe.$$.fragment,J),Lt=a(J),We=l(J,"P",{"data-svelte-h":!0}),b(We)!=="svelte-1mk0zn"&&(We.textContent=Cn),Ht=a(J),Be=l(J,"P",{"data-svelte-h":!0}),b(Be)!=="svelte-au8uhu"&&(Be.innerHTML=kn),Xt=a(J),P=l(J,"DIV",{class:!0});var Qe=k(P);c(_e.$$.fragment,Qe),Rt=a(Qe),Ee=l(Qe,"P",{"data-svelte-h":!0}),b(Ee)!=="svelte-v78lg8"&&(Ee.textContent=Jn),Dt=a(Qe),c(R.$$.fragment,Qe),Qe.forEach(n),Yt=a(J),D=l(J,"DIV",{class:!0});var It=k(D);c(ue.$$.fragment,It),Ft=a(It),Ve=l(It,"P",{"data-svelte-h":!0}),b(Ve)!=="svelte-1s3c06i"&&(Ve.innerHTML=xn),It.forEach(n),Qt=a(J),Y=l(J,"DIV",{class:!0});var Tt=k(Y);c(be.$$.fragment,Tt),At=a(Tt),ze=l(Tt,"P",{"data-svelte-h":!0}),b(ze)!=="svelte-pkn4ui"&&(ze.innerHTML=Zn),Tt.forEach(n),qt=a(J),F=l(J,"DIV",{class:!0});var Ct=k(F);c(ye.$$.fragment,Ct),St=a(Ct),Le=l(Ct,"P",{"data-svelte-h":!0}),b(Le)!=="svelte-14bnrb6"&&(Le.textContent=Un),Ct.forEach(n),Ot=a(J),Q=l(J,"DIV",{class:!0});var kt=k(Q);c(ve.$$.fragment,kt),Kt=a(kt),He=l(kt,"P",{"data-svelte-h":!0}),b(He)!=="svelte-1xwrf7t"&&(He.textContent=jn),kt.forEach(n),en=a(J),Xe=l(J,"DIV",{class:!0});var Wn=k(Xe);c(we.$$.fragment,Wn),Wn.forEach(n),J.forEach(n),ft=a(e),c(Me.$$.fragment,e),_t=a(e),Z=l(e,"DIV",{class:!0});var G=k(Z);c(Ie.$$.fragment,G),tn=a(G),Re=l(G,"P",{"data-svelte-h":!0}),b(Re)!=="svelte-9yovg9"&&(Re.textContent=Pn),nn=a(G),De=l(G,"P",{"data-svelte-h":!0}),b(De)!=="svelte-mxgguy"&&(De.innerHTML=$n),on=a(G),$=l(G,"DIV",{class:!0});var Ae=k($);c(Te.$$.fragment,Ae),an=a(Ae),Ye=l(Ae,"P",{"data-svelte-h":!0}),b(Ye)!=="svelte-v78lg8"&&(Ye.textContent=Gn),sn=a(Ae),c(A.$$.fragment,Ae),Ae.forEach(n),rn=a(G),Fe=l(G,"DIV",{class:!0});var Bn=k(Fe);c(Ce.$$.fragment,Bn),Bn.forEach(n),G.forEach(n),ut=a(e),c(ke.$$.fragment,e),bt=a(e),Se=l(e,"P",{}),k(Se).forEach(n),this.h()},h(){I(m,"name","hf:doc:metadata"),I(m,"content",An),I(B,"class","flex flex-wrap space-x-1"),I(E,"class","tip"),I(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,s){t(document.head,m),d(e,U,s),d(e,T,s),d(e,u,s),g(w,e,s),d(e,r,s),g(C,e,s),d(e,Ke,s),d(e,B,s),d(e,et,s),d(e,q,s),d(e,tt,s),d(e,S,s),d(e,nt,s),d(e,O,s),d(e,ot,s),d(e,E,s),d(e,at,s),g(K,e,s),d(e,st,s),g(ee,e,s),d(e,rt,s),g(te,e,s),d(e,it,s),d(e,ne,s),d(e,lt,s),d(e,oe,s),d(e,dt,s),d(e,ae,s),d(e,mt,s),g(se,e,s),d(e,pt,s),g(re,e,s),d(e,ct,s),d(e,y,s),g(ie,y,null),t(y,Jt),t(y,xe),t(y,xt),t(y,Ze),t(y,Zt),t(y,j),g(le,j,null),t(j,Ut),t(j,Ue),t(j,jt),g(V,j,null),t(y,Pt),t(y,z),g(de,z,null),t(z,$t),t(z,je),t(y,Gt),t(y,L),g(me,L,null),t(L,Nt),t(L,Pe),t(y,Wt),t(y,H),g(pe,H,null),t(H,Bt),t(H,$e),t(y,Et),t(y,X),g(ce,X,null),t(X,Vt),t(X,Ge),t(y,zt),t(y,Ne),g(ge,Ne,null),d(e,gt,s),g(he,e,s),d(e,ht,s),d(e,v,s),g(fe,v,null),t(v,Lt),t(v,We),t(v,Ht),t(v,Be),t(v,Xt),t(v,P),g(_e,P,null),t(P,Rt),t(P,Ee),t(P,Dt),g(R,P,null),t(v,Yt),t(v,D),g(ue,D,null),t(D,Ft),t(D,Ve),t(v,Qt),t(v,Y),g(be,Y,null),t(Y,At),t(Y,ze),t(v,qt),t(v,F),g(ye,F,null),t(F,St),t(F,Le),t(v,Ot),t(v,Q),g(ve,Q,null),t(Q,Kt),t(Q,He),t(v,en),t(v,Xe),g(we,Xe,null),d(e,ft,s),g(Me,e,s),d(e,_t,s),d(e,Z,s),g(Ie,Z,null),t(Z,tn),t(Z,Re),t(Z,nn),t(Z,De),t(Z,on),t(Z,$),g(Te,$,null),t($,an),t($,Ye),t($,sn),g(A,$,null),t(Z,rn),t(Z,Fe),g(Ce,Fe,null),d(e,ut,s),g(ke,e,s),d(e,bt,s),d(e,Se,s),yt=!0},p(e,[s]){const M={};s&2&&(M.$$scope={dirty:s,ctx:e}),V.$set(M);const N={};s&2&&(N.$$scope={dirty:s,ctx:e}),R.$set(N);const Je={};s&2&&(Je.$$scope={dirty:s,ctx:e}),A.$set(Je)},i(e){yt||(h(w.$$.fragment,e),h(C.$$.fragment,e),h(K.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(se.$$.fragment,e),h(re.$$.fragment,e),h(ie.$$.fragment,e),h(le.$$.fragment,e),h(V.$$.fragment,e),h(de.$$.fragment,e),h(me.$$.fragment,e),h(pe.$$.fragment,e),h(ce.$$.fragment,e),h(ge.$$.fragment,e),h(he.$$.fragment,e),h(fe.$$.fragment,e),h(_e.$$.fragment,e),h(R.$$.fragment,e),h(ue.$$.fragment,e),h(be.$$.fragment,e),h(ye.$$.fragment,e),h(ve.$$.fragment,e),h(we.$$.fragment,e),h(Me.$$.fragment,e),h(Ie.$$.fragment,e),h(Te.$$.fragment,e),h(A.$$.fragment,e),h(Ce.$$.fragment,e),h(ke.$$.fragment,e),yt=!0)},o(e){f(w.$$.fragment,e),f(C.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(se.$$.fragment,e),f(re.$$.fragment,e),f(ie.$$.fragment,e),f(le.$$.fragment,e),f(V.$$.fragment,e),f(de.$$.fragment,e),f(me.$$.fragment,e),f(pe.$$.fragment,e),f(ce.$$.fragment,e),f(ge.$$.fragment,e),f(he.$$.fragment,e),f(fe.$$.fragment,e),f(_e.$$.fragment,e),f(R.$$.fragment,e),f(ue.$$.fragment,e),f(be.$$.fragment,e),f(ye.$$.fragment,e),f(ve.$$.fragment,e),f(we.$$.fragment,e),f(Me.$$.fragment,e),f(Ie.$$.fragment,e),f(Te.$$.fragment,e),f(A.$$.fragment,e),f(Ce.$$.fragment,e),f(ke.$$.fragment,e),yt=!1},d(e){e&&(n(U),n(T),n(u),n(r),n(Ke),n(B),n(et),n(q),n(tt),n(S),n(nt),n(O),n(ot),n(E),n(at),n(st),n(rt),n(it),n(ne),n(lt),n(oe),n(dt),n(ae),n(mt),n(pt),n(ct),n(y),n(gt),n(ht),n(v),n(ft),n(_t),n(Z),n(ut),n(bt),n(Se)),n(m),_(w,e),_(C,e),_(K,e),_(ee,e),_(te,e),_(se,e),_(re,e),_(ie),_(le),_(V),_(de),_(me),_(pe),_(ce),_(ge),_(he,e),_(fe),_(_e),_(R),_(ue),_(be),_(ye),_(ve),_(we),_(Me,e),_(Ie),_(Te),_(A),_(Ce),_(ke,e)}}}const An='{"title":"Chroma","local":"chroma","sections":[{"title":"Inference","local":"inference","sections":[],"depth":2},{"title":"Loading from a single file","local":"loading-from-a-single-file","sections":[],"depth":2},{"title":"ChromaPipeline","local":"diffusers.ChromaPipeline","sections":[],"depth":2},{"title":"ChromaImg2ImgPipeline","local":"diffusers.ChromaImg2ImgPipeline","sections":[],"depth":2},{"title":"ChromaInpaintPipeline","local":"diffusers.ChromaInpaintPipeline","sections":[],"depth":2}],"depth":1}';function qn(W){return Vn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ao extends zn{constructor(m){super(),Ln(this,m,qn,Qn,En,{})}}export{ao as component}; | |
Xet Storage Details
- Size:
- 95.5 kB
- Xet hash:
- 19a71b8a3550b9feb75ca1f36d9f8039a3531f12a1a9cfd296037f42c758be57
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.