import{s as gn,o as hn,n as cn}from"../chunks/scheduler.53228c21.js";import{S as fn,i as un,e as i,s as o,c as p,h as _n,a as r,d as n,b as a,f as J,g as d,j as _,k as T,l as t,m as l,n as c,t as g,o as h,p as f}from"../chunks/index.100fac89.js";import{C as bn}from"../chunks/CopyLLMTxtMenu.0ee1b69b.js";import{D as x}from"../chunks/Docstring.db856a1e.js";import{C as dt}from"../chunks/CodeBlock.d30a6509.js";import{E as dn}from"../chunks/ExampleCodeBlock.3eb26ae1.js";import{H as Ne,E as yn}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function wn(be){let u,k="Examples:",C,v,I;return v=new dt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hUGlwZWxpbmUlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmxvZGVzdG9uZXMlMkZDaHJvbWElMjIlMEFja3B0X3BhdGglMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGbG9kZXN0b25lcyUyRkNocm9tYSUyRmJsb2IlMkZtYWluJTJGY2hyb21hLXVubG9ja2VkLXYzNy5zYWZldGVuc29ycyUyMiUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsLmZyb21fc2luZ2xlX2ZpbGUoY2twdF9wYXRoJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwQ2hyb21hUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTBBJTIwJTIwJTIwJTIwdHJhbnNmb3JtZXIlM0R0cmFuc2Zvcm1lciUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMEEpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQXByb21wdCUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkElMjBoaWdoLWZhc2hpb24lMjBjbG9zZS11cCUyMHBvcnRyYWl0JTIwb2YlMjBhJTIwYmxvbmRlJTIwd29tYW4lMjBpbiUyMGNsZWFyJTIwc3VuZ2xhc3Nlcy4lMjBUaGUlMjBpbWFnZSUyMHVzZXMlMjBhJTIwYm9sZCUyMHRlYWwlMjBhbmQlMjByZWQlMjBjb2xvciUyMHNwbGl0JTIwZm9yJTIwZHJhbWF0aWMlMjBsaWdodGluZy4lMjBUaGUlMjBiYWNrZ3JvdW5kJTIwaXMlMjBhJTIwc2ltcGxlJTIwdGVhbC1ncmVlbi4lMjBUaGUlMjBwaG90byUyMGlzJTIwc2hhcnAlMjBhbmQlMjB3ZWxsLWNvbXBvc2VkJTJDJTIwYW5kJTIwaXMlMjBkZXNpZ25lZCUyMGZvciUyMHZpZXdpbmclMjB3aXRoJTIwYW5hZ2x5cGglMjAzRCUyMGdsYXNzZXMlMjBmb3IlMjBvcHRpbWFsJTIwZWZmZWN0LiUyMEl0JTIwbG9va3MlMjBwcm9mZXNzaW9uYWxseSUyMGRvbmUuJTIyJTBBJTVEJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIybG93JTIwcXVhbGl0eSUyQyUyMHVnbHklMkMlMjB1bmZpbmlzaGVkJTJDJTIwb3V0JTIwb2YlMjBmb2N1cyUyQyUyMGRlZm9ybWVkJTJDJTIwZGlzZmlndXJlJTJDJTIwYmx1cnJ5JTJDJTIwc211ZGdlZCUyQyUyMHJlc3RyaWN0ZWQlMjBwYWxldHRlJTJDJTIwZmxhdCUyMGNvbG9ycyUyMiUwQSU1RCUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNocm9tYS5wbmclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ChromaPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;lodestones/Chroma&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v37.safetensors&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>transformer = ChromaTransformer2DModel.from_single_file(ckpt_path, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </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">&gt;&gt;&gt; </span>pipe.enable_model_cpu_offload()
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;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.&quot;</span>
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors&quot;</span>
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt, negative_prompt=negative_prompt).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;chroma.png&quot;</span>)`,wrap:!1}}),{c(){u=i("p"),u.textContent=k,C=o(),p(v.$$.fragment)},l(m){u=r(m,"P",{"data-svelte-h":!0}),_(u)!=="svelte-kvfsh7"&&(u.textContent=k),C=a(m),d(v.$$.fragment,m)},m(m,U){l(m,u,U),l(m,C,U),c(v,m,U),I=!0},p:cn,i(m){I||(g(v.$$.fragment,m),I=!0)},o(m){h(v.$$.fragment,m),I=!1},d(m){m&&(n(u),n(C)),f(v,m)}}}function vn(be){let u,k="Examples:",C,v,I;return v=new dt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsJTJDJTIwQ2hyb21hSW1nMkltZ1BpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJsb2Rlc3RvbmVzJTJGQ2hyb21hJTIyJTBBY2twdF9wYXRoJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmxvZGVzdG9uZXMlMkZDaHJvbWElMkZibG9iJTJGbWFpbiUyRmNocm9tYS11bmxvY2tlZC12Mzcuc2FmZXRlbnNvcnMlMjIlMEFwaXBlJTIwJTNEJTIwQ2hyb21hSW1nMkltZ1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUyQyUwQSUyMCUyMCUyMCUyMHRyYW5zZm9ybWVyJTNEdHJhbnNmb3JtZXIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTJDJTBBKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEFpbml0X2ltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZDb21wVmlzJTJGc3RhYmxlLWRpZmZ1c2lvbiUyRm1haW4lMkZhc3NldHMlMkZzdGFibGUtc2FtcGxlcyUyRmltZzJpbWclMkZza2V0Y2gtbW91bnRhaW5zLWlucHV0LmpwZyUyMiUwQSklMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwc2NlbmljJTIwZmFzdGFzeSUyMGxhbmRzY2FwZSUyMHdpdGglMjBhJTIwcml2ZXIlMjBhbmQlMjBtb3VudGFpbnMlMjBpbiUyMHRoZSUyMGJhY2tncm91bmQlMkMlMjB2aWJyYW50JTIwY29sb3JzJTJDJTIwZGV0YWlsZWQlMkMlMjBoaWdoJTIwcmVzb2x1dGlvbiUyMiUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMmxvdyUyMHF1YWxpdHklMkMlMjB1Z2x5JTJDJTIwdW5maW5pc2hlZCUyQyUyMG91dCUyMG9mJTIwZm9jdXMlMkMlMjBkZWZvcm1lZCUyQyUyMGRpc2ZpZ3VyZSUyQyUyMGJsdXJyeSUyQyUyMHNtdWRnZWQlMkMlMjByZXN0cmljdGVkJTIwcGFsZXR0ZSUyQyUyMGZsYXQlMjBjb2xvcnMlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwaW1hZ2UlM0Rpbml0X2ltYWdlJTJDJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJjaHJvbWEtaW1nMmltZy5wbmclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ChromaTransformer2DModel, ChromaImg2ImgPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;lodestones/Chroma&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v37.safetensors&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </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">&gt;&gt;&gt; </span>pipe.enable_model_cpu_offload()
<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a scenic fastasy landscape with a river and mountains in the background, vibrant colors, detailed, high resolution&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt, image=init_image, negative_prompt=negative_prompt).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;chroma-img2img.png&quot;</span>)`,wrap:!1}}),{c(){u=i("p"),u.textContent=k,C=o(),p(v.$$.fragment)},l(m){u=r(m,"P",{"data-svelte-h":!0}),_(u)!=="svelte-kvfsh7"&&(u.textContent=k),C=a(m),d(v.$$.fragment,m)},m(m,U){l(m,u,U),l(m,C,U),c(v,m,U),I=!0},p:cn,i(m){I||(g(v.$$.fragment,m),I=!0)},o(m){h(v.$$.fragment,m),I=!1},d(m){m&&(n(u),n(C)),f(v,m)}}}function Mn(be){let u,k,C,v,I,m,U,Ve,G,Et='<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&amp;logo=apple&amp;logoColor=white%22"/>',Le,Y,Xt="Chroma is a text to image generation model based on Flux.",Ee,Q,Ht='Original model checkpoints for Chroma can be found <a href="https://huggingface.co/lodestones/Chroma" rel="nofollow">here</a>.',Xe,P,Rt="<p>Chroma can use all the same optimizations as Flux.</p>",He,F,Re,D,zt='The Diffusers version of Chroma is based on the <a href="https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v37.safetensors" rel="nofollow"><code>unlocked-v37</code></a> version of the original model, which is available in the <a href="https://huggingface.co/lodestones/Chroma" rel="nofollow">Chroma repository</a>.',ze,A,Ye,S,Qe,q,Yt="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.",Fe,O,Qt="The following example demonstrates how to run Chroma from a single file.",De,K,Ft="Then run the following example",Ae,ee,Se,te,qe,b,ne,ct,ye,Dt="The Chroma pipeline for text-to-image generation.",gt,we,At='Reference: <a href="https://huggingface.co/lodestones/Chroma/" rel="nofollow">https://huggingface.co/lodestones/Chroma/</a>',ht,Z,oe,ft,ve,St="Function invoked when calling the pipeline for generation.",ut,W,_t,B,ae,bt,Me,qt=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,yt,N,se,wt,Te,Ot=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,vt,V,ie,Mt,Ie,Kt=`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.`,Tt,L,re,It,Je,en=`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.`,Jt,Ce,le,Oe,me,Ke,y,pe,Ct,Ue,tn="The Chroma pipeline for image-to-image generation.",Ut,xe,nn='Reference: <a href="https://huggingface.co/lodestones/Chroma/" rel="nofollow">https://huggingface.co/lodestones/Chroma/</a>',xt,j,de,kt,ke,on="Function invoked when calling the pipeline for generation.",Zt,E,jt,X,ce,$t,Ze,an=`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,H,ge,Pt,je,sn=`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,R,he,Bt,$e,rn=`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.`,Nt,z,fe,Vt,Ge,ln=`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.`,Lt,Pe,ue,et,_e,tt,Be,nt;return I=new bn({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),U=new Ne({props:{title:"Chroma",local:"chroma",headingTag:"h1"}}),F=new Ne({props:{title:"Inference",local:"inference",headingTag:"h2"}}),A=new dt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwQ2hyb21hUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMmxvZGVzdG9uZXMlMkZDaHJvbWElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMEFwcm9tcHQlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjJBJTIwaGlnaC1mYXNoaW9uJTIwY2xvc2UtdXAlMjBwb3J0cmFpdCUyMG9mJTIwYSUyMGJsb25kZSUyMHdvbWFuJTIwaW4lMjBjbGVhciUyMHN1bmdsYXNzZXMuJTIwVGhlJTIwaW1hZ2UlMjB1c2VzJTIwYSUyMGJvbGQlMjB0ZWFsJTIwYW5kJTIwcmVkJTIwY29sb3IlMjBzcGxpdCUyMGZvciUyMGRyYW1hdGljJTIwbGlnaHRpbmcuJTIwVGhlJTIwYmFja2dyb3VuZCUyMGlzJTIwYSUyMHNpbXBsZSUyMHRlYWwtZ3JlZW4uJTIwVGhlJTIwcGhvdG8lMjBpcyUyMHNoYXJwJTIwYW5kJTIwd2VsbC1jb21wb3NlZCUyQyUyMGFuZCUyMGlzJTIwZGVzaWduZWQlMjBmb3IlMjB2aWV3aW5nJTIwd2l0aCUyMGFuYWdseXBoJTIwM0QlMjBnbGFzc2VzJTIwZm9yJTIwb3B0aW1hbCUyMGVmZmVjdC4lMjBJdCUyMGxvb2tzJTIwcHJvZmVzc2lvbmFsbHklMjBkb25lLiUyMiUwQSU1RCUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMCU1QiUyMmxvdyUyMHF1YWxpdHklMkMlMjB1Z2x5JTJDJTIwdW5maW5pc2hlZCUyQyUyMG91dCUyMG9mJTIwZm9jdXMlMkMlMjBkZWZvcm1lZCUyQyUyMGRpc2ZpZ3VyZSUyQyUyMGJsdXJyeSUyQyUyMHNtdWRnZWQlMkMlMjByZXN0cmljdGVkJTIwcGFsZXR0ZSUyQyUyMGZsYXQlMjBjb2xvcnMlMjIlNUQlMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEdG9yY2guR2VuZXJhdG9yKCUyMmNwdSUyMikubWFudWFsX3NlZWQoNDMzKSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q0MCUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNEMy4wJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ltYWdlc19wZXJfcHJvbXB0JTNEMSUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyY2hyb21hLnBuZyUyMik=",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">&quot;lodestones/Chroma&quot;</span>, torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()

prompt = [
    <span class="hljs-string">&quot;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.&quot;</span>
]
negative_prompt =  [<span class="hljs-string">&quot;low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors&quot;</span>]

image = pipe(
    prompt=prompt,
    negative_prompt=negative_prompt,
    generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</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">&quot;chroma.png&quot;</span>)`,wrap:!1}}),S=new Ne({props:{title:"Loading from a single file",local:"loading-from-a-single-file",headingTag:"h2"}}),ee=new dt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsJTJDJTIwQ2hyb21hUGlwZWxpbmUlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmxvZGVzdG9uZXMlMkZDaHJvbWElMjIlMEFkdHlwZSUyMCUzRCUyMHRvcmNoLmJmbG9hdDE2JTBBJTBBdHJhbnNmb3JtZXIlMjAlM0QlMjBDaHJvbWFUcmFuc2Zvcm1lcjJETW9kZWwuZnJvbV9zaW5nbGVfZmlsZSglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGbG9kZXN0b25lcyUyRkNocm9tYSUyRmJsb2IlMkZtYWluJTJGY2hyb21hLXVubG9ja2VkLXYzNy5zYWZldGVuc29ycyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEZHR5cGUpJTBBJTBBcGlwZSUyMCUzRCUyMENocm9tYVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRyYW5zZm9ybWVyJTNEdHJhbnNmb3JtZXIlMkMlMjB0b3JjaF9kdHlwZSUzRGR0eXBlKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMEFwcm9tcHQlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjJBJTIwaGlnaC1mYXNoaW9uJTIwY2xvc2UtdXAlMjBwb3J0cmFpdCUyMG9mJTIwYSUyMGJsb25kZSUyMHdvbWFuJTIwaW4lMjBjbGVhciUyMHN1bmdsYXNzZXMuJTIwVGhlJTIwaW1hZ2UlMjB1c2VzJTIwYSUyMGJvbGQlMjB0ZWFsJTIwYW5kJTIwcmVkJTIwY29sb3IlMjBzcGxpdCUyMGZvciUyMGRyYW1hdGljJTIwbGlnaHRpbmcuJTIwVGhlJTIwYmFja2dyb3VuZCUyMGlzJTIwYSUyMHNpbXBsZSUyMHRlYWwtZ3JlZW4uJTIwVGhlJTIwcGhvdG8lMjBpcyUyMHNoYXJwJTIwYW5kJTIwd2VsbC1jb21wb3NlZCUyQyUyMGFuZCUyMGlzJTIwZGVzaWduZWQlMjBmb3IlMjB2aWV3aW5nJTIwd2l0aCUyMGFuYWdseXBoJTIwM0QlMjBnbGFzc2VzJTIwZm9yJTIwb3B0aW1hbCUyMGVmZmVjdC4lMjBJdCUyMGxvb2tzJTIwcHJvZmVzc2lvbmFsbHklMjBkb25lLiUyMiUwQSU1RCUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMCU1QiUyMmxvdyUyMHF1YWxpdHklMkMlMjB1Z2x5JTJDJTIwdW5maW5pc2hlZCUyQyUyMG91dCUyMG9mJTIwZm9jdXMlMkMlMjBkZWZvcm1lZCUyQyUyMGRpc2ZpZ3VyZSUyQyUyMGJsdXJyeSUyQyUyMHNtdWRnZWQlMkMlMjByZXN0cmljdGVkJTIwcGFsZXR0ZSUyQyUyMGZsYXQlMjBjb2xvcnMlMjIlNUQlMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEdG9yY2guR2VuZXJhdG9yKCUyMmNwdSUyMikubWFudWFsX3NlZWQoNDMzKSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q0MCUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNEMy4wJTJDJTBBKS5pbWFnZXMlNUIwJTVEJTBBJTBBaW1hZ2Uuc2F2ZSglMjJjaHJvbWEtc2luZ2xlLWZpbGUucG5nJTIyKQ==",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">&quot;lodestones/Chroma&quot;</span>
dtype = torch.bfloat16

transformer = ChromaTransformer2DModel.from_single_file(<span class="hljs-string">&quot;https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v37.safetensors&quot;</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">&quot;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.&quot;</span>
]
negative_prompt =  [<span class="hljs-string">&quot;low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors&quot;</span>]

image = pipe(
    prompt=prompt,
    negative_prompt=negative_prompt,
    generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</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">&quot;chroma-single-file.png&quot;</span>)`,wrap:!1}}),te=new Ne({props:{title:"ChromaPipeline",local:"diffusers.ChromaPipeline",headingTag:"h2"}}),ne=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:": T5TokenizerFast"},{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/main/en/api/models/chroma_transformer#diffusers.ChromaTransformer2DModel">ChromaTransformer2DModel</a>) &#x2014;
Conditional Transformer (MMDiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.ChromaPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
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/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
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>) &#x2014;
<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>) &#x2014;
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/main/src/diffusers/pipelines/chroma/pipeline_chroma.py#L151"}}),oe=new x({props:{name:"__call__",anchor:"diffusers.ChromaPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 35"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.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, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.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.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[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 = 512"}],parametersDescription:[{anchor:"diffusers.ChromaPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
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>) &#x2014;
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) &#x2014;
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) &#x2014;
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) &#x2014;
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>) &#x2014;
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) &#x2014;
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 &gt; 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) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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> &#x2014; (<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>) &#x2014;
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> &#x2014;
(<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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>&quot;pil&quot;</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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) &#x2014; Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma.py#L638",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>
`}}),W=new dn({props:{anchor:"diffusers.ChromaPipeline.__call__.example",$$slots:{default:[wn]},$$scope:{ctx:be}}}),ae=new x({props:{name:"disable_vae_slicing",anchor:"diffusers.ChromaPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma.py#L520"}}),se=new x({props:{name:"disable_vae_tiling",anchor:"diffusers.ChromaPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma.py#L547"}}),ie=new x({props:{name:"enable_vae_slicing",anchor:"diffusers.ChromaPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma.py#L507"}}),re=new x({props:{name:"enable_vae_tiling",anchor:"diffusers.ChromaPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma.py#L533"}}),le=new x({props:{name:"encode_prompt",anchor:"diffusers.ChromaPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"max_sequence_length",val:": int = 512"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.ChromaPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
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>) &#x2014;
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> &#x2014; (<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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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/main/src/diffusers/pipelines/chroma/pipeline_chroma.py#L262"}}),me=new Ne({props:{title:"ChromaImg2ImgPipeline",local:"diffusers.ChromaImg2ImgPipeline",headingTag:"h2"}}),pe=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:": T5TokenizerFast"},{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/main/en/api/models/chroma_transformer#diffusers.ChromaTransformer2DModel">ChromaTransformer2DModel</a>) &#x2014;
Conditional Transformer (MMDiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.ChromaImg2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
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/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
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>) &#x2014;
<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>) &#x2014;
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/main/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L163"}}),de=new x({props:{name:"__call__",anchor:"diffusers.ChromaImg2ImgPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 35"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"strength",val:": float = 0.9"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.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, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.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.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[<built-in method tensor of type object at 0x7eff425880e0>] = None"},{name:"output_type",val:": typing.Optional[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 = 512"}],parametersDescription:[{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
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>) &#x2014;
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__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
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) &#x2014;
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) &#x2014;
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>) &#x2014;
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) &#x2014;
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 &gt; 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) &#x2014;
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) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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> &#x2014; (<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>) &#x2014;
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> &#x2014;
(<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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>&quot;pil&quot;</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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) &#x2014; Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L699",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>
`}}),E=new dn({props:{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.example",$$slots:{default:[vn]},$$scope:{ctx:be}}}),ce=new x({props:{name:"disable_vae_slicing",anchor:"diffusers.ChromaImg2ImgPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L554"}}),ge=new x({props:{name:"disable_vae_tiling",anchor:"diffusers.ChromaImg2ImgPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L581"}}),he=new x({props:{name:"enable_vae_slicing",anchor:"diffusers.ChromaImg2ImgPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L541"}}),fe=new x({props:{name:"enable_vae_tiling",anchor:"diffusers.ChromaImg2ImgPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L567"}}),ue=new x({props:{name:"encode_prompt",anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"max_sequence_length",val:": int = 512"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.ChromaImg2ImgPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
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>) &#x2014;
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> &#x2014; (<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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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/main/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L291"}}),_e=new yn({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/chroma.md"}}),{c(){u=i("meta"),k=o(),C=i("p"),v=o(),p(I.$$.fragment),m=o(),p(U.$$.fragment),Ve=o(),G=i("div"),G.innerHTML=Et,Le=o(),Y=i("p"),Y.textContent=Xt,Ee=o(),Q=i("p"),Q.innerHTML=Ht,Xe=o(),P=i("blockquote"),P.innerHTML=Rt,He=o(),p(F.$$.fragment),Re=o(),D=i("p"),D.innerHTML=zt,ze=o(),p(A.$$.fragment),Ye=o(),p(S.$$.fragment),Qe=o(),q=i("p"),q.innerHTML=Yt,Fe=o(),O=i("p"),O.textContent=Qt,De=o(),K=i("p"),K.textContent=Ft,Ae=o(),p(ee.$$.fragment),Se=o(),p(te.$$.fragment),qe=o(),b=i("div"),p(ne.$$.fragment),ct=o(),ye=i("p"),ye.textContent=Dt,gt=o(),we=i("p"),we.innerHTML=At,ht=o(),Z=i("div"),p(oe.$$.fragment),ft=o(),ve=i("p"),ve.textContent=St,ut=o(),p(W.$$.fragment),_t=o(),B=i("div"),p(ae.$$.fragment),bt=o(),Me=i("p"),Me.innerHTML=qt,yt=o(),N=i("div"),p(se.$$.fragment),wt=o(),Te=i("p"),Te.innerHTML=Ot,vt=o(),V=i("div"),p(ie.$$.fragment),Mt=o(),Ie=i("p"),Ie.textContent=Kt,Tt=o(),L=i("div"),p(re.$$.fragment),It=o(),Je=i("p"),Je.textContent=en,Jt=o(),Ce=i("div"),p(le.$$.fragment),Oe=o(),p(me.$$.fragment),Ke=o(),y=i("div"),p(pe.$$.fragment),Ct=o(),Ue=i("p"),Ue.textContent=tn,Ut=o(),xe=i("p"),xe.innerHTML=nn,xt=o(),j=i("div"),p(de.$$.fragment),kt=o(),ke=i("p"),ke.textContent=on,Zt=o(),p(E.$$.fragment),jt=o(),X=i("div"),p(ce.$$.fragment),$t=o(),Ze=i("p"),Ze.innerHTML=an,Gt=o(),H=i("div"),p(ge.$$.fragment),Pt=o(),je=i("p"),je.innerHTML=sn,Wt=o(),R=i("div"),p(he.$$.fragment),Bt=o(),$e=i("p"),$e.textContent=rn,Nt=o(),z=i("div"),p(fe.$$.fragment),Vt=o(),Ge=i("p"),Ge.textContent=ln,Lt=o(),Pe=i("div"),p(ue.$$.fragment),et=o(),p(_e.$$.fragment),tt=o(),Be=i("p"),this.h()},l(e){const s=_n("svelte-u9bgzb",document.head);u=r(s,"META",{name:!0,content:!0}),s.forEach(n),k=a(e),C=r(e,"P",{}),J(C).forEach(n),v=a(e),d(I.$$.fragment,e),m=a(e),d(U.$$.fragment,e),Ve=a(e),G=r(e,"DIV",{class:!0,"data-svelte-h":!0}),_(G)!=="svelte-1elo7hh"&&(G.innerHTML=Et),Le=a(e),Y=r(e,"P",{"data-svelte-h":!0}),_(Y)!=="svelte-zz935e"&&(Y.textContent=Xt),Ee=a(e),Q=r(e,"P",{"data-svelte-h":!0}),_(Q)!=="svelte-13s2per"&&(Q.innerHTML=Ht),Xe=a(e),P=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),_(P)!=="svelte-1hm6mkx"&&(P.innerHTML=Rt),He=a(e),d(F.$$.fragment,e),Re=a(e),D=r(e,"P",{"data-svelte-h":!0}),_(D)!=="svelte-fh23pg"&&(D.innerHTML=zt),ze=a(e),d(A.$$.fragment,e),Ye=a(e),d(S.$$.fragment,e),Qe=a(e),q=r(e,"P",{"data-svelte-h":!0}),_(q)!=="svelte-1dlqcbc"&&(q.innerHTML=Yt),Fe=a(e),O=r(e,"P",{"data-svelte-h":!0}),_(O)!=="svelte-1fix8nw"&&(O.textContent=Qt),De=a(e),K=r(e,"P",{"data-svelte-h":!0}),_(K)!=="svelte-15rpvn4"&&(K.textContent=Ft),Ae=a(e),d(ee.$$.fragment,e),Se=a(e),d(te.$$.fragment,e),qe=a(e),b=r(e,"DIV",{class:!0});var w=J(b);d(ne.$$.fragment,w),ct=a(w),ye=r(w,"P",{"data-svelte-h":!0}),_(ye)!=="svelte-x23rez"&&(ye.textContent=Dt),gt=a(w),we=r(w,"P",{"data-svelte-h":!0}),_(we)!=="svelte-44oie6"&&(we.innerHTML=At),ht=a(w),Z=r(w,"DIV",{class:!0});var $=J(Z);d(oe.$$.fragment,$),ft=a($),ve=r($,"P",{"data-svelte-h":!0}),_(ve)!=="svelte-v78lg8"&&(ve.textContent=St),ut=a($),d(W.$$.fragment,$),$.forEach(n),_t=a(w),B=r(w,"DIV",{class:!0});var ot=J(B);d(ae.$$.fragment,ot),bt=a(ot),Me=r(ot,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-1s3c06i"&&(Me.innerHTML=qt),ot.forEach(n),yt=a(w),N=r(w,"DIV",{class:!0});var at=J(N);d(se.$$.fragment,at),wt=a(at),Te=r(at,"P",{"data-svelte-h":!0}),_(Te)!=="svelte-pkn4ui"&&(Te.innerHTML=Ot),at.forEach(n),vt=a(w),V=r(w,"DIV",{class:!0});var st=J(V);d(ie.$$.fragment,st),Mt=a(st),Ie=r(st,"P",{"data-svelte-h":!0}),_(Ie)!=="svelte-14bnrb6"&&(Ie.textContent=Kt),st.forEach(n),Tt=a(w),L=r(w,"DIV",{class:!0});var it=J(L);d(re.$$.fragment,it),It=a(it),Je=r(it,"P",{"data-svelte-h":!0}),_(Je)!=="svelte-1xwrf7t"&&(Je.textContent=en),it.forEach(n),Jt=a(w),Ce=r(w,"DIV",{class:!0});var mn=J(Ce);d(le.$$.fragment,mn),mn.forEach(n),w.forEach(n),Oe=a(e),d(me.$$.fragment,e),Ke=a(e),y=r(e,"DIV",{class:!0});var M=J(y);d(pe.$$.fragment,M),Ct=a(M),Ue=r(M,"P",{"data-svelte-h":!0}),_(Ue)!=="svelte-1mk0zn"&&(Ue.textContent=tn),Ut=a(M),xe=r(M,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-44oie6"&&(xe.innerHTML=nn),xt=a(M),j=r(M,"DIV",{class:!0});var We=J(j);d(de.$$.fragment,We),kt=a(We),ke=r(We,"P",{"data-svelte-h":!0}),_(ke)!=="svelte-v78lg8"&&(ke.textContent=on),Zt=a(We),d(E.$$.fragment,We),We.forEach(n),jt=a(M),X=r(M,"DIV",{class:!0});var rt=J(X);d(ce.$$.fragment,rt),$t=a(rt),Ze=r(rt,"P",{"data-svelte-h":!0}),_(Ze)!=="svelte-1s3c06i"&&(Ze.innerHTML=an),rt.forEach(n),Gt=a(M),H=r(M,"DIV",{class:!0});var lt=J(H);d(ge.$$.fragment,lt),Pt=a(lt),je=r(lt,"P",{"data-svelte-h":!0}),_(je)!=="svelte-pkn4ui"&&(je.innerHTML=sn),lt.forEach(n),Wt=a(M),R=r(M,"DIV",{class:!0});var mt=J(R);d(he.$$.fragment,mt),Bt=a(mt),$e=r(mt,"P",{"data-svelte-h":!0}),_($e)!=="svelte-14bnrb6"&&($e.textContent=rn),mt.forEach(n),Nt=a(M),z=r(M,"DIV",{class:!0});var pt=J(z);d(fe.$$.fragment,pt),Vt=a(pt),Ge=r(pt,"P",{"data-svelte-h":!0}),_(Ge)!=="svelte-1xwrf7t"&&(Ge.textContent=ln),pt.forEach(n),Lt=a(M),Pe=r(M,"DIV",{class:!0});var pn=J(Pe);d(ue.$$.fragment,pn),pn.forEach(n),M.forEach(n),et=a(e),d(_e.$$.fragment,e),tt=a(e),Be=r(e,"P",{}),J(Be).forEach(n),this.h()},h(){T(u,"name","hf:doc:metadata"),T(u,"content",Tn),T(G,"class","flex flex-wrap space-x-1"),T(P,"class","tip"),T(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(y,"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,u),l(e,k,s),l(e,C,s),l(e,v,s),c(I,e,s),l(e,m,s),c(U,e,s),l(e,Ve,s),l(e,G,s),l(e,Le,s),l(e,Y,s),l(e,Ee,s),l(e,Q,s),l(e,Xe,s),l(e,P,s),l(e,He,s),c(F,e,s),l(e,Re,s),l(e,D,s),l(e,ze,s),c(A,e,s),l(e,Ye,s),c(S,e,s),l(e,Qe,s),l(e,q,s),l(e,Fe,s),l(e,O,s),l(e,De,s),l(e,K,s),l(e,Ae,s),c(ee,e,s),l(e,Se,s),c(te,e,s),l(e,qe,s),l(e,b,s),c(ne,b,null),t(b,ct),t(b,ye),t(b,gt),t(b,we),t(b,ht),t(b,Z),c(oe,Z,null),t(Z,ft),t(Z,ve),t(Z,ut),c(W,Z,null),t(b,_t),t(b,B),c(ae,B,null),t(B,bt),t(B,Me),t(b,yt),t(b,N),c(se,N,null),t(N,wt),t(N,Te),t(b,vt),t(b,V),c(ie,V,null),t(V,Mt),t(V,Ie),t(b,Tt),t(b,L),c(re,L,null),t(L,It),t(L,Je),t(b,Jt),t(b,Ce),c(le,Ce,null),l(e,Oe,s),c(me,e,s),l(e,Ke,s),l(e,y,s),c(pe,y,null),t(y,Ct),t(y,Ue),t(y,Ut),t(y,xe),t(y,xt),t(y,j),c(de,j,null),t(j,kt),t(j,ke),t(j,Zt),c(E,j,null),t(y,jt),t(y,X),c(ce,X,null),t(X,$t),t(X,Ze),t(y,Gt),t(y,H),c(ge,H,null),t(H,Pt),t(H,je),t(y,Wt),t(y,R),c(he,R,null),t(R,Bt),t(R,$e),t(y,Nt),t(y,z),c(fe,z,null),t(z,Vt),t(z,Ge),t(y,Lt),t(y,Pe),c(ue,Pe,null),l(e,et,s),c(_e,e,s),l(e,tt,s),l(e,Be,s),nt=!0},p(e,[s]){const w={};s&2&&(w.$$scope={dirty:s,ctx:e}),W.$set(w);const $={};s&2&&($.$$scope={dirty:s,ctx:e}),E.$set($)},i(e){nt||(g(I.$$.fragment,e),g(U.$$.fragment,e),g(F.$$.fragment,e),g(A.$$.fragment,e),g(S.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(ne.$$.fragment,e),g(oe.$$.fragment,e),g(W.$$.fragment,e),g(ae.$$.fragment,e),g(se.$$.fragment,e),g(ie.$$.fragment,e),g(re.$$.fragment,e),g(le.$$.fragment,e),g(me.$$.fragment,e),g(pe.$$.fragment,e),g(de.$$.fragment,e),g(E.$$.fragment,e),g(ce.$$.fragment,e),g(ge.$$.fragment,e),g(he.$$.fragment,e),g(fe.$$.fragment,e),g(ue.$$.fragment,e),g(_e.$$.fragment,e),nt=!0)},o(e){h(I.$$.fragment,e),h(U.$$.fragment,e),h(F.$$.fragment,e),h(A.$$.fragment,e),h(S.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(ne.$$.fragment,e),h(oe.$$.fragment,e),h(W.$$.fragment,e),h(ae.$$.fragment,e),h(se.$$.fragment,e),h(ie.$$.fragment,e),h(re.$$.fragment,e),h(le.$$.fragment,e),h(me.$$.fragment,e),h(pe.$$.fragment,e),h(de.$$.fragment,e),h(E.$$.fragment,e),h(ce.$$.fragment,e),h(ge.$$.fragment,e),h(he.$$.fragment,e),h(fe.$$.fragment,e),h(ue.$$.fragment,e),h(_e.$$.fragment,e),nt=!1},d(e){e&&(n(k),n(C),n(v),n(m),n(Ve),n(G),n(Le),n(Y),n(Ee),n(Q),n(Xe),n(P),n(He),n(Re),n(D),n(ze),n(Ye),n(Qe),n(q),n(Fe),n(O),n(De),n(K),n(Ae),n(Se),n(qe),n(b),n(Oe),n(Ke),n(y),n(et),n(tt),n(Be)),n(u),f(I,e),f(U,e),f(F,e),f(A,e),f(S,e),f(ee,e),f(te,e),f(ne),f(oe),f(W),f(ae),f(se),f(ie),f(re),f(le),f(me,e),f(pe),f(de),f(E),f(ce),f(ge),f(he),f(fe),f(ue),f(_e,e)}}}const Tn='{"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}],"depth":1}';function In(be){return hn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $n extends fn{constructor(u){super(),un(this,u,In,Mn,gn,{})}}export{$n as component};
