import{s as It,o as $t,n as xt}from"../chunks/scheduler.8c3d61f6.js";import{S as Ct,i as Jt,g as a,s as n,r as u,A as kt,h as l,f as o,c as s,j as K,u as h,x as p,k as T,y as r,a as i,v as _,d as b,t as v,w as M}from"../chunks/index.da70eac4.js";import{T as Tt}from"../chunks/Tip.1d9b8c37.js";import{D as fe}from"../chunks/Docstring.6b390b9a.js";import{C as Ut}from"../chunks/CodeBlock.00a903b3.js";import{H as he,E as Pt}from"../chunks/EditOnGithub.1e64e623.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/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.enable_model_cpu_offload">enable_model_cpu_offload()</a> on consumer GPUs.';return{c(){d=a("p"),d.innerHTML=w},l(g){d=l(g,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11nou9k"&&(d.innerHTML=w)},m(g,U){i(g,d,U)},p:xt,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=a("p"),d.textContent=w},l(g){d=l(g,"P",{"data-svelte-h":!0}),p(d)!=="svelte-lkmklu"&&(d.textContent=w)},m(g,U){i(g,d,U)},p:xt,d(g){g&&o(d)}}}function Lt(te){let d,w,g,U,j,_e,x,nt='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/>',be,L,st='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/kolors/kolors_header_collage.png"/>',ve,Z,it='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,rt="The abstract from the technical report is:",ye,Q,at='<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,Ue,S,xe,W,lt='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,$e,$,Ce,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/main/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,ie,ct='<li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',Ne,C,N,qe,re,gt="Encodes the prompt into text encoder hidden states.",Ye,J,q,Fe,ae,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,X,Xe,le,ht="Pipeline for text-to-image generation using Kolors.",He,de,_t=`This model inherits from <a href="/docs/diffusers/main/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/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',Oe,k,H,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 Ut({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}}}),$=new Tt({props:{$$slots:{default:[jt]},$$scope:{ctx:te}}}),G=new Ut({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/main/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/main/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/main/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/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/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/main/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/main/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/main/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"}}),X=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/main/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/main/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/main/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/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/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/main/src/diffusers/pipelines/kolors/pipeline_kolors_img2img.py#L143"}}),H=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/main/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/main/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=a("meta"),w=n(),g=a("p"),U=n(),u(j.$$.fragment),_e=n(),x=a("div"),x.innerHTML=nt,be=n(),L=a("p"),L.innerHTML=st,ve=n(),Z=a("p"),Z.innerHTML=it,Me=n(),E=a("p"),E.textContent=rt,ye=n(),Q=a("p"),Q.innerHTML=at,we=n(),u(D.$$.fragment),Te=n(),u(R.$$.fragment),Ue=n(),u(S.$$.fragment),xe=n(),W=a("p"),W.innerHTML=lt,Ie=n(),u(I.$$.fragment),$e=n(),u($.$$.fragment),Ce=n(),u(G.$$.fragment),Je=n(),u(V.$$.fragment),ke=n(),m=a("div"),u(z.$$.fragment),We=n(),oe=a("p"),oe.textContent=dt,Ge=n(),ne=a("p"),ne.innerHTML=pt,Ve=n(),se=a("p"),se.textContent=mt,ze=n(),ie=a("ul"),ie.innerHTML=ct,Ne=n(),C=a("div"),u(N.$$.fragment),qe=n(),re=a("p"),re.textContent=gt,Ye=n(),J=a("div"),u(q.$$.fragment),Fe=n(),ae=a("p"),ae.innerHTML=ft,Pe=n(),Y=a("ul"),Y.innerHTML=ut,Ke=n(),u(F.$$.fragment),je=n(),c=a("div"),u(X.$$.fragment),Xe=n(),le=a("p"),le.textContent=ht,He=n(),de=a("p"),de.innerHTML=_t,Ae=n(),pe=a("p"),pe.textContent=bt,Be=n(),me=a("ul"),me.innerHTML=vt,Oe=n(),k=a("div"),u(H.$$.fragment),et=n(),ce=a("p"),ce.textContent=Mt,tt=n(),P=a("div"),u(A.$$.fragment),ot=n(),ge=a("p"),ge.innerHTML=yt,Le=n(),B=a("ul"),B.innerHTML=wt,Ze=n(),u(O.$$.fragment),Ee=n(),ue=a("p"),this.h()},l(e){const t=kt("svelte-u9bgzb",document.head);d=l(t,"META",{name:!0,content:!0}),t.forEach(o),w=s(e),g=l(e,"P",{}),K(g).forEach(o),U=s(e),h(j.$$.fragment,e),_e=s(e),x=l(e,"DIV",{class:!0,"data-svelte-h":!0}),p(x)!=="svelte-si9ct8"&&(x.innerHTML=nt),be=s(e),L=l(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-1hwlqdw"&&(L.innerHTML=st),ve=s(e),Z=l(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-11v9m6n"&&(Z.innerHTML=it),Me=s(e),E=l(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-nj72pd"&&(E.textContent=rt),ye=s(e),Q=l(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-vvt3t7"&&(Q.innerHTML=at),we=s(e),h(D.$$.fragment,e),Te=s(e),h(R.$$.fragment,e),Ue=s(e),h(S.$$.fragment,e),xe=s(e),W=l(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-1a6xano"&&(W.innerHTML=lt),Ie=s(e),h(I.$$.fragment,e),$e=s(e),h($.$$.fragment,e),Ce=s(e),h(G.$$.fragment,e),Je=s(e),h(V.$$.fragment,e),ke=s(e),m=l(e,"DIV",{class:!0});var f=K(m);h(z.$$.fragment,f),We=s(f),oe=l(f,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-d2bqje"&&(oe.textContent=dt),Ge=s(f),ne=l(f,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-wu1jmh"&&(ne.innerHTML=pt),Ve=s(f),se=l(f,"P",{"data-svelte-h":!0}),p(se)!=="svelte-14s6m4u"&&(se.textContent=mt),ze=s(f),ie=l(f,"UL",{"data-svelte-h":!0}),p(ie)!=="svelte-2dr4tw"&&(ie.innerHTML=ct),Ne=s(f),C=l(f,"DIV",{class:!0});var ee=K(C);h(N.$$.fragment,ee),qe=s(ee),re=l(ee,"P",{"data-svelte-h":!0}),p(re)!=="svelte-16q0ax1"&&(re.textContent=gt),ee.forEach(o),Ye=s(f),J=l(f,"DIV",{class:!0});var De=K(J);h(q.$$.fragment,De),Fe=s(De),ae=l(De,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-vo59ec"&&(ae.innerHTML=ft),De.forEach(o),f.forEach(o),Pe=s(e),Y=l(e,"UL",{"data-svelte-h":!0}),p(Y)!=="svelte-1p6h59i"&&(Y.innerHTML=ut),Ke=s(e),h(F.$$.fragment,e),je=s(e),c=l(e,"DIV",{class:!0});var y=K(c);h(X.$$.fragment,y),Xe=s(y),le=l(y,"P",{"data-svelte-h":!0}),p(le)!=="svelte-d2bqje"&&(le.textContent=ht),He=s(y),de=l(y,"P",{"data-svelte-h":!0}),p(de)!=="svelte-wu1jmh"&&(de.innerHTML=_t),Ae=s(y),pe=l(y,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-14s6m4u"&&(pe.textContent=bt),Be=s(y),me=l(y,"UL",{"data-svelte-h":!0}),p(me)!=="svelte-2dr4tw"&&(me.innerHTML=vt),Oe=s(y),k=l(y,"DIV",{class:!0});var Re=K(k);h(H.$$.fragment,Re),et=s(Re),ce=l(Re,"P",{"data-svelte-h":!0}),p(ce)!=="svelte-16q0ax1"&&(ce.textContent=Mt),Re.forEach(o),tt=s(y),P=l(y,"DIV",{class:!0});var Se=K(P);h(A.$$.fragment,Se),ot=s(Se),ge=l(Se,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-vo59ec"&&(ge.innerHTML=yt),Se.forEach(o),y.forEach(o),Le=s(e),B=l(e,"UL",{"data-svelte-h":!0}),p(B)!=="svelte-1p6h59i"&&(B.innerHTML=wt),Ze=s(e),h(O.$$.fragment,e),Ee=s(e),ue=l(e,"P",{}),K(ue).forEach(o),this.h()},h(){T(d,"name","hf:doc:metadata"),T(d,"content",Zt),T(x,"class","flex flex-wrap space-x-1"),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"),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){r(document.head,d),i(e,w,t),i(e,g,t),i(e,U,t),_(j,e,t),i(e,_e,t),i(e,x,t),i(e,be,t),i(e,L,t),i(e,ve,t),i(e,Z,t),i(e,Me,t),i(e,E,t),i(e,ye,t),i(e,Q,t),i(e,we,t),_(D,e,t),i(e,Te,t),_(R,e,t),i(e,Ue,t),_(S,e,t),i(e,xe,t),i(e,W,t),i(e,Ie,t),_(I,e,t),i(e,$e,t),_($,e,t),i(e,Ce,t),_(G,e,t),i(e,Je,t),_(V,e,t),i(e,ke,t),i(e,m,t),_(z,m,null),r(m,We),r(m,oe),r(m,Ge),r(m,ne),r(m,Ve),r(m,se),r(m,ze),r(m,ie),r(m,Ne),r(m,C),_(N,C,null),r(C,qe),r(C,re),r(m,Ye),r(m,J),_(q,J,null),r(J,Fe),r(J,ae),i(e,Pe,t),i(e,Y,t),i(e,Ke,t),_(F,e,t),i(e,je,t),i(e,c,t),_(X,c,null),r(c,Xe),r(c,le),r(c,He),r(c,de),r(c,Ae),r(c,pe),r(c,Be),r(c,me),r(c,Oe),r(c,k),_(H,k,null),r(k,et),r(k,ce),r(c,tt),r(c,P),_(A,P,null),r(P,ot),r(P,ge),i(e,Le,t),i(e,B,t),i(e,Ze,t),_(O,e,t),i(e,Ee,t),i(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}),$.$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($.$$.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(X.$$.fragment,e),b(H.$$.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($.$$.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(X.$$.fragment,e),v(H.$$.fragment,e),v(A.$$.fragment,e),v(O.$$.fragment,e),Qe=!1},d(e){e&&(o(w),o(g),o(U),o(_e),o(x),o(be),o(L),o(ve),o(Z),o(Me),o(E),o(ye),o(Q),o(we),o(Te),o(Ue),o(xe),o(W),o(Ie),o($e),o(Ce),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($,e),M(G,e),M(V,e),M(z),M(N),M(q),M(F,e),M(X),M(H),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 $t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vt extends Ct{constructor(d){super(),Jt(this,d,Et,Lt,It,{})}}export{Vt as component};
