Buckets:
| import{s as mn,o as dn,n as Nt}from"../chunks/scheduler.8c3d61f6.js";import{S as cn,i as gn,g as i,s as a,r as d,A as hn,h as r,f as n,c as s,j as x,u as c,x as _,k as J,y as t,a as l,v as g,d as h,t as f,w as u}from"../chunks/index.da70eac4.js";import{T as fn}from"../chunks/Tip.1d9b8c37.js";import{D as U}from"../chunks/Docstring.d7448bb3.js";import{C as pt}from"../chunks/CodeBlock.a9c4becf.js";import{E as pn}from"../chunks/ExampleCodeBlock.bdbc5937.js";import{H as Ve,E as un}from"../chunks/getInferenceSnippets.1d18021a.js";function _n(P){let m,k="Chroma can use all the same optimizations as Flux.";return{c(){m=i("p"),m.textContent=k},l(w){m=r(w,"P",{"data-svelte-h":!0}),_(m)!=="svelte-6y6pq4"&&(m.textContent=k)},m(w,v){l(w,m,v)},p:Nt,d(w){w&&n(m)}}}function bn(P){let m,k="Examples:",w,v,I;return v=new pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hUGlwZWxpbmUlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmxvZGVzdG9uZXMlMkZDaHJvbWElMjIlMEFja3B0X3BhdGglMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGbG9kZXN0b25lcyUyRkNocm9tYSUyRmJsb2IlMkZtYWluJTJGY2hyb21hLXVubG9ja2VkLXYzNy5zYWZldGVuc29ycyUyMiUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsLmZyb21fc2luZ2xlX2ZpbGUoY2twdF9wYXRoJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwQ2hyb21hUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTBBJTIwJTIwJTIwJTIwdHJhbnNmb3JtZXIlM0R0cmFuc2Zvcm1lciUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMEEpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQXByb21wdCUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkElMjBoaWdoLWZhc2hpb24lMjBjbG9zZS11cCUyMHBvcnRyYWl0JTIwb2YlMjBhJTIwYmxvbmRlJTIwd29tYW4lMjBpbiUyMGNsZWFyJTIwc3VuZ2xhc3Nlcy4lMjBUaGUlMjBpbWFnZSUyMHVzZXMlMjBhJTIwYm9sZCUyMHRlYWwlMjBhbmQlMjByZWQlMjBjb2xvciUyMHNwbGl0JTIwZm9yJTIwZHJhbWF0aWMlMjBsaWdodGluZy4lMjBUaGUlMjBiYWNrZ3JvdW5kJTIwaXMlMjBhJTIwc2ltcGxlJTIwdGVhbC1ncmVlbi4lMjBUaGUlMjBwaG90byUyMGlzJTIwc2hhcnAlMjBhbmQlMjB3ZWxsLWNvbXBvc2VkJTJDJTIwYW5kJTIwaXMlMjBkZXNpZ25lZCUyMGZvciUyMHZpZXdpbmclMjB3aXRoJTIwYW5hZ2x5cGglMjAzRCUyMGdsYXNzZXMlMjBmb3IlMjBvcHRpbWFsJTIwZWZmZWN0LiUyMEl0JTIwbG9va3MlMjBwcm9mZXNzaW9uYWxseSUyMGRvbmUuJTIyJTBBJTVEJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIybG93JTIwcXVhbGl0eSUyQyUyMHVnbHklMkMlMjB1bmZpbmlzaGVkJTJDJTIwb3V0JTIwb2YlMjBmb2N1cyUyQyUyMGRlZm9ybWVkJTJDJTIwZGlzZmlndXJlJTJDJTIwYmx1cnJ5JTJDJTIwc211ZGdlZCUyQyUyMHJlc3RyaWN0ZWQlMjBwYWxldHRlJTJDJTIwZmxhdCUyMGNvbG9ycyUyMiUwQSU1RCUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNocm9tYS5wbmclMjIp",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/Chroma"</span> | |
| <span class="hljs-meta">>>> </span>ckpt_path = <span class="hljs-string">"https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v37.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>)`,wrap:!1}}),{c(){m=i("p"),m.textContent=k,w=a(),d(v.$$.fragment)},l(p){m=r(p,"P",{"data-svelte-h":!0}),_(m)!=="svelte-kvfsh7"&&(m.textContent=k),w=s(p),c(v.$$.fragment,p)},m(p,C){l(p,m,C),l(p,w,C),g(v,p,C),I=!0},p:Nt,i(p){I||(h(v.$$.fragment,p),I=!0)},o(p){f(v.$$.fragment,p),I=!1},d(p){p&&(n(m),n(w)),u(v,p)}}}function yn(P){let m,k="Examples:",w,v,I;return v=new pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hVHJhbnNmb3JtZXIyRE1vZGVsJTJDJTIwQ2hyb21hSW1nMkltZ1BpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJsb2Rlc3RvbmVzJTJGQ2hyb21hJTIyJTBBY2twdF9wYXRoJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmxvZGVzdG9uZXMlMkZDaHJvbWElMkZibG9iJTJGbWFpbiUyRmNocm9tYS11bmxvY2tlZC12Mzcuc2FmZXRlbnNvcnMlMjIlMEFwaXBlJTIwJTNEJTIwQ2hyb21hSW1nMkltZ1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUyQyUwQSUyMCUyMCUyMCUyMHRyYW5zZm9ybWVyJTNEdHJhbnNmb3JtZXIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTJDJTBBKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEFpbml0X2ltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZDb21wVmlzJTJGc3RhYmxlLWRpZmZ1c2lvbiUyRm1haW4lMkZhc3NldHMlMkZzdGFibGUtc2FtcGxlcyUyRmltZzJpbWclMkZza2V0Y2gtbW91bnRhaW5zLWlucHV0LmpwZyUyMiUwQSklMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwc2NlbmljJTIwZmFzdGFzeSUyMGxhbmRzY2FwZSUyMHdpdGglMjBhJTIwcml2ZXIlMjBhbmQlMjBtb3VudGFpbnMlMjBpbiUyMHRoZSUyMGJhY2tncm91bmQlMkMlMjB2aWJyYW50JTIwY29sb3JzJTJDJTIwZGV0YWlsZWQlMkMlMjBoaWdoJTIwcmVzb2x1dGlvbiUyMiUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMmxvdyUyMHF1YWxpdHklMkMlMjB1Z2x5JTJDJTIwdW5maW5pc2hlZCUyQyUyMG91dCUyMG9mJTIwZm9jdXMlMkMlMjBkZWZvcm1lZCUyQyUyMGRpc2ZpZ3VyZSUyQyUyMGJsdXJyeSUyQyUyMHNtdWRnZWQlMkMlMjByZXN0cmljdGVkJTIwcGFsZXR0ZSUyQyUyMGZsYXQlMjBjb2xvcnMlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwaW1hZ2UlM0Rpbml0X2ltYWdlJTJDJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJjaHJvbWEtaW1nMmltZy5wbmclMjIp",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/Chroma"</span> | |
| <span class="hljs-meta">>>> </span>ckpt_path = <span class="hljs-string">"https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v37.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>)`,wrap:!1}}),{c(){m=i("p"),m.textContent=k,w=a(),d(v.$$.fragment)},l(p){m=r(p,"P",{"data-svelte-h":!0}),_(m)!=="svelte-kvfsh7"&&(m.textContent=k),w=s(p),c(v.$$.fragment,p)},m(p,C){l(p,m,C),l(p,w,C),g(v,p,C),I=!0},p:Nt,i(p){I||(h(v.$$.fragment,p),I=!0)},o(p){f(v.$$.fragment,p),I=!1},d(p){p&&(n(m),n(w)),u(v,p)}}}function vn(P){let m,k,w,v,I,p,C,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&logo=apple&logoColor=white%22"/>',Ne,Y,Lt="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>.',Le,G,He,D,Xe,F,Xt='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>.',Re,A,ze,S,Ye,q,Rt="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.",Qe,O,zt="The following example demonstrates how to run Chroma from a single file.",De,K,Yt="Then run the following example",Fe,ee,Ae,te,Se,b,ne,mt,ye,Qt="The Chroma pipeline for text-to-image generation.",dt,ve,Dt='Reference: <a href="https://huggingface.co/lodestones/Chroma/" rel="nofollow">https://huggingface.co/lodestones/Chroma/</a>',ct,Z,oe,gt,we,Ft="Function invoked when calling the pipeline for generation.",ht,W,ft,B,ae,ut,Me,At=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,_t,V,se,bt,Te,St=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,yt,N,ie,vt,Ie,qt=`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.`,wt,E,re,Mt,Je,Ot=`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.`,Tt,Ce,le,qe,pe,Oe,y,me,It,xe,Kt="The Chroma pipeline for image-to-image generation.",Jt,Ue,en='Reference: <a href="https://huggingface.co/lodestones/Chroma/" rel="nofollow">https://huggingface.co/lodestones/Chroma/</a>',Ct,j,de,xt,ke,tn="Function invoked when calling the pipeline for generation.",Ut,L,kt,H,ce,Zt,Ze,nn=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,jt,X,ge,$t,je,on=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Pt,R,he,Gt,$e,an=`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.`,Wt,z,fe,Bt,Pe,sn=`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.`,Vt,Ge,ue,Ke,_e,et,Be,tt;return I=new Ve({props:{title:"Chroma",local:"chroma",headingTag:"h1"}}),G=new fn({props:{$$slots:{default:[_n]},$$scope:{ctx:P}}}),D=new Ve({props:{title:"Inference",local:"inference",headingTag:"h2"}}),A=new pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ2hyb21hUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwQ2hyb21hUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMmxvZGVzdG9uZXMlMkZDaHJvbWElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUuZW5hYmVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQSUwQXByb21wdCUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkElMjBoaWdoLWZhc2hpb24lMjBjbG9zZS11cCUyMHBvcnRyYWl0JTIwb2YlMjBhJTIwYmxvbmRlJTIwd29tYW4lMjBpbiUyMGNsZWFyJTIwc3VuZ2xhc3Nlcy4lMjBUaGUlMjBpbWFnZSUyMHVzZXMlMjBhJTIwYm9sZCUyMHRlYWwlMjBhbmQlMjByZWQlMjBjb2xvciUyMHNwbGl0JTIwZm9yJTIwZHJhbWF0aWMlMjBsaWdodGluZy4lMjBUaGUlMjBiYWNrZ3JvdW5kJTIwaXMlMjBhJTIwc2ltcGxlJTIwdGVhbC1ncmVlbi4lMjBUaGUlMjBwaG90byUyMGlzJTIwc2hhcnAlMjBhbmQlMjB3ZWxsLWNvbXBvc2VkJTJDJTIwYW5kJTIwaXMlMjBkZXNpZ25lZCUyMGZvciUyMHZpZXdpbmclMjB3aXRoJTIwYW5hZ2x5cGglMjAzRCUyMGdsYXNzZXMlMjBmb3IlMjBvcHRpbWFsJTIwZWZmZWN0LiUyMEl0JTIwbG9va3MlMjBwcm9mZXNzaW9uYWxseSUyMGRvbmUuJTIyJTBBJTVEJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTIwJTVCJTIybG93JTIwcXVhbGl0eSUyQyUyMHVnbHklMkMlMjB1bmZpbmlzaGVkJTJDJTIwb3V0JTIwb2YlMjBmb2N1cyUyQyUyMGRlZm9ybWVkJTJDJTIwZGlzZmlndXJlJTJDJTIwYmx1cnJ5JTJDJTIwc211ZGdlZCUyQyUyMHJlc3RyaWN0ZWQlMjBwYWxldHRlJTJDJTIwZmxhdCUyMGNvbG9ycyUyMiU1RCUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBnZW5lcmF0b3IlM0R0b3JjaC5HZW5lcmF0b3IoJTIyY3B1JTIyKS5tYW51YWxfc2VlZCg0MzMpJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDQwJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0QzLjAlMkMlMEElMjAlMjAlMjAlMjBudW1faW1hZ2VzX3Blcl9wcm9tcHQlM0QxJTJDJTBBKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJjaHJvbWEucG5nJTIyKQ==",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/Chroma"</span>, torch_dtype=torch.bfloat16) | |
| pipe.enabe_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>)`,wrap:!1}}),S=new Ve({props:{title:"Loading from a single file",local:"loading-from-a-single-file",headingTag:"h2"}}),ee=new pt({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">"lodestones/Chroma"</span> | |
| dtype = torch.bfloat16 | |
| transformer = ChromaTransformer2DModel.from_single_file(<span class="hljs-string">"https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v37.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>)`,wrap:!1}}),te=new Ve({props:{title:"ChromaPipeline",local:"diffusers.ChromaPipeline",headingTag:"h2"}}),ne=new U({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/pr_11739/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_11739/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_11739/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_11739/src/diffusers/pipelines/chroma/pipeline_chroma.py#L150"}}),oe=new U({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>) — | |
| 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://arxiv.org/abs/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://arxiv.org/pdf/2205.11487.pdf" 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 ge 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_11739/src/diffusers/pipelines/chroma/pipeline_chroma.py#L614",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 pn({props:{anchor:"diffusers.ChromaPipeline.__call__.example",$$slots:{default:[bn]},$$scope:{ctx:P}}}),ae=new U({props:{name:"disable_vae_slicing",anchor:"diffusers.ChromaPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma.py#L513"}}),se=new U({props:{name:"disable_vae_tiling",anchor:"diffusers.ChromaPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma.py#L528"}}),ie=new U({props:{name:"enable_vae_slicing",anchor:"diffusers.ChromaPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma.py#L506"}}),re=new U({props:{name:"enable_vae_tiling",anchor:"diffusers.ChromaPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma.py#L520"}}),le=new U({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>) — | |
| 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_11739/src/diffusers/pipelines/chroma/pipeline_chroma.py#L261"}}),pe=new Ve({props:{title:"ChromaImg2ImgPipeline",local:"diffusers.ChromaImg2ImgPipeline",headingTag:"h2"}}),me=new U({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/pr_11739/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_11739/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_11739/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_11739/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L162"}}),de=new U({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 0x7faca4e2cf40>] = 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>) — | |
| 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__.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 5.0) — | |
| Guidance scale as defined in <a href="https://arxiv.org/abs/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://arxiv.org/pdf/2205.11487.pdf" 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 ge 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_11739/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L674",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> | |
| `}}),L=new pn({props:{anchor:"diffusers.ChromaImg2ImgPipeline.__call__.example",$$slots:{default:[yn]},$$scope:{ctx:P}}}),ce=new U({props:{name:"disable_vae_slicing",anchor:"diffusers.ChromaImg2ImgPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L547"}}),ge=new U({props:{name:"disable_vae_tiling",anchor:"diffusers.ChromaImg2ImgPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L562"}}),he=new U({props:{name:"enable_vae_slicing",anchor:"diffusers.ChromaImg2ImgPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L540"}}),fe=new U({props:{name:"enable_vae_tiling",anchor:"diffusers.ChromaImg2ImgPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11739/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L554"}}),ue=new U({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>) — | |
| 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_11739/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py#L290"}}),_e=new un({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/chroma.md"}}),{c(){m=i("meta"),k=a(),w=i("p"),v=a(),d(I.$$.fragment),p=a(),C=i("div"),C.innerHTML=Et,Ne=a(),Y=i("p"),Y.textContent=Lt,Ee=a(),Q=i("p"),Q.innerHTML=Ht,Le=a(),d(G.$$.fragment),He=a(),d(D.$$.fragment),Xe=a(),F=i("p"),F.innerHTML=Xt,Re=a(),d(A.$$.fragment),ze=a(),d(S.$$.fragment),Ye=a(),q=i("p"),q.innerHTML=Rt,Qe=a(),O=i("p"),O.textContent=zt,De=a(),K=i("p"),K.textContent=Yt,Fe=a(),d(ee.$$.fragment),Ae=a(),d(te.$$.fragment),Se=a(),b=i("div"),d(ne.$$.fragment),mt=a(),ye=i("p"),ye.textContent=Qt,dt=a(),ve=i("p"),ve.innerHTML=Dt,ct=a(),Z=i("div"),d(oe.$$.fragment),gt=a(),we=i("p"),we.textContent=Ft,ht=a(),d(W.$$.fragment),ft=a(),B=i("div"),d(ae.$$.fragment),ut=a(),Me=i("p"),Me.innerHTML=At,_t=a(),V=i("div"),d(se.$$.fragment),bt=a(),Te=i("p"),Te.innerHTML=St,yt=a(),N=i("div"),d(ie.$$.fragment),vt=a(),Ie=i("p"),Ie.textContent=qt,wt=a(),E=i("div"),d(re.$$.fragment),Mt=a(),Je=i("p"),Je.textContent=Ot,Tt=a(),Ce=i("div"),d(le.$$.fragment),qe=a(),d(pe.$$.fragment),Oe=a(),y=i("div"),d(me.$$.fragment),It=a(),xe=i("p"),xe.textContent=Kt,Jt=a(),Ue=i("p"),Ue.innerHTML=en,Ct=a(),j=i("div"),d(de.$$.fragment),xt=a(),ke=i("p"),ke.textContent=tn,Ut=a(),d(L.$$.fragment),kt=a(),H=i("div"),d(ce.$$.fragment),Zt=a(),Ze=i("p"),Ze.innerHTML=nn,jt=a(),X=i("div"),d(ge.$$.fragment),$t=a(),je=i("p"),je.innerHTML=on,Pt=a(),R=i("div"),d(he.$$.fragment),Gt=a(),$e=i("p"),$e.textContent=an,Wt=a(),z=i("div"),d(fe.$$.fragment),Bt=a(),Pe=i("p"),Pe.textContent=sn,Vt=a(),Ge=i("div"),d(ue.$$.fragment),Ke=a(),d(_e.$$.fragment),et=a(),Be=i("p"),this.h()},l(e){const o=hn("svelte-u9bgzb",document.head);m=r(o,"META",{name:!0,content:!0}),o.forEach(n),k=s(e),w=r(e,"P",{}),x(w).forEach(n),v=s(e),c(I.$$.fragment,e),p=s(e),C=r(e,"DIV",{class:!0,"data-svelte-h":!0}),_(C)!=="svelte-1elo7hh"&&(C.innerHTML=Et),Ne=s(e),Y=r(e,"P",{"data-svelte-h":!0}),_(Y)!=="svelte-zz935e"&&(Y.textContent=Lt),Ee=s(e),Q=r(e,"P",{"data-svelte-h":!0}),_(Q)!=="svelte-13s2per"&&(Q.innerHTML=Ht),Le=s(e),c(G.$$.fragment,e),He=s(e),c(D.$$.fragment,e),Xe=s(e),F=r(e,"P",{"data-svelte-h":!0}),_(F)!=="svelte-fh23pg"&&(F.innerHTML=Xt),Re=s(e),c(A.$$.fragment,e),ze=s(e),c(S.$$.fragment,e),Ye=s(e),q=r(e,"P",{"data-svelte-h":!0}),_(q)!=="svelte-1dlqcbc"&&(q.innerHTML=Rt),Qe=s(e),O=r(e,"P",{"data-svelte-h":!0}),_(O)!=="svelte-1fix8nw"&&(O.textContent=zt),De=s(e),K=r(e,"P",{"data-svelte-h":!0}),_(K)!=="svelte-15rpvn4"&&(K.textContent=Yt),Fe=s(e),c(ee.$$.fragment,e),Ae=s(e),c(te.$$.fragment,e),Se=s(e),b=r(e,"DIV",{class:!0});var M=x(b);c(ne.$$.fragment,M),mt=s(M),ye=r(M,"P",{"data-svelte-h":!0}),_(ye)!=="svelte-x23rez"&&(ye.textContent=Qt),dt=s(M),ve=r(M,"P",{"data-svelte-h":!0}),_(ve)!=="svelte-44oie6"&&(ve.innerHTML=Dt),ct=s(M),Z=r(M,"DIV",{class:!0});var $=x(Z);c(oe.$$.fragment,$),gt=s($),we=r($,"P",{"data-svelte-h":!0}),_(we)!=="svelte-v78lg8"&&(we.textContent=Ft),ht=s($),c(W.$$.fragment,$),$.forEach(n),ft=s(M),B=r(M,"DIV",{class:!0});var be=x(B);c(ae.$$.fragment,be),ut=s(be),Me=r(be,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-1s3c06i"&&(Me.innerHTML=At),be.forEach(n),_t=s(M),V=r(M,"DIV",{class:!0});var nt=x(V);c(se.$$.fragment,nt),bt=s(nt),Te=r(nt,"P",{"data-svelte-h":!0}),_(Te)!=="svelte-pkn4ui"&&(Te.innerHTML=St),nt.forEach(n),yt=s(M),N=r(M,"DIV",{class:!0});var ot=x(N);c(ie.$$.fragment,ot),vt=s(ot),Ie=r(ot,"P",{"data-svelte-h":!0}),_(Ie)!=="svelte-14bnrb6"&&(Ie.textContent=qt),ot.forEach(n),wt=s(M),E=r(M,"DIV",{class:!0});var at=x(E);c(re.$$.fragment,at),Mt=s(at),Je=r(at,"P",{"data-svelte-h":!0}),_(Je)!=="svelte-1xwrf7t"&&(Je.textContent=Ot),at.forEach(n),Tt=s(M),Ce=r(M,"DIV",{class:!0});var rn=x(Ce);c(le.$$.fragment,rn),rn.forEach(n),M.forEach(n),qe=s(e),c(pe.$$.fragment,e),Oe=s(e),y=r(e,"DIV",{class:!0});var T=x(y);c(me.$$.fragment,T),It=s(T),xe=r(T,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-1mk0zn"&&(xe.textContent=Kt),Jt=s(T),Ue=r(T,"P",{"data-svelte-h":!0}),_(Ue)!=="svelte-44oie6"&&(Ue.innerHTML=en),Ct=s(T),j=r(T,"DIV",{class:!0});var We=x(j);c(de.$$.fragment,We),xt=s(We),ke=r(We,"P",{"data-svelte-h":!0}),_(ke)!=="svelte-v78lg8"&&(ke.textContent=tn),Ut=s(We),c(L.$$.fragment,We),We.forEach(n),kt=s(T),H=r(T,"DIV",{class:!0});var st=x(H);c(ce.$$.fragment,st),Zt=s(st),Ze=r(st,"P",{"data-svelte-h":!0}),_(Ze)!=="svelte-1s3c06i"&&(Ze.innerHTML=nn),st.forEach(n),jt=s(T),X=r(T,"DIV",{class:!0});var it=x(X);c(ge.$$.fragment,it),$t=s(it),je=r(it,"P",{"data-svelte-h":!0}),_(je)!=="svelte-pkn4ui"&&(je.innerHTML=on),it.forEach(n),Pt=s(T),R=r(T,"DIV",{class:!0});var rt=x(R);c(he.$$.fragment,rt),Gt=s(rt),$e=r(rt,"P",{"data-svelte-h":!0}),_($e)!=="svelte-14bnrb6"&&($e.textContent=an),rt.forEach(n),Wt=s(T),z=r(T,"DIV",{class:!0});var lt=x(z);c(fe.$$.fragment,lt),Bt=s(lt),Pe=r(lt,"P",{"data-svelte-h":!0}),_(Pe)!=="svelte-1xwrf7t"&&(Pe.textContent=sn),lt.forEach(n),Vt=s(T),Ge=r(T,"DIV",{class:!0});var ln=x(Ge);c(ue.$$.fragment,ln),ln.forEach(n),T.forEach(n),Ke=s(e),c(_e.$$.fragment,e),et=s(e),Be=r(e,"P",{}),x(Be).forEach(n),this.h()},h(){J(m,"name","hf:doc:metadata"),J(m,"content",wn),J(C,"class","flex flex-wrap space-x-1"),J(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(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,o){t(document.head,m),l(e,k,o),l(e,w,o),l(e,v,o),g(I,e,o),l(e,p,o),l(e,C,o),l(e,Ne,o),l(e,Y,o),l(e,Ee,o),l(e,Q,o),l(e,Le,o),g(G,e,o),l(e,He,o),g(D,e,o),l(e,Xe,o),l(e,F,o),l(e,Re,o),g(A,e,o),l(e,ze,o),g(S,e,o),l(e,Ye,o),l(e,q,o),l(e,Qe,o),l(e,O,o),l(e,De,o),l(e,K,o),l(e,Fe,o),g(ee,e,o),l(e,Ae,o),g(te,e,o),l(e,Se,o),l(e,b,o),g(ne,b,null),t(b,mt),t(b,ye),t(b,dt),t(b,ve),t(b,ct),t(b,Z),g(oe,Z,null),t(Z,gt),t(Z,we),t(Z,ht),g(W,Z,null),t(b,ft),t(b,B),g(ae,B,null),t(B,ut),t(B,Me),t(b,_t),t(b,V),g(se,V,null),t(V,bt),t(V,Te),t(b,yt),t(b,N),g(ie,N,null),t(N,vt),t(N,Ie),t(b,wt),t(b,E),g(re,E,null),t(E,Mt),t(E,Je),t(b,Tt),t(b,Ce),g(le,Ce,null),l(e,qe,o),g(pe,e,o),l(e,Oe,o),l(e,y,o),g(me,y,null),t(y,It),t(y,xe),t(y,Jt),t(y,Ue),t(y,Ct),t(y,j),g(de,j,null),t(j,xt),t(j,ke),t(j,Ut),g(L,j,null),t(y,kt),t(y,H),g(ce,H,null),t(H,Zt),t(H,Ze),t(y,jt),t(y,X),g(ge,X,null),t(X,$t),t(X,je),t(y,Pt),t(y,R),g(he,R,null),t(R,Gt),t(R,$e),t(y,Wt),t(y,z),g(fe,z,null),t(z,Bt),t(z,Pe),t(y,Vt),t(y,Ge),g(ue,Ge,null),l(e,Ke,o),g(_e,e,o),l(e,et,o),l(e,Be,o),tt=!0},p(e,[o]){const M={};o&2&&(M.$$scope={dirty:o,ctx:e}),G.$set(M);const $={};o&2&&($.$$scope={dirty:o,ctx:e}),W.$set($);const be={};o&2&&(be.$$scope={dirty:o,ctx:e}),L.$set(be)},i(e){tt||(h(I.$$.fragment,e),h(G.$$.fragment,e),h(D.$$.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(pe.$$.fragment,e),h(me.$$.fragment,e),h(de.$$.fragment,e),h(L.$$.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),tt=!0)},o(e){f(I.$$.fragment,e),f(G.$$.fragment,e),f(D.$$.fragment,e),f(A.$$.fragment,e),f(S.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(ne.$$.fragment,e),f(oe.$$.fragment,e),f(W.$$.fragment,e),f(ae.$$.fragment,e),f(se.$$.fragment,e),f(ie.$$.fragment,e),f(re.$$.fragment,e),f(le.$$.fragment,e),f(pe.$$.fragment,e),f(me.$$.fragment,e),f(de.$$.fragment,e),f(L.$$.fragment,e),f(ce.$$.fragment,e),f(ge.$$.fragment,e),f(he.$$.fragment,e),f(fe.$$.fragment,e),f(ue.$$.fragment,e),f(_e.$$.fragment,e),tt=!1},d(e){e&&(n(k),n(w),n(v),n(p),n(C),n(Ne),n(Y),n(Ee),n(Q),n(Le),n(He),n(Xe),n(F),n(Re),n(ze),n(Ye),n(q),n(Qe),n(O),n(De),n(K),n(Fe),n(Ae),n(Se),n(b),n(qe),n(Oe),n(y),n(Ke),n(et),n(Be)),n(m),u(I,e),u(G,e),u(D,e),u(A,e),u(S,e),u(ee,e),u(te,e),u(ne),u(oe),u(W),u(ae),u(se),u(ie),u(re),u(le),u(pe,e),u(me),u(de),u(L),u(ce),u(ge),u(he),u(fe),u(ue),u(_e,e)}}}const wn='{"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 Mn(P){return dn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zn extends cn{constructor(m){super(),gn(this,m,Mn,vn,mn,{})}}export{Zn as component}; | |
Xet Storage Details
- Size:
- 68.5 kB
- Xet hash:
- 2cd0392cd4425522cd92dc5d3f83abaadd17788ad4027b16569086a9be39ba52
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.