import{s as Jt,n as kt,o as Kt}from"../chunks/scheduler.53228c21.js";import{S as Pt,i as $t,e as l,s as n,c,h as Lt,a,d as o,b as s,f as k,g,j as d,k as v,l as r,m as i,n as f,t as u,o as h,p as _}from"../chunks/index.100fac89.js";import{C as jt}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{D as pe}from"../chunks/Docstring.db856a1e.js";import{C as Ct}from"../chunks/CodeBlock.d30a6509.js";import{H as ge,E as Zt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function Et(st){let y,fe,me,ue,K,he,P,_e,w,it='<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,$,rt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/kolors/kolors_header_collage.png"/>',Me,L,lt='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>.',ve,j,at="The abstract from the technical report is:",ye,Z,dt='<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,E,Te,Q,Ue,D,xe,R,pt='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,T,mt='<p>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.</p>',Ce,U,ct="<p>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.</p>",Je,S,ke,W,Ke,p,G,Ge,A,gt="Pipeline for text-to-image generation using Kolors.",Ve,O,ft=`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.)`,ze,ee,ut="The pipeline also inherits the following loading methods:",Ne,te,ht='<li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.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>',qe,x,V,Ye,oe,_t="Encodes the prompt into text encoder hidden states.",Fe,I,z,He,ne,bt='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,N,Mt="<li>all</li> <li><strong>call</strong></li>",$e,q,Le,m,Y,Xe,se,vt="Pipeline for text-to-image generation using Kolors.",Be,ie,yt=`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,re,wt="The pipeline also inherits the following loading methods:",Oe,le,Tt='<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>',et,C,F,tt,ae,Ut="Encodes the prompt into text encoder hidden states.",ot,J,H,nt,de,xt='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>',je,X,It="<li>all</li> <li><strong>call</strong></li>",Ze,B,Ee,ce,Qe;return K=new jt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),P=new ge({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"}}),E=new ge({props:{title:"Usage Example",local:"usage-example",headingTag:"h2"}}),Q=new Ct({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}}),D=new ge({props:{title:"IP Adapter",local:"ip-adapter",headingTag:"h3"}}),S=new Ct({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}}),W=new ge({props:{title:"KolorsPipeline",local:"diffusers.KolorsPipeline",headingTag:"h2"}}),G=new pe({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"}}),V=new pe({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"}}),z=new pe({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>
`}}),q=new ge({props:{title:"KolorsImg2ImgPipeline",local:"diffusers.KolorsImg2ImgPipeline",headingTag:"h2"}}),Y=new pe({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"}}),F=new pe({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"}}),H=new pe({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>
`}}),B=new Zt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/kolors.md"}}),{c(){y=l("meta"),fe=n(),me=l("p"),ue=n(),c(K.$$.fragment),he=n(),c(P.$$.fragment),_e=n(),w=l("div"),w.innerHTML=it,be=n(),$=l("p"),$.innerHTML=rt,Me=n(),L=l("p"),L.innerHTML=lt,ve=n(),j=l("p"),j.textContent=at,ye=n(),Z=l("p"),Z.innerHTML=dt,we=n(),c(E.$$.fragment),Te=n(),c(Q.$$.fragment),Ue=n(),c(D.$$.fragment),xe=n(),R=l("p"),R.innerHTML=pt,Ie=n(),T=l("blockquote"),T.innerHTML=mt,Ce=n(),U=l("blockquote"),U.innerHTML=ct,Je=n(),c(S.$$.fragment),ke=n(),c(W.$$.fragment),Ke=n(),p=l("div"),c(G.$$.fragment),Ge=n(),A=l("p"),A.textContent=gt,Ve=n(),O=l("p"),O.innerHTML=ft,ze=n(),ee=l("p"),ee.textContent=ut,Ne=n(),te=l("ul"),te.innerHTML=ht,qe=n(),x=l("div"),c(V.$$.fragment),Ye=n(),oe=l("p"),oe.textContent=_t,Fe=n(),I=l("div"),c(z.$$.fragment),He=n(),ne=l("p"),ne.innerHTML=bt,Pe=n(),N=l("ul"),N.innerHTML=Mt,$e=n(),c(q.$$.fragment),Le=n(),m=l("div"),c(Y.$$.fragment),Xe=n(),se=l("p"),se.textContent=vt,Be=n(),ie=l("p"),ie.innerHTML=yt,Ae=n(),re=l("p"),re.textContent=wt,Oe=n(),le=l("ul"),le.innerHTML=Tt,et=n(),C=l("div"),c(F.$$.fragment),tt=n(),ae=l("p"),ae.textContent=Ut,ot=n(),J=l("div"),c(H.$$.fragment),nt=n(),de=l("p"),de.innerHTML=xt,je=n(),X=l("ul"),X.innerHTML=It,Ze=n(),c(B.$$.fragment),Ee=n(),ce=l("p"),this.h()},l(e){const t=Lt("svelte-u9bgzb",document.head);y=a(t,"META",{name:!0,content:!0}),t.forEach(o),fe=s(e),me=a(e,"P",{}),k(me).forEach(o),ue=s(e),g(K.$$.fragment,e),he=s(e),g(P.$$.fragment,e),_e=s(e),w=a(e,"DIV",{class:!0,"data-svelte-h":!0}),d(w)!=="svelte-1elo7hh"&&(w.innerHTML=it),be=s(e),$=a(e,"P",{"data-svelte-h":!0}),d($)!=="svelte-1hwlqdw"&&($.innerHTML=rt),Me=s(e),L=a(e,"P",{"data-svelte-h":!0}),d(L)!=="svelte-11v9m6n"&&(L.innerHTML=lt),ve=s(e),j=a(e,"P",{"data-svelte-h":!0}),d(j)!=="svelte-nj72pd"&&(j.textContent=at),ye=s(e),Z=a(e,"P",{"data-svelte-h":!0}),d(Z)!=="svelte-vvt3t7"&&(Z.innerHTML=dt),we=s(e),g(E.$$.fragment,e),Te=s(e),g(Q.$$.fragment,e),Ue=s(e),g(D.$$.fragment,e),xe=s(e),R=a(e,"P",{"data-svelte-h":!0}),d(R)!=="svelte-1a6xano"&&(R.innerHTML=pt),Ie=s(e),T=a(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(T)!=="svelte-pfp5tl"&&(T.innerHTML=mt),Ce=s(e),U=a(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(U)!=="svelte-1or84cb"&&(U.innerHTML=ct),Je=s(e),g(S.$$.fragment,e),ke=s(e),g(W.$$.fragment,e),Ke=s(e),p=a(e,"DIV",{class:!0});var b=k(p);g(G.$$.fragment,b),Ge=s(b),A=a(b,"P",{"data-svelte-h":!0}),d(A)!=="svelte-d2bqje"&&(A.textContent=gt),Ve=s(b),O=a(b,"P",{"data-svelte-h":!0}),d(O)!=="svelte-wu1jmh"&&(O.innerHTML=ft),ze=s(b),ee=a(b,"P",{"data-svelte-h":!0}),d(ee)!=="svelte-14s6m4u"&&(ee.textContent=ut),Ne=s(b),te=a(b,"UL",{"data-svelte-h":!0}),d(te)!=="svelte-1uvpw3o"&&(te.innerHTML=ht),qe=s(b),x=a(b,"DIV",{class:!0});var De=k(x);g(V.$$.fragment,De),Ye=s(De),oe=a(De,"P",{"data-svelte-h":!0}),d(oe)!=="svelte-16q0ax1"&&(oe.textContent=_t),De.forEach(o),Fe=s(b),I=a(b,"DIV",{class:!0});var Re=k(I);g(z.$$.fragment,Re),He=s(Re),ne=a(Re,"P",{"data-svelte-h":!0}),d(ne)!=="svelte-vo59ec"&&(ne.innerHTML=bt),Re.forEach(o),b.forEach(o),Pe=s(e),N=a(e,"UL",{"data-svelte-h":!0}),d(N)!=="svelte-1p6h59i"&&(N.innerHTML=Mt),$e=s(e),g(q.$$.fragment,e),Le=s(e),m=a(e,"DIV",{class:!0});var M=k(m);g(Y.$$.fragment,M),Xe=s(M),se=a(M,"P",{"data-svelte-h":!0}),d(se)!=="svelte-d2bqje"&&(se.textContent=vt),Be=s(M),ie=a(M,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-wu1jmh"&&(ie.innerHTML=yt),Ae=s(M),re=a(M,"P",{"data-svelte-h":!0}),d(re)!=="svelte-14s6m4u"&&(re.textContent=wt),Oe=s(M),le=a(M,"UL",{"data-svelte-h":!0}),d(le)!=="svelte-2dr4tw"&&(le.innerHTML=Tt),et=s(M),C=a(M,"DIV",{class:!0});var Se=k(C);g(F.$$.fragment,Se),tt=s(Se),ae=a(Se,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-16q0ax1"&&(ae.textContent=Ut),Se.forEach(o),ot=s(M),J=a(M,"DIV",{class:!0});var We=k(J);g(H.$$.fragment,We),nt=s(We),de=a(We,"P",{"data-svelte-h":!0}),d(de)!=="svelte-vo59ec"&&(de.innerHTML=xt),We.forEach(o),M.forEach(o),je=s(e),X=a(e,"UL",{"data-svelte-h":!0}),d(X)!=="svelte-1p6h59i"&&(X.innerHTML=It),Ze=s(e),g(B.$$.fragment,e),Ee=s(e),ce=a(e,"P",{}),k(ce).forEach(o),this.h()},h(){v(y,"name","hf:doc:metadata"),v(y,"content",Qt),v(w,"class","flex flex-wrap space-x-1"),v(T,"class","tip"),v(U,"class","tip"),v(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(m,"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,y),i(e,fe,t),i(e,me,t),i(e,ue,t),f(K,e,t),i(e,he,t),f(P,e,t),i(e,_e,t),i(e,w,t),i(e,be,t),i(e,$,t),i(e,Me,t),i(e,L,t),i(e,ve,t),i(e,j,t),i(e,ye,t),i(e,Z,t),i(e,we,t),f(E,e,t),i(e,Te,t),f(Q,e,t),i(e,Ue,t),f(D,e,t),i(e,xe,t),i(e,R,t),i(e,Ie,t),i(e,T,t),i(e,Ce,t),i(e,U,t),i(e,Je,t),f(S,e,t),i(e,ke,t),f(W,e,t),i(e,Ke,t),i(e,p,t),f(G,p,null),r(p,Ge),r(p,A),r(p,Ve),r(p,O),r(p,ze),r(p,ee),r(p,Ne),r(p,te),r(p,qe),r(p,x),f(V,x,null),r(x,Ye),r(x,oe),r(p,Fe),r(p,I),f(z,I,null),r(I,He),r(I,ne),i(e,Pe,t),i(e,N,t),i(e,$e,t),f(q,e,t),i(e,Le,t),i(e,m,t),f(Y,m,null),r(m,Xe),r(m,se),r(m,Be),r(m,ie),r(m,Ae),r(m,re),r(m,Oe),r(m,le),r(m,et),r(m,C),f(F,C,null),r(C,tt),r(C,ae),r(m,ot),r(m,J),f(H,J,null),r(J,nt),r(J,de),i(e,je,t),i(e,X,t),i(e,Ze,t),f(B,e,t),i(e,Ee,t),i(e,ce,t),Qe=!0},p:kt,i(e){Qe||(u(K.$$.fragment,e),u(P.$$.fragment,e),u(E.$$.fragment,e),u(Q.$$.fragment,e),u(D.$$.fragment,e),u(S.$$.fragment,e),u(W.$$.fragment,e),u(G.$$.fragment,e),u(V.$$.fragment,e),u(z.$$.fragment,e),u(q.$$.fragment,e),u(Y.$$.fragment,e),u(F.$$.fragment,e),u(H.$$.fragment,e),u(B.$$.fragment,e),Qe=!0)},o(e){h(K.$$.fragment,e),h(P.$$.fragment,e),h(E.$$.fragment,e),h(Q.$$.fragment,e),h(D.$$.fragment,e),h(S.$$.fragment,e),h(W.$$.fragment,e),h(G.$$.fragment,e),h(V.$$.fragment,e),h(z.$$.fragment,e),h(q.$$.fragment,e),h(Y.$$.fragment,e),h(F.$$.fragment,e),h(H.$$.fragment,e),h(B.$$.fragment,e),Qe=!1},d(e){e&&(o(fe),o(me),o(ue),o(he),o(_e),o(w),o(be),o($),o(Me),o(L),o(ve),o(j),o(ye),o(Z),o(we),o(Te),o(Ue),o(xe),o(R),o(Ie),o(T),o(Ce),o(U),o(Je),o(ke),o(Ke),o(p),o(Pe),o(N),o($e),o(Le),o(m),o(je),o(X),o(Ze),o(Ee),o(ce)),o(y),_(K,e),_(P,e),_(E,e),_(Q,e),_(D,e),_(S,e),_(W,e),_(G),_(V),_(z),_(q,e),_(Y),_(F),_(H),_(B,e)}}}const Qt='{"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 Dt(st){return Kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nt extends Pt{constructor(y){super(),$t(this,y,Dt,Et,Jt,{})}}export{Nt as component};
