Buckets:

rtrm's picture
download
raw
39 kB
import{s as It,o as Ct,n as Ut}from"../chunks/scheduler.8c3d61f6.js";import{S as $t,i as Jt,g as l,s as n,r as u,A as kt,h as a,f as o,c as s,j as K,u as h,x as p,k as T,y as i,a as r,v as _,d as b,t as v,w as M}from"../chunks/index.da70eac4.js";import{T as Tt}from"../chunks/Tip.6f698f24.js";import{D as fe}from"../chunks/Docstring.634d8861.js";import{C as xt}from"../chunks/CodeBlock.a9c4becf.js";import{H as he,E as Pt}from"../chunks/getInferenceSnippets.ea1775db.js";function Kt(te){let d,w='Using an IP Adapter with Kolors requires more than 24GB of VRAM. To use it, we recommend using <a href="/docs/diffusers/pr_12403/en/api/pipelines/overview#diffusers.DiffusionPipeline.enable_model_cpu_offload">enable_model_cpu_offload()</a> on consumer GPUs.';return{c(){d=l("p"),d.innerHTML=w},l(g){d=a(g,"P",{"data-svelte-h":!0}),p(d)!=="svelte-f8v7us"&&(d.innerHTML=w)},m(g,x){r(g,d,x)},p:Ut,d(g){g&&o(d)}}}function jt(te){let d,w="While Kolors is integrated in Diffusers, you need to load the image encoder from a revision to use the safetensor files. You can still use the main branch of the original repository if you’re comfortable loading pickle checkpoints.";return{c(){d=l("p"),d.textContent=w},l(g){d=a(g,"P",{"data-svelte-h":!0}),p(d)!=="svelte-lkmklu"&&(d.textContent=w)},m(g,x){r(g,d,x)},p:Ut,d(g){g&&o(d)}}}function Lt(te){let d,w,g,x,j,_e,U,nt='<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"/>',be,L,st='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/kolors/kolors_header_collage.png"/>',ve,Z,rt='Kolors is a large-scale text-to-image generation model based on latent diffusion, developed by <a href="https://github.com/Kwai-Kolors/Kolors" rel="nofollow">the Kuaishou Kolors team</a>. Trained on billions of text-image pairs, Kolors exhibits significant advantages over both open-source and closed-source models in visual quality, complex semantic accuracy, and text rendering for both Chinese and English characters. Furthermore, Kolors supports both Chinese and English inputs, demonstrating strong performance in understanding and generating Chinese-specific content. For more details, please refer to this <a href="https://github.com/Kwai-Kolors/Kolors/blob/master/imgs/Kolors_paper.pdf" rel="nofollow">technical report</a>.',Me,E,it="The abstract from the technical report is:",ye,Q,lt='<em>We present Kolors, a latent diffusion model for text-to-image synthesis, characterized by its profound understanding of both English and Chinese, as well as an impressive degree of photorealism. There are three key insights contributing to the development of Kolors. Firstly, unlike large language model T5 used in Imagen and Stable Diffusion 3, Kolors is built upon the General Language Model (GLM), which enhances its comprehension capabilities in both English and Chinese. Moreover, we employ a multimodal large language model to recaption the extensive training dataset for fine-grained text understanding. These strategies significantly improve Kolors’ ability to comprehend intricate semantics, particularly those involving multiple entities, and enable its advanced text rendering capabilities. Secondly, we divide the training of Kolors into two phases: the concept learning phase with broad knowledge and the quality improvement phase with specifically curated high-aesthetic data. Furthermore, we investigate the critical role of the noise schedule and introduce a novel schedule to optimize high-resolution image generation. These strategies collectively enhance the visual appeal of the generated high-resolution images. Lastly, we propose a category-balanced benchmark KolorsPrompts, which serves as a guide for the training and evaluation of Kolors. Consequently, even when employing the commonly used U-Net backbone, Kolors has demonstrated remarkable performance in human evaluations, surpassing the existing open-source models and achieving Midjourney-v6 level performance, especially in terms of visual appeal. We will release the code and weights of Kolors at <a href="https://github.com/Kwai-Kolors/Kolors" rel="nofollow">https://github.com/Kwai-Kolors/Kolors</a>, and hope that it will benefit future research and applications in the visual generation community.</em>',we,D,Te,R,xe,S,Ue,W,at='Kolors needs a different IP Adapter to work, and it uses <a href="https://huggingface.co/openai/clip-vit-large-patch14-336" rel="nofollow">Openai-CLIP-336</a> as an image encoder.',Ie,I,Ce,C,$e,G,Je,V,ke,m,z,We,oe,dt="Pipeline for text-to-image generation using Kolors.",Ge,ne,pt=`This model inherits from <a href="/docs/diffusers/pr_12403/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`,Ve,se,mt="The pipeline also inherits the following loading methods:",ze,re,ct='<li><a href="/docs/diffusers/pr_12403/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/pr_12403/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/pr_12403/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',Ne,$,N,qe,ie,gt="Encodes the prompt into text encoder hidden states.",Ye,J,q,Fe,le,ft='See <a href="https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298" rel="nofollow">https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298</a>',Pe,Y,ut="<li>all</li> <li><strong>call</strong></li>",Ke,F,je,c,H,He,ae,ht="Pipeline for text-to-image generation using Kolors.",Xe,de,_t=`This model inherits from <a href="/docs/diffusers/pr_12403/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`,Ae,pe,bt="The pipeline also inherits the following loading methods:",Be,me,vt='<li><a href="/docs/diffusers/pr_12403/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/pr_12403/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/pr_12403/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',Oe,k,X,et,ce,Mt="Encodes the prompt into text encoder hidden states.",tt,P,A,ot,ge,yt='See <a href="https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298" rel="nofollow">https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298</a>',Le,B,wt="<li>all</li> <li><strong>call</strong></li>",Ze,O,Ee,ue,Qe;return j=new he({props:{title:"Kolors: Effective Training of Diffusion Model for Photorealistic Text-to-Image Synthesis",local:"kolors-effective-training-of-diffusion-model-for-photorealistic-text-to-image-synthesis",headingTag:"h1"}}),D=new he({props:{title:"Usage Example",local:"usage-example",headingTag:"h2"}}),R=new xt({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRFBNU29sdmVyTXVsdGlzdGVwU2NoZWR1bGVyJTJDJTIwS29sb3JzUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwS29sb3JzUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMkt3YWktS29sb3JzJTJGS29sb3JzLWRpZmZ1c2VycyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyKSUwQXBpcGUudG8oJTIyY3VkYSUyMiklMEFwaXBlLnNjaGVkdWxlciUyMCUzRCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlLnNjaGVkdWxlci5jb25maWclMkMlMjB1c2Vfa2FycmFzX3NpZ21hcyUzRFRydWUpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRCclRTQlQjglODAlRTUlQkMlQTAlRTclOTMlQTIlRTglOTklQUIlRTclOUElODQlRTclODUlQTclRTclODklODclRUYlQkMlOEMlRTUlQkUlQUUlRTglQjclOUQlRUYlQkMlOEMlRTUlOEYlOTglRTclODQlQTYlRUYlQkMlOEMlRTklQUIlOTglRTglQjQlQTglRTklODclOEYlRUYlQkMlOEMlRTclOTQlQjUlRTUlQkQlQjElRUYlQkMlOEMlRTYlOEIlQkYlRTclOUQlODAlRTQlQjglODAlRTQlQjglQUElRTclODklOEMlRTUlQUQlOTAlRUYlQkMlOEMlRTUlODYlOTklRTclOUQlODAlMjIlRTUlOEYlQUYlRTUlOUIlQkUlMjInJTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEJTIyJTIyJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q2LjUlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjUlMkMlMEEpLmltYWdlcyU1QjAlNUQlMEElMEFpbWFnZS5zYXZlKCUyMmtvbG9yc19zYW1wbGUucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DPMSolverMultistepScheduler, KolorsPipeline
pipe = KolorsPipeline.from_pretrained(<span class="hljs-string">&quot;Kwai-Kolors/Kolors-diffusers&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=<span class="hljs-literal">True</span>)
image = pipe(
prompt=<span class="hljs-string">&#x27;一张瓢虫的照片,微距,变焦,高质量,电影,拿着一个牌子,写着&quot;可图&quot;&#x27;</span>,
negative_prompt=<span class="hljs-string">&quot;&quot;</span>,
guidance_scale=<span class="hljs-number">6.5</span>,
num_inference_steps=<span class="hljs-number">25</span>,
).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;kolors_sample.png&quot;</span>)`,wrap:!1}}),S=new he({props:{title:"IP Adapter",local:"ip-adapter",headingTag:"h3"}}),I=new Tt({props:{$$slots:{default:[Kt]},$$scope:{ctx:te}}}),C=new Tt({props:{$$slots:{default:[jt]},$$scope:{ctx:te}}}),G=new xt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ0xJUFZpc2lvbk1vZGVsV2l0aFByb2plY3Rpb24lMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRFBNU29sdmVyTXVsdGlzdGVwU2NoZWR1bGVyJTJDJTIwS29sb3JzUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQSUwQWltYWdlX2VuY29kZXIlMjAlM0QlMjBDTElQVmlzaW9uTW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyS3dhaS1Lb2xvcnMlMkZLb2xvcnMtSVAtQWRhcHRlci1QbHVzJTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIyaW1hZ2VfZW5jb2RlciUyMiUyQyUwQSUyMCUyMCUyMCUyMGxvd19jcHVfbWVtX3VzYWdlJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSUyMCUyMCUyMCUyMHJldmlzaW9uJTNEJTIycmVmcyUyRnByJTJGNCUyMiUyQyUwQSklMEElMEFwaXBlJTIwJTNEJTIwS29sb3JzUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkt3YWktS29sb3JzJTJGS29sb3JzLWRpZmZ1c2VycyUyMiUyQyUyMGltYWdlX2VuY29kZXIlM0RpbWFnZV9lbmNvZGVyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMEEpJTBBcGlwZS5zY2hlZHVsZXIlMjAlM0QlMjBEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9jb25maWcocGlwZS5zY2hlZHVsZXIuY29uZmlnJTJDJTIwdXNlX2thcnJhc19zaWdtYXMlM0RUcnVlKSUwQSUwQXBpcGUubG9hZF9pcF9hZGFwdGVyKCUwQSUyMCUyMCUyMCUyMCUyMkt3YWktS29sb3JzJTJGS29sb3JzLUlQLUFkYXB0ZXItUGx1cyUyMiUyQyUwQSUyMCUyMCUyMCUyMHN1YmZvbGRlciUzRCUyMiUyMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9uYW1lJTNEJTIyaXBfYWRhcHRlcl9wbHVzX2dlbmVyYWwuc2FmZXRlbnNvcnMlMjIlMkMlMEElMjAlMjAlMjAlMjByZXZpc2lvbiUzRCUyMnJlZnMlMkZwciUyRjQlMjIlMkMlMEElMjAlMjAlMjAlMjBpbWFnZV9lbmNvZGVyX2ZvbGRlciUzRE5vbmUlMkMlMEEpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQSUwQWlwYV9pbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGa29sb3JzJTJGY2F0X3NxdWFyZS5wbmclMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRCUyMmJlc3QlMjBxdWFsaXR5JTJDJTIwaGlnaCUyMHF1YWxpdHklMjIlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0QlMjIlMjIlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDYuNSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyNSUyQyUwQSUyMCUyMCUyMCUyMGlwX2FkYXB0ZXJfaW1hZ2UlM0RpcGFfaW1hZ2UlMkMlMEEpLmltYWdlcyU1QjAlNUQlMEElMEFpbWFnZS5zYXZlKCUyMmtvbG9yc19pcGFfc2FtcGxlLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionModelWithProjection
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DPMSolverMultistepScheduler, KolorsPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
<span class="hljs-string">&quot;Kwai-Kolors/Kolors-IP-Adapter-Plus&quot;</span>,
subfolder=<span class="hljs-string">&quot;image_encoder&quot;</span>,
low_cpu_mem_usage=<span class="hljs-literal">True</span>,
torch_dtype=torch.float16,
revision=<span class="hljs-string">&quot;refs/pr/4&quot;</span>,
)
pipe = KolorsPipeline.from_pretrained(
<span class="hljs-string">&quot;Kwai-Kolors/Kolors-diffusers&quot;</span>, image_encoder=image_encoder, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>
)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=<span class="hljs-literal">True</span>)
pipe.load_ip_adapter(
<span class="hljs-string">&quot;Kwai-Kolors/Kolors-IP-Adapter-Plus&quot;</span>,
subfolder=<span class="hljs-string">&quot;&quot;</span>,
weight_name=<span class="hljs-string">&quot;ip_adapter_plus_general.safetensors&quot;</span>,
revision=<span class="hljs-string">&quot;refs/pr/4&quot;</span>,
image_encoder_folder=<span class="hljs-literal">None</span>,
)
pipe.enable_model_cpu_offload()
ipa_image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/kolors/cat_square.png&quot;</span>)
image = pipe(
prompt=<span class="hljs-string">&quot;best quality, high quality&quot;</span>,
negative_prompt=<span class="hljs-string">&quot;&quot;</span>,
guidance_scale=<span class="hljs-number">6.5</span>,
num_inference_steps=<span class="hljs-number">25</span>,
ip_adapter_image=ipa_image,
).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;kolors_ipa_sample.png&quot;</span>)`,wrap:!1}}),V=new he({props:{title:"KolorsPipeline",local:"diffusers.KolorsPipeline",headingTag:"h2"}}),z=new fe({props:{name:"class diffusers.KolorsPipeline",anchor:"diffusers.KolorsPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": ChatGLMModel"},{name:"tokenizer",val:": ChatGLMTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"},{name:"feature_extractor",val:": CLIPImageProcessor = None"},{name:"force_zeros_for_empty_prompt",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.KolorsPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_12403/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.KolorsPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>ChatGLMModel</code>) &#x2014;
Frozen text-encoder. Kolors uses <a href="https://huggingface.co/THUDM/chatglm3-6b" rel="nofollow">ChatGLM3-6B</a>.`,name:"text_encoder"},{anchor:"diffusers.KolorsPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>ChatGLMTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/THUDM/chatglm3-6b/blob/main/tokenization_chatglm.py" rel="nofollow">ChatGLMTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.KolorsPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/pr_12403/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.KolorsPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_12403/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/pr_12403/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_12403/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_12403/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.KolorsPipeline.force_zeros_for_empty_prompt",description:`<strong>force_zeros_for_empty_prompt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>&quot;False&quot;</code>) &#x2014;
Whether the negative prompt embeddings shall be forced to always be set to 0. Also see the config of
<code>Kwai-Kolors/Kolors-diffusers</code>.`,name:"force_zeros_for_empty_prompt"}],source:"https://github.com/huggingface/diffusers/blob/vr_12403/src/diffusers/pipelines/kolors/pipeline_kolors.py#L124"}}),N=new fe({props:{name:"encode_prompt",anchor:"diffusers.KolorsPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 256"}],parametersDescription:[{anchor:"diffusers.KolorsPipeline.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.KolorsPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.KolorsPipeline.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.KolorsPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.KolorsPipeline.encode_prompt.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
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.KolorsPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</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.KolorsPipeline.encode_prompt.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.KolorsPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</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.KolorsPipeline.encode_prompt.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_pooled_prompt_embeds"},{anchor:"diffusers.KolorsPipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 256) &#x2014; Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_12403/src/diffusers/pipelines/kolors/pipeline_kolors.py#L200"}}),q=new fe({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.KolorsPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:": Tensor"},{name:"embedding_dim",val:": int = 512"},{name:"dtype",val:": dtype = torch.float32"}],parametersDescription:[{anchor:"diffusers.KolorsPipeline.get_guidance_scale_embedding.w",description:`<strong>w</strong> (<code>torch.Tensor</code>) &#x2014;
Generate embedding vectors with a specified guidance scale to subsequently enrich timestep embeddings.`,name:"w"},{anchor:"diffusers.KolorsPipeline.get_guidance_scale_embedding.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimension of the embeddings to generate.`,name:"embedding_dim"},{anchor:"diffusers.KolorsPipeline.get_guidance_scale_embedding.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
Data type of the generated embeddings.`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_12403/src/diffusers/pipelines/kolors/pipeline_kolors.py#L601",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>Embedding vectors with shape <code>(len(w), embedding_dim)</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p><code>torch.Tensor</code></p>
`}}),F=new he({props:{title:"KolorsImg2ImgPipeline",local:"diffusers.KolorsImg2ImgPipeline",headingTag:"h2"}}),H=new fe({props:{name:"class diffusers.KolorsImg2ImgPipeline",anchor:"diffusers.KolorsImg2ImgPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": ChatGLMModel"},{name:"tokenizer",val:": ChatGLMTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"},{name:"feature_extractor",val:": CLIPImageProcessor = None"},{name:"force_zeros_for_empty_prompt",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.KolorsImg2ImgPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_12403/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.KolorsImg2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>ChatGLMModel</code>) &#x2014;
Frozen text-encoder. Kolors uses <a href="https://huggingface.co/THUDM/chatglm3-6b" rel="nofollow">ChatGLM3-6B</a>.`,name:"text_encoder"},{anchor:"diffusers.KolorsImg2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>ChatGLMTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/THUDM/chatglm3-6b/blob/main/tokenization_chatglm.py" rel="nofollow">ChatGLMTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.KolorsImg2ImgPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/pr_12403/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.KolorsImg2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_12403/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/pr_12403/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_12403/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_12403/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.KolorsImg2ImgPipeline.force_zeros_for_empty_prompt",description:`<strong>force_zeros_for_empty_prompt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>&quot;False&quot;</code>) &#x2014;
Whether the negative prompt embeddings shall be forced to always be set to 0. Also see the config of
<code>Kwai-Kolors/Kolors-diffusers</code>.`,name:"force_zeros_for_empty_prompt"}],source:"https://github.com/huggingface/diffusers/blob/vr_12403/src/diffusers/pipelines/kolors/pipeline_kolors_img2img.py#L143"}}),X=new fe({props:{name:"encode_prompt",anchor:"diffusers.KolorsImg2ImgPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 256"}],parametersDescription:[{anchor:"diffusers.KolorsImg2ImgPipeline.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.KolorsImg2ImgPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.KolorsImg2ImgPipeline.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.KolorsImg2ImgPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.KolorsImg2ImgPipeline.encode_prompt.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
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.KolorsImg2ImgPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</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.KolorsImg2ImgPipeline.encode_prompt.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.KolorsImg2ImgPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</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.KolorsImg2ImgPipeline.encode_prompt.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_pooled_prompt_embeds"},{anchor:"diffusers.KolorsImg2ImgPipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 256) &#x2014; Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_12403/src/diffusers/pipelines/kolors/pipeline_kolors_img2img.py#L220"}}),A=new fe({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.KolorsImg2ImgPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:": Tensor"},{name:"embedding_dim",val:": int = 512"},{name:"dtype",val:": dtype = torch.float32"}],parametersDescription:[{anchor:"diffusers.KolorsImg2ImgPipeline.get_guidance_scale_embedding.w",description:`<strong>w</strong> (<code>torch.Tensor</code>) &#x2014;
Generate embedding vectors with a specified guidance scale to subsequently enrich timestep embeddings.`,name:"w"},{anchor:"diffusers.KolorsImg2ImgPipeline.get_guidance_scale_embedding.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimension of the embeddings to generate.`,name:"embedding_dim"},{anchor:"diffusers.KolorsImg2ImgPipeline.get_guidance_scale_embedding.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
Data type of the generated embeddings.`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_12403/src/diffusers/pipelines/kolors/pipeline_kolors_img2img.py#L729",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>Embedding vectors with shape <code>(len(w), embedding_dim)</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p><code>torch.Tensor</code></p>
`}}),O=new Pt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/kolors.md"}}),{c(){d=l("meta"),w=n(),g=l("p"),x=n(),u(j.$$.fragment),_e=n(),U=l("div"),U.innerHTML=nt,be=n(),L=l("p"),L.innerHTML=st,ve=n(),Z=l("p"),Z.innerHTML=rt,Me=n(),E=l("p"),E.textContent=it,ye=n(),Q=l("p"),Q.innerHTML=lt,we=n(),u(D.$$.fragment),Te=n(),u(R.$$.fragment),xe=n(),u(S.$$.fragment),Ue=n(),W=l("p"),W.innerHTML=at,Ie=n(),u(I.$$.fragment),Ce=n(),u(C.$$.fragment),$e=n(),u(G.$$.fragment),Je=n(),u(V.$$.fragment),ke=n(),m=l("div"),u(z.$$.fragment),We=n(),oe=l("p"),oe.textContent=dt,Ge=n(),ne=l("p"),ne.innerHTML=pt,Ve=n(),se=l("p"),se.textContent=mt,ze=n(),re=l("ul"),re.innerHTML=ct,Ne=n(),$=l("div"),u(N.$$.fragment),qe=n(),ie=l("p"),ie.textContent=gt,Ye=n(),J=l("div"),u(q.$$.fragment),Fe=n(),le=l("p"),le.innerHTML=ft,Pe=n(),Y=l("ul"),Y.innerHTML=ut,Ke=n(),u(F.$$.fragment),je=n(),c=l("div"),u(H.$$.fragment),He=n(),ae=l("p"),ae.textContent=ht,Xe=n(),de=l("p"),de.innerHTML=_t,Ae=n(),pe=l("p"),pe.textContent=bt,Be=n(),me=l("ul"),me.innerHTML=vt,Oe=n(),k=l("div"),u(X.$$.fragment),et=n(),ce=l("p"),ce.textContent=Mt,tt=n(),P=l("div"),u(A.$$.fragment),ot=n(),ge=l("p"),ge.innerHTML=yt,Le=n(),B=l("ul"),B.innerHTML=wt,Ze=n(),u(O.$$.fragment),Ee=n(),ue=l("p"),this.h()},l(e){const t=kt("svelte-u9bgzb",document.head);d=a(t,"META",{name:!0,content:!0}),t.forEach(o),w=s(e),g=a(e,"P",{}),K(g).forEach(o),x=s(e),h(j.$$.fragment,e),_e=s(e),U=a(e,"DIV",{class:!0,"data-svelte-h":!0}),p(U)!=="svelte-1elo7hh"&&(U.innerHTML=nt),be=s(e),L=a(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-1hwlqdw"&&(L.innerHTML=st),ve=s(e),Z=a(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-11v9m6n"&&(Z.innerHTML=rt),Me=s(e),E=a(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-nj72pd"&&(E.textContent=it),ye=s(e),Q=a(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-vvt3t7"&&(Q.innerHTML=lt),we=s(e),h(D.$$.fragment,e),Te=s(e),h(R.$$.fragment,e),xe=s(e),h(S.$$.fragment,e),Ue=s(e),W=a(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-1a6xano"&&(W.innerHTML=at),Ie=s(e),h(I.$$.fragment,e),Ce=s(e),h(C.$$.fragment,e),$e=s(e),h(G.$$.fragment,e),Je=s(e),h(V.$$.fragment,e),ke=s(e),m=a(e,"DIV",{class:!0});var f=K(m);h(z.$$.fragment,f),We=s(f),oe=a(f,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-d2bqje"&&(oe.textContent=dt),Ge=s(f),ne=a(f,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1xcy1x5"&&(ne.innerHTML=pt),Ve=s(f),se=a(f,"P",{"data-svelte-h":!0}),p(se)!=="svelte-14s6m4u"&&(se.textContent=mt),ze=s(f),re=a(f,"UL",{"data-svelte-h":!0}),p(re)!=="svelte-4b1imk"&&(re.innerHTML=ct),Ne=s(f),$=a(f,"DIV",{class:!0});var ee=K($);h(N.$$.fragment,ee),qe=s(ee),ie=a(ee,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-16q0ax1"&&(ie.textContent=gt),ee.forEach(o),Ye=s(f),J=a(f,"DIV",{class:!0});var De=K(J);h(q.$$.fragment,De),Fe=s(De),le=a(De,"P",{"data-svelte-h":!0}),p(le)!=="svelte-vo59ec"&&(le.innerHTML=ft),De.forEach(o),f.forEach(o),Pe=s(e),Y=a(e,"UL",{"data-svelte-h":!0}),p(Y)!=="svelte-1p6h59i"&&(Y.innerHTML=ut),Ke=s(e),h(F.$$.fragment,e),je=s(e),c=a(e,"DIV",{class:!0});var y=K(c);h(H.$$.fragment,y),He=s(y),ae=a(y,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-d2bqje"&&(ae.textContent=ht),Xe=s(y),de=a(y,"P",{"data-svelte-h":!0}),p(de)!=="svelte-1xcy1x5"&&(de.innerHTML=_t),Ae=s(y),pe=a(y,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-14s6m4u"&&(pe.textContent=bt),Be=s(y),me=a(y,"UL",{"data-svelte-h":!0}),p(me)!=="svelte-w2cd7o"&&(me.innerHTML=vt),Oe=s(y),k=a(y,"DIV",{class:!0});var Re=K(k);h(X.$$.fragment,Re),et=s(Re),ce=a(Re,"P",{"data-svelte-h":!0}),p(ce)!=="svelte-16q0ax1"&&(ce.textContent=Mt),Re.forEach(o),tt=s(y),P=a(y,"DIV",{class:!0});var Se=K(P);h(A.$$.fragment,Se),ot=s(Se),ge=a(Se,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-vo59ec"&&(ge.innerHTML=yt),Se.forEach(o),y.forEach(o),Le=s(e),B=a(e,"UL",{"data-svelte-h":!0}),p(B)!=="svelte-1p6h59i"&&(B.innerHTML=wt),Ze=s(e),h(O.$$.fragment,e),Ee=s(e),ue=a(e,"P",{}),K(ue).forEach(o),this.h()},h(){T(d,"name","hf:doc:metadata"),T(d,"content",Zt),T(U,"class","flex flex-wrap space-x-1"),T($,"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(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(c,"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,t){i(document.head,d),r(e,w,t),r(e,g,t),r(e,x,t),_(j,e,t),r(e,_e,t),r(e,U,t),r(e,be,t),r(e,L,t),r(e,ve,t),r(e,Z,t),r(e,Me,t),r(e,E,t),r(e,ye,t),r(e,Q,t),r(e,we,t),_(D,e,t),r(e,Te,t),_(R,e,t),r(e,xe,t),_(S,e,t),r(e,Ue,t),r(e,W,t),r(e,Ie,t),_(I,e,t),r(e,Ce,t),_(C,e,t),r(e,$e,t),_(G,e,t),r(e,Je,t),_(V,e,t),r(e,ke,t),r(e,m,t),_(z,m,null),i(m,We),i(m,oe),i(m,Ge),i(m,ne),i(m,Ve),i(m,se),i(m,ze),i(m,re),i(m,Ne),i(m,$),_(N,$,null),i($,qe),i($,ie),i(m,Ye),i(m,J),_(q,J,null),i(J,Fe),i(J,le),r(e,Pe,t),r(e,Y,t),r(e,Ke,t),_(F,e,t),r(e,je,t),r(e,c,t),_(H,c,null),i(c,He),i(c,ae),i(c,Xe),i(c,de),i(c,Ae),i(c,pe),i(c,Be),i(c,me),i(c,Oe),i(c,k),_(X,k,null),i(k,et),i(k,ce),i(c,tt),i(c,P),_(A,P,null),i(P,ot),i(P,ge),r(e,Le,t),r(e,B,t),r(e,Ze,t),_(O,e,t),r(e,Ee,t),r(e,ue,t),Qe=!0},p(e,[t]){const f={};t&2&&(f.$$scope={dirty:t,ctx:e}),I.$set(f);const ee={};t&2&&(ee.$$scope={dirty:t,ctx:e}),C.$set(ee)},i(e){Qe||(b(j.$$.fragment,e),b(D.$$.fragment,e),b(R.$$.fragment,e),b(S.$$.fragment,e),b(I.$$.fragment,e),b(C.$$.fragment,e),b(G.$$.fragment,e),b(V.$$.fragment,e),b(z.$$.fragment,e),b(N.$$.fragment,e),b(q.$$.fragment,e),b(F.$$.fragment,e),b(H.$$.fragment,e),b(X.$$.fragment,e),b(A.$$.fragment,e),b(O.$$.fragment,e),Qe=!0)},o(e){v(j.$$.fragment,e),v(D.$$.fragment,e),v(R.$$.fragment,e),v(S.$$.fragment,e),v(I.$$.fragment,e),v(C.$$.fragment,e),v(G.$$.fragment,e),v(V.$$.fragment,e),v(z.$$.fragment,e),v(N.$$.fragment,e),v(q.$$.fragment,e),v(F.$$.fragment,e),v(H.$$.fragment,e),v(X.$$.fragment,e),v(A.$$.fragment,e),v(O.$$.fragment,e),Qe=!1},d(e){e&&(o(w),o(g),o(x),o(_e),o(U),o(be),o(L),o(ve),o(Z),o(Me),o(E),o(ye),o(Q),o(we),o(Te),o(xe),o(Ue),o(W),o(Ie),o(Ce),o($e),o(Je),o(ke),o(m),o(Pe),o(Y),o(Ke),o(je),o(c),o(Le),o(B),o(Ze),o(Ee),o(ue)),o(d),M(j,e),M(D,e),M(R,e),M(S,e),M(I,e),M(C,e),M(G,e),M(V,e),M(z),M(N),M(q),M(F,e),M(H),M(X),M(A),M(O,e)}}}const Zt='{"title":"Kolors: Effective Training of Diffusion Model for Photorealistic Text-to-Image Synthesis","local":"kolors-effective-training-of-diffusion-model-for-photorealistic-text-to-image-synthesis","sections":[{"title":"Usage Example","local":"usage-example","sections":[{"title":"IP Adapter","local":"ip-adapter","sections":[],"depth":3}],"depth":2},{"title":"KolorsPipeline","local":"diffusers.KolorsPipeline","sections":[],"depth":2},{"title":"KolorsImg2ImgPipeline","local":"diffusers.KolorsImg2ImgPipeline","sections":[],"depth":2}],"depth":1}';function Et(te){return Ct(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vt extends $t{constructor(d){super(),Jt(this,d,Et,Lt,It,{})}}export{Vt as component};

Xet Storage Details

Size:
39 kB
·
Xet hash:
a0112d6a1b76a04230f3ac543aaa815e6ceb55a01efa7d87dfb263223b66e5c5

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