import{s as ll,o as il,n as tl}from"../chunks/scheduler.53228c21.js";import{S as al,i as nl,e as s,s as a,c as f,h as sl,a as o,d as l,b as n,f as Ot,g as u,j as c,k as _e,l as ol,m as i,n as h,t as b,o as y,p as M}from"../chunks/index.100fac89.js";import{C as rl}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{C as T}from"../chunks/CodeBlock.d30a6509.js";import{H as Te,E as pl}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";import{H as cl,a as el}from"../chunks/HfOption.fad27e59.js";function ml(J){let r,w;return r=new T({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJwYXRoJTJGdG8lMkZ5b3VyJTJGbW9kZWwlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMG5hcnV0byUyMHdpdGglMjBncmVlbiUyMGV5ZXMlMjBhbmQlMjByZWQlMjBsZWdzLiUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDMwJTJDJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q3LjUpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMm5hcnV0by5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-keyword">import</span> torch

pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;path/to/your/model&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;A naruto with green eyes and red legs.&quot;</span>
image = pipeline(prompt, num_inference_steps=<span class="hljs-number">30</span>, guidance_scale=<span class="hljs-number">7.5</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;naruto.png&quot;</span>)`,wrap:!1}}),{c(){f(r.$$.fragment)},l(m){u(r.$$.fragment,m)},m(m,g){h(r,m,g),w=!0},p:tl,i(m){w||(b(r.$$.fragment,m),w=!0)},o(m){y(r.$$.fragment,m),w=!1},d(m){M(r,m)}}}function dl(J){let r,w='<a href="https://pytorch.org/xla" rel="nofollow">PyTorch XLA</a> allows you to run PyTorch on XLA devices such as TPUs, which can be faster. The initial warmup step takes longer because the model needs to be compiled and optimized. However, subsequent calls to the pipeline on an input <strong>with the same length</strong> as the original prompt are much faster because it can reuse the optimized graph.',m,g,p;return g=new T({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjB0b3JjaF94bGEuY29yZS54bGFfbW9kZWwlMjBhcyUyMHhtJTBBJTBBZGV2aWNlJTIwJTNEJTIweG0ueGxhX2RldmljZSgpJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyKS50byhkZXZpY2UpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMG5hcnV0byUyMHdpdGglMjBncmVlbiUyMGV5ZXMlMjBhbmQlMjByZWQlMjBsZWdzLiUyMiUwQXN0YXJ0JTIwJTNEJTIwdGltZSgpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEaW5mZXJlbmNlX3N0ZXBzKS5pbWFnZXMlNUIwJTVEJTBBcHJpbnQoZidDb21waWxhdGlvbiUyMHRpbWUlMjBpcyUyMCU3QnRpbWUoKS1zdGFydCU3RCUyMHNlYycpJTBBaW1hZ2Uuc2F2ZSglMjJuYXJ1dG8ucG5nJTIyKSUwQSUwQXN0YXJ0JTIwJTNEJTIwdGltZSgpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEaW5mZXJlbmNlX3N0ZXBzKS5pbWFnZXMlNUIwJTVEJTBBcHJpbnQoZidJbmZlcmVuY2UlMjB0aW1lJTIwaXMlMjAlN0J0aW1lKCktc3RhcnQlN0QlMjBzZWMlMjBhZnRlciUyMGNvbXBpbGF0aW9uJyk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> torch_xla.core.xla_model <span class="hljs-keyword">as</span> xm

device = xm.xla_device()
pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>).to(device)

prompt = <span class="hljs-string">&quot;A naruto with green eyes and red legs.&quot;</span>
start = time()
image = pipeline(prompt, num_inference_steps=inference_steps).images[<span class="hljs-number">0</span>]
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&#x27;Compilation time is <span class="hljs-subst">{time()-start}</span> sec&#x27;</span>)
image.save(<span class="hljs-string">&quot;naruto.png&quot;</span>)

start = time()
image = pipeline(prompt, num_inference_steps=inference_steps).images[<span class="hljs-number">0</span>]
<span class="hljs-built_in">print</span>(<span class="hljs-string">f&#x27;Inference time is <span class="hljs-subst">{time()-start}</span> sec after compilation&#x27;</span>)`,wrap:!1}}),{c(){r=s("p"),r.innerHTML=w,m=a(),f(g.$$.fragment)},l(d){r=o(d,"P",{"data-svelte-h":!0}),c(r)!=="svelte-897rmr"&&(r.innerHTML=w),m=n(d),u(g.$$.fragment,d)},m(d,_){i(d,r,_),i(d,m,_),h(g,d,_),p=!0},p:tl,i(d){p||(b(g.$$.fragment,d),p=!0)},o(d){y(g.$$.fragment,d),p=!1},d(d){d&&(l(r),l(m)),M(g,d)}}}function fl(J){let r,w,m,g;return r=new el({props:{id:"inference",option:"PyTorch",$$slots:{default:[ml]},$$scope:{ctx:J}}}),m=new el({props:{id:"inference",option:"PyTorch XLA",$$slots:{default:[dl]},$$scope:{ctx:J}}}),{c(){f(r.$$.fragment),w=a(),f(m.$$.fragment)},l(p){u(r.$$.fragment,p),w=n(p),u(m.$$.fragment,p)},m(p,d){h(r,p,d),i(p,w,d),h(m,p,d),g=!0},p(p,d){const _={};d&2&&(_.$$scope={dirty:d,ctx:p}),r.$set(_);const X={};d&2&&(X.$$scope={dirty:d,ctx:p}),m.$set(X)},i(p){g||(b(r.$$.fragment,p),b(m.$$.fragment,p),g=!0)},o(p){y(r.$$.fragment,p),y(m.$$.fragment,p),g=!1},d(p){p&&l(w),M(r,p),M(m,p)}}}function ul(J){let r,w,m,g,p,d,_,X,U,_t="<p>This script is experimental, and it’s easy to overfit and run into issues like catastrophic forgetting. Try exploring different hyperparameters to get the best results on your dataset.</p>",Ue,j,Tt='<a href="https://hf.co/papers/2307.01952" rel="nofollow">Stable Diffusion XL (SDXL)</a> is a larger and more powerful iteration of the Stable Diffusion model, capable of producing higher resolution images.',Ze,v,Jt='SDXL’s UNet is 3x larger and the model adds a second text encoder to the architecture. Depending on the hardware available to you, this can be very computationally intensive and it may not run on a consumer GPU like a Tesla T4. To help fit this larger model into memory and to speedup training, try enabling <code>gradient_checkpointing</code>, <code>mixed_precision</code>, and <code>gradient_accumulation_steps</code>. You can reduce your memory-usage even more by enabling memory-efficient attention with <a href="../optimization/xformers">xFormers</a> and using <a href="https://github.com/TimDettmers/bitsandbytes" rel="nofollow">bitsandbytes’</a> 8-bit optimizer.',$e,B,Ut='This guide will explore the <a href="https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py" rel="nofollow">train_text_to_image_sdxl.py</a> training script to help you become more familiar with it, and how you can adapt it for your own use-case.',xe,C,Zt="Before running the script, make sure you install the library from source:",We,R,Xe,k,$t="Then navigate to the example folder containing the training script and install the required dependencies for the script you’re using:",je,V,ve,Z,xt='<p>🤗 Accelerate is a library for helping you train on multiple GPUs/TPUs or with mixed-precision. It’ll automatically configure your training setup based on your hardware and environment. Take a look at the 🤗 Accelerate <a href="https://huggingface.co/docs/accelerate/quicktour" rel="nofollow">Quick tour</a> to learn more.</p>',Be,N,Wt="Initialize an 🤗 Accelerate environment:",Ce,G,Re,H,Xt="To setup a default 🤗 Accelerate environment without choosing any configurations:",ke,I,Ve,L,jt="Or if your environment doesn’t support an interactive shell, like a notebook, you can use:",Ne,E,Ge,Y,vt='Lastly, if you want to train a model on your own dataset, take a look at the <a href="create_dataset">Create a dataset for training</a> guide to learn how to create a dataset that works with the training script.',He,S,Ie,$,Bt='<p>The following sections highlight parts of the training script that are important for understanding how to modify it, but it doesn’t cover every aspect of the script in detail. If you’re interested in learning more, feel free to read through the <a href="https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py" rel="nofollow">script</a> and let us know if you have any questions or concerns.</p>',Le,z,Ct='The training script provides many parameters to help you customize your training run. All of the parameters and their descriptions are found in the <a href="https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L129" rel="nofollow"><code>parse_args()</code></a> function. This function provides default values for each parameter, such as the training batch size and learning rate, but you can also set your own values in the training command if you’d like.',Ee,F,Rt="For example, to speedup training with mixed precision using the bf16 format, add the <code>--mixed_precision</code> parameter to the training command:",Ye,Q,Se,A,kt='Most of the parameters are identical to the parameters in the <a href="text2image#script-parameters">Text-to-image</a> training guide, so you’ll focus on the parameters that are relevant to training SDXL in this guide.',ze,q,Vt='<li><code>--pretrained_vae_model_name_or_path</code>: path to a pretrained VAE; the SDXL VAE is known to suffer from numerical instability, so this parameter allows you to specify a better <a href="https://huggingface.co/madebyollin/sdxl-vae-fp16-fix" rel="nofollow">VAE</a></li> <li><code>--proportion_empty_prompts</code>: the proportion of image prompts to replace with empty strings</li> <li><code>--timestep_bias_strategy</code>: where (earlier vs. later) in the timestep to apply a bias, which can encourage the model to either learn low or high frequency details</li> <li><code>--timestep_bias_multiplier</code>: the weight of the bias to apply to the timestep</li> <li><code>--timestep_bias_begin</code>: the timestep to begin applying the bias</li> <li><code>--timestep_bias_end</code>: the timestep to end applying the bias</li> <li><code>--timestep_bias_portion</code>: the proportion of timesteps to apply the bias to</li>',Fe,D,Qe,P,Nt='The <a href="https://huggingface.co/papers/2303.09556" rel="nofollow">Min-SNR</a> weighting strategy can help with training by rebalancing the loss to achieve faster convergence. The training script supports predicting either <code>epsilon</code> (noise) or <code>v_prediction</code>, but Min-SNR is compatible with both prediction types. This weighting strategy is only supported by PyTorch.',Ae,K,Gt="Add the <code>--snr_gamma</code> parameter and set it to the recommended value of 5.0:",qe,O,De,ee,Pe,te,Ht='The training script is also similar to the <a href="text2image#training-script">Text-to-image</a> training guide, but it’s been modified to support SDXL training. This guide will focus on the code that is unique to the SDXL training script.',Ke,le,It='It starts by creating functions to <a href="https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L478" rel="nofollow">tokenize the prompts</a> to calculate the prompt embeddings, and to compute the image embeddings with the <a href="https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L519" rel="nofollow">VAE</a>. Next, you’ll a function to <a href="https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L531" rel="nofollow">generate the timesteps weights</a> depending on the number of timesteps and the timestep bias strategy to apply.',Oe,ie,Lt='Within the <a href="https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L572" rel="nofollow"><code>main()</code></a> function, in addition to loading a tokenizer, the script loads a second tokenizer and text encoder because the SDXL architecture uses two of each:',et,ae,tt,ne,Et='The <a href="https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L857" rel="nofollow">prompt and image embeddings</a> are computed first and kept in memory, which isn’t typically an issue for a smaller dataset, but for larger datasets it can lead to memory problems. If this is the case, you should save the pre-computed embeddings to disk separately and load them into memory during the training process (see this <a href="https://github.com/huggingface/diffusers/pull/4505" rel="nofollow">PR</a> for more discussion about this topic).',lt,se,it,oe,Yt="After calculating the embeddings, the text encoder, VAE, and tokenizer are deleted to free up some memory:",at,re,nt,pe,St='Finally, the <a href="https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L943" rel="nofollow">training loop</a> takes care of the rest. If you chose to apply a timestep bias strategy, you’ll see the timestep weights are calculated and added as noise:',st,ce,ot,me,zt='If you want to learn more about how the training loop works, check out the <a href="../using-diffusers/write_own_pipeline">Understanding pipelines, models and schedulers</a> tutorial which breaks down the basic pattern of the denoising process.',rt,de,pt,fe,Ft="Once you’ve made all your changes or you’re okay with the default configuration, you’re ready to launch the training script! 🚀",ct,ue,Qt='Let’s train on the <a href="https://huggingface.co/datasets/lambdalabs/naruto-blip-captions" rel="nofollow">Naruto BLIP captions</a> dataset to generate your own Naruto characters. Set the environment variables <code>MODEL_NAME</code> and <code>DATASET_NAME</code> to the model and the dataset (either from the Hub or a local path). You should also specify a VAE other than the SDXL VAE (either from the Hub or a local path) with <code>VAE_NAME</code> to avoid numerical instabilities.',mt,x,At="<p>To monitor training progress with Weights &amp; Biases, add the <code>--report_to=wandb</code> parameter to the training command. You’ll also need to add the <code>--validation_prompt</code> and <code>--validation_epochs</code> to the training command to keep track of results. This can be really useful for debugging the model and viewing intermediate results.</p>",dt,he,ft,be,qt="After you’ve finished training, you can use your newly trained SDXL model for inference!",ut,W,ht,ye,bt,Me,Dt="Congratulations on training a SDXL model! To learn more about how to use your new model, the following guides may be helpful:",yt,ge,Pt='<li>Read the <a href="../using-diffusers/sdxl">Stable Diffusion XL</a> guide to learn how to use it for a variety of different tasks (text-to-image, image-to-image, inpainting), how to use it’s refiner model, and the different types of micro-conditionings.</li> <li>Check out the <a href="dreambooth">DreamBooth</a> and <a href="lora">LoRA</a> training guides to learn how to train a personalized SDXL model with just a few example images. These two training techniques can even be combined!</li>',Mt,we,gt,Je,wt;return p=new rl({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),_=new Te({props:{title:"Stable Diffusion XL",local:"stable-diffusion-xl",headingTag:"h1"}}),R=new T({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmRpZmZ1c2VycyUwQWNkJTIwZGlmZnVzZXJzJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/diffusers
<span class="hljs-built_in">cd</span> diffusers
pip install .`,wrap:!1}}),V=new T({props:{code:"Y2QlMjBleGFtcGxlcyUyRnRleHRfdG9faW1hZ2UlMEFwaXAlMjBpbnN0YWxsJTIwLXIlMjByZXF1aXJlbWVudHNfc2R4bC50eHQ=",highlighted:`<span class="hljs-built_in">cd</span> examples/text_to_image
pip install -r requirements_sdxl.txt`,wrap:!1}}),G=new T({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config",wrap:!1}}),I=new T({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZyUyMGRlZmF1bHQ=",highlighted:"accelerate config default",wrap:!1}}),E=new T({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUudXRpbHMlMjBpbXBvcnQlMjB3cml0ZV9iYXNpY19jb25maWclMEElMEF3cml0ZV9iYXNpY19jb25maWcoKQ==",highlighted:`<span class="hljs-keyword">from</span> accelerate.utils <span class="hljs-keyword">import</span> write_basic_config

write_basic_config()`,wrap:!1}}),S=new Te({props:{title:"Script parameters",local:"script-parameters",headingTag:"h2"}}),Q=new T({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluX3RleHRfdG9faW1hZ2Vfc2R4bC5weSUyMCU1QyUwQSUyMCUyMC0tbWl4ZWRfcHJlY2lzaW9uJTNEJTIyYmYxNiUyMg==",highlighted:`accelerate launch train_text_to_image_sdxl.py \\
  --mixed_precision=<span class="hljs-string">&quot;bf16&quot;</span>`,wrap:!1}}),D=new Te({props:{title:"Min-SNR weighting",local:"min-snr-weighting",headingTag:"h3"}}),O=new T({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluX3RleHRfdG9faW1hZ2Vfc2R4bC5weSUyMCU1QyUwQSUyMCUyMC0tc25yX2dhbW1hJTNENS4w",highlighted:`accelerate launch train_text_to_image_sdxl.py \\
  --snr_gamma=5.0`,wrap:!1}}),ee=new Te({props:{title:"Training script",local:"training-script",headingTag:"h2"}}),ae=new T({props:{code:"dG9rZW5pemVyX29uZSUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMGFyZ3MucHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglMkMlMjBzdWJmb2xkZXIlM0QlMjJ0b2tlbml6ZXIlMjIlMkMlMjByZXZpc2lvbiUzRGFyZ3MucmV2aXNpb24lMkMlMjB1c2VfZmFzdCUzREZhbHNlJTBBKSUwQXRva2VuaXplcl90d28lMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBhcmdzLnByZXRyYWluZWRfbW9kZWxfbmFtZV9vcl9wYXRoJTJDJTIwc3ViZm9sZGVyJTNEJTIydG9rZW5pemVyXzIlMjIlMkMlMjByZXZpc2lvbiUzRGFyZ3MucmV2aXNpb24lMkMlMjB1c2VfZmFzdCUzREZhbHNlJTBBKSUwQSUwQXRleHRfZW5jb2Rlcl9jbHNfb25lJTIwJTNEJTIwaW1wb3J0X21vZGVsX2NsYXNzX2Zyb21fbW9kZWxfbmFtZV9vcl9wYXRoKCUwQSUyMCUyMCUyMCUyMGFyZ3MucHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglMkMlMjBhcmdzLnJldmlzaW9uJTBBKSUwQXRleHRfZW5jb2Rlcl9jbHNfdHdvJTIwJTNEJTIwaW1wb3J0X21vZGVsX2NsYXNzX2Zyb21fbW9kZWxfbmFtZV9vcl9wYXRoKCUwQSUyMCUyMCUyMCUyMGFyZ3MucHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglMkMlMjBhcmdzLnJldmlzaW9uJTJDJTIwc3ViZm9sZGVyJTNEJTIydGV4dF9lbmNvZGVyXzIlMjIlMEEp",highlighted:`tokenizer_one = AutoTokenizer.from_pretrained(
    args.pretrained_model_name_or_path, subfolder=<span class="hljs-string">&quot;tokenizer&quot;</span>, revision=args.revision, use_fast=<span class="hljs-literal">False</span>
)
tokenizer_two = AutoTokenizer.from_pretrained(
    args.pretrained_model_name_or_path, subfolder=<span class="hljs-string">&quot;tokenizer_2&quot;</span>, revision=args.revision, use_fast=<span class="hljs-literal">False</span>
)

text_encoder_cls_one = import_model_class_from_model_name_or_path(
    args.pretrained_model_name_or_path, args.revision
)
text_encoder_cls_two = import_model_class_from_model_name_or_path(
    args.pretrained_model_name_or_path, args.revision, subfolder=<span class="hljs-string">&quot;text_encoder_2&quot;</span>
)`,wrap:!1}}),se=new T({props:{code:"dGV4dF9lbmNvZGVycyUyMCUzRCUyMCU1QnRleHRfZW5jb2Rlcl9vbmUlMkMlMjB0ZXh0X2VuY29kZXJfdHdvJTVEJTBBdG9rZW5pemVycyUyMCUzRCUyMCU1QnRva2VuaXplcl9vbmUlMkMlMjB0b2tlbml6ZXJfdHdvJTVEJTBBY29tcHV0ZV9lbWJlZGRpbmdzX2ZuJTIwJTNEJTIwZnVuY3Rvb2xzLnBhcnRpYWwoJTBBJTIwJTIwJTIwJTIwZW5jb2RlX3Byb21wdCUyQyUwQSUyMCUyMCUyMCUyMHRleHRfZW5jb2RlcnMlM0R0ZXh0X2VuY29kZXJzJTJDJTBBJTIwJTIwJTIwJTIwdG9rZW5pemVycyUzRHRva2VuaXplcnMlMkMlMEElMjAlMjAlMjAlMjBwcm9wb3J0aW9uX2VtcHR5X3Byb21wdHMlM0RhcmdzLnByb3BvcnRpb25fZW1wdHlfcHJvbXB0cyUyQyUwQSUyMCUyMCUyMCUyMGNhcHRpb25fY29sdW1uJTNEYXJncy5jYXB0aW9uX2NvbHVtbiUyQyUwQSklMEElMEF0cmFpbl9kYXRhc2V0JTIwJTNEJTIwdHJhaW5fZGF0YXNldC5tYXAoY29tcHV0ZV9lbWJlZGRpbmdzX2ZuJTJDJTIwYmF0Y2hlZCUzRFRydWUlMkMlMjBuZXdfZmluZ2VycHJpbnQlM0RuZXdfZmluZ2VycHJpbnQpJTBBdHJhaW5fZGF0YXNldCUyMCUzRCUyMHRyYWluX2RhdGFzZXQubWFwKCUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfdmFlX2VuY29kaW5nc19mbiUyQyUwQSUyMCUyMCUyMCUyMGJhdGNoZWQlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwYmF0Y2hfc2l6ZSUzRGFyZ3MudHJhaW5fYmF0Y2hfc2l6ZSUyMColMjBhY2NlbGVyYXRvci5udW1fcHJvY2Vzc2VzJTIwKiUyMGFyZ3MuZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTJDJTBBJTIwJTIwJTIwJTIwbmV3X2ZpbmdlcnByaW50JTNEbmV3X2ZpbmdlcnByaW50X2Zvcl92YWUlMkMlMEEp",highlighted:`text_encoders = [text_encoder_one, text_encoder_two]
tokenizers = [tokenizer_one, tokenizer_two]
compute_embeddings_fn = functools.partial(
    encode_prompt,
    text_encoders=text_encoders,
    tokenizers=tokenizers,
    proportion_empty_prompts=args.proportion_empty_prompts,
    caption_column=args.caption_column,
)

train_dataset = train_dataset.<span class="hljs-built_in">map</span>(compute_embeddings_fn, batched=<span class="hljs-literal">True</span>, new_fingerprint=new_fingerprint)
train_dataset = train_dataset.<span class="hljs-built_in">map</span>(
    compute_vae_encodings_fn,
    batched=<span class="hljs-literal">True</span>,
    batch_size=args.train_batch_size * accelerator.num_processes * args.gradient_accumulation_steps,
    new_fingerprint=new_fingerprint_for_vae,
)`,wrap:!1}}),re=new T({props:{code:"ZGVsJTIwdGV4dF9lbmNvZGVycyUyQyUyMHRva2VuaXplcnMlMkMlMjB2YWUlMEFnYy5jb2xsZWN0KCklMEF0b3JjaC5jdWRhLmVtcHR5X2NhY2hlKCk=",highlighted:`<span class="hljs-keyword">del</span> text_encoders, tokenizers, vae
gc.collect()
torch.cuda.empty_cache()`,wrap:!1}}),ce=new T({props:{code:"d2VpZ2h0cyUyMCUzRCUyMGdlbmVyYXRlX3RpbWVzdGVwX3dlaWdodHMoYXJncyUyQyUyMG5vaXNlX3NjaGVkdWxlci5jb25maWcubnVtX3RyYWluX3RpbWVzdGVwcykudG8oJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbW9kZWxfaW5wdXQuZGV2aWNlJTBBJTIwJTIwJTIwJTIwKSUwQSUyMCUyMCUyMCUyMHRpbWVzdGVwcyUyMCUzRCUyMHRvcmNoLm11bHRpbm9taWFsKHdlaWdodHMlMkMlMjBic3olMkMlMjByZXBsYWNlbWVudCUzRFRydWUpLmxvbmcoKSUwQSUwQW5vaXN5X21vZGVsX2lucHV0JTIwJTNEJTIwbm9pc2Vfc2NoZWR1bGVyLmFkZF9ub2lzZShtb2RlbF9pbnB1dCUyQyUyMG5vaXNlJTJDJTIwdGltZXN0ZXBzKQ==",highlighted:`weights = generate_timestep_weights(args, noise_scheduler.config.num_train_timesteps).to(
        model_input.device
    )
    timesteps = torch.multinomial(weights, bsz, replacement=<span class="hljs-literal">True</span>).long()

noisy_model_input = noise_scheduler.add_noise(model_input, noise, timesteps)`,wrap:!1}}),de=new Te({props:{title:"Launch the script",local:"launch-the-script",headingTag:"h2"}}),he=new T({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUwQWV4cG9ydCUyMFZBRV9OQU1FJTNEJTIybWFkZWJ5b2xsaW4lMkZzZHhsLXZhZS1mcDE2LWZpeCUyMiUwQWV4cG9ydCUyMERBVEFTRVRfTkFNRSUzRCUyMmxhbWJkYWxhYnMlMkZuYXJ1dG8tYmxpcC1jYXB0aW9ucyUyMiUwQSUwQWFjY2VsZXJhdGUlMjBsYXVuY2glMjB0cmFpbl90ZXh0X3RvX2ltYWdlX3NkeGwucHklMjAlNUMlMEElMjAlMjAtLXByZXRyYWluZWRfbW9kZWxfbmFtZV9vcl9wYXRoJTNEJTI0TU9ERUxfTkFNRSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF92YWVfbW9kZWxfbmFtZV9vcl9wYXRoJTNEJTI0VkFFX05BTUUlMjAlNUMlMEElMjAlMjAtLWRhdGFzZXRfbmFtZSUzRCUyNERBVEFTRVRfTkFNRSUyMCU1QyUwQSUyMCUyMC0tZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uJTIwJTVDJTBBJTIwJTIwLS1yZXNvbHV0aW9uJTNENTEyJTIwJTVDJTBBJTIwJTIwLS1jZW50ZXJfY3JvcCUyMCU1QyUwQSUyMCUyMC0tcmFuZG9tX2ZsaXAlMjAlNUMlMEElMjAlMjAtLXByb3BvcnRpb25fZW1wdHlfcHJvbXB0cyUzRDAuMiUyMCU1QyUwQSUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDElMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDQlMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2NoZWNrcG9pbnRpbmclMjAlNUMlMEElMjAlMjAtLW1heF90cmFpbl9zdGVwcyUzRDEwMDAwJTIwJTVDJTBBJTIwJTIwLS11c2VfOGJpdF9hZGFtJTIwJTVDJTBBJTIwJTIwLS1sZWFybmluZ19yYXRlJTNEMWUtMDYlMjAlNUMlMEElMjAlMjAtLWxyX3NjaGVkdWxlciUzRCUyMmNvbnN0YW50JTIyJTIwJTVDJTBBJTIwJTIwLS1scl93YXJtdXBfc3RlcHMlM0QwJTIwJTVDJTBBJTIwJTIwLS1taXhlZF9wcmVjaXNpb24lM0QlMjJmcDE2JTIyJTIwJTVDJTBBJTIwJTIwLS1yZXBvcnRfdG8lM0QlMjJ3YW5kYiUyMiUyMCU1QyUwQSUyMCUyMC0tdmFsaWRhdGlvbl9wcm9tcHQlM0QlMjJhJTIwY3V0ZSUyMFN1bmRhciUyMFBpY2hhaSUyMGNyZWF0dXJlJTIyJTIwJTVDJTBBJTIwJTIwLS12YWxpZGF0aW9uX2Vwb2NocyUyMDUlMjAlNUMlMEElMjAlMjAtLWNoZWNrcG9pbnRpbmdfc3RlcHMlM0Q1MDAwJTIwJTVDJTBBJTIwJTIwLS1vdXRwdXRfZGlyJTNEJTIyc2R4bC1uYXJ1dG8tbW9kZWwlMjIlMjAlNUMlMEElMjAlMjAtLXB1c2hfdG9faHVi",highlighted:`<span class="hljs-built_in">export</span> MODEL_NAME=<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>
<span class="hljs-built_in">export</span> VAE_NAME=<span class="hljs-string">&quot;madebyollin/sdxl-vae-fp16-fix&quot;</span>
<span class="hljs-built_in">export</span> DATASET_NAME=<span class="hljs-string">&quot;lambdalabs/naruto-blip-captions&quot;</span>

accelerate launch train_text_to_image_sdxl.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span> \\
  --pretrained_vae_model_name_or_path=<span class="hljs-variable">$VAE_NAME</span> \\
  --dataset_name=<span class="hljs-variable">$DATASET_NAME</span> \\
  --enable_xformers_memory_efficient_attention \\
  --resolution=512 \\
  --center_crop \\
  --random_flip \\
  --proportion_empty_prompts=0.2 \\
  --train_batch_size=1 \\
  --gradient_accumulation_steps=4 \\
  --gradient_checkpointing \\
  --max_train_steps=10000 \\
  --use_8bit_adam \\
  --learning_rate=1e-06 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --mixed_precision=<span class="hljs-string">&quot;fp16&quot;</span> \\
  --report_to=<span class="hljs-string">&quot;wandb&quot;</span> \\
  --validation_prompt=<span class="hljs-string">&quot;a cute Sundar Pichai creature&quot;</span> \\
  --validation_epochs 5 \\
  --checkpointing_steps=5000 \\
  --output_dir=<span class="hljs-string">&quot;sdxl-naruto-model&quot;</span> \\
  --push_to_hub`,wrap:!1}}),W=new cl({props:{id:"inference",options:["PyTorch","PyTorch XLA"],$$slots:{default:[fl]},$$scope:{ctx:J}}}),ye=new Te({props:{title:"Next steps",local:"next-steps",headingTag:"h2"}}),we=new pl({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/training/sdxl.md"}}),{c(){r=s("meta"),w=a(),m=s("p"),g=a(),f(p.$$.fragment),d=a(),f(_.$$.fragment),X=a(),U=s("blockquote"),U.innerHTML=_t,Ue=a(),j=s("p"),j.innerHTML=Tt,Ze=a(),v=s("p"),v.innerHTML=Jt,$e=a(),B=s("p"),B.innerHTML=Ut,xe=a(),C=s("p"),C.textContent=Zt,We=a(),f(R.$$.fragment),Xe=a(),k=s("p"),k.textContent=$t,je=a(),f(V.$$.fragment),ve=a(),Z=s("blockquote"),Z.innerHTML=xt,Be=a(),N=s("p"),N.textContent=Wt,Ce=a(),f(G.$$.fragment),Re=a(),H=s("p"),H.textContent=Xt,ke=a(),f(I.$$.fragment),Ve=a(),L=s("p"),L.textContent=jt,Ne=a(),f(E.$$.fragment),Ge=a(),Y=s("p"),Y.innerHTML=vt,He=a(),f(S.$$.fragment),Ie=a(),$=s("blockquote"),$.innerHTML=Bt,Le=a(),z=s("p"),z.innerHTML=Ct,Ee=a(),F=s("p"),F.innerHTML=Rt,Ye=a(),f(Q.$$.fragment),Se=a(),A=s("p"),A.innerHTML=kt,ze=a(),q=s("ul"),q.innerHTML=Vt,Fe=a(),f(D.$$.fragment),Qe=a(),P=s("p"),P.innerHTML=Nt,Ae=a(),K=s("p"),K.innerHTML=Gt,qe=a(),f(O.$$.fragment),De=a(),f(ee.$$.fragment),Pe=a(),te=s("p"),te.innerHTML=Ht,Ke=a(),le=s("p"),le.innerHTML=It,Oe=a(),ie=s("p"),ie.innerHTML=Lt,et=a(),f(ae.$$.fragment),tt=a(),ne=s("p"),ne.innerHTML=Et,lt=a(),f(se.$$.fragment),it=a(),oe=s("p"),oe.textContent=Yt,at=a(),f(re.$$.fragment),nt=a(),pe=s("p"),pe.innerHTML=St,st=a(),f(ce.$$.fragment),ot=a(),me=s("p"),me.innerHTML=zt,rt=a(),f(de.$$.fragment),pt=a(),fe=s("p"),fe.textContent=Ft,ct=a(),ue=s("p"),ue.innerHTML=Qt,mt=a(),x=s("blockquote"),x.innerHTML=At,dt=a(),f(he.$$.fragment),ft=a(),be=s("p"),be.textContent=qt,ut=a(),f(W.$$.fragment),ht=a(),f(ye.$$.fragment),bt=a(),Me=s("p"),Me.textContent=Dt,yt=a(),ge=s("ul"),ge.innerHTML=Pt,Mt=a(),f(we.$$.fragment),gt=a(),Je=s("p"),this.h()},l(e){const t=sl("svelte-u9bgzb",document.head);r=o(t,"META",{name:!0,content:!0}),t.forEach(l),w=n(e),m=o(e,"P",{}),Ot(m).forEach(l),g=n(e),u(p.$$.fragment,e),d=n(e),u(_.$$.fragment,e),X=n(e),U=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(U)!=="svelte-b2kvo6"&&(U.innerHTML=_t),Ue=n(e),j=o(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-1almhd5"&&(j.innerHTML=Tt),Ze=n(e),v=o(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-bnjhh6"&&(v.innerHTML=Jt),$e=n(e),B=o(e,"P",{"data-svelte-h":!0}),c(B)!=="svelte-1p10m2l"&&(B.innerHTML=Ut),xe=n(e),C=o(e,"P",{"data-svelte-h":!0}),c(C)!=="svelte-l7dm2q"&&(C.textContent=Zt),We=n(e),u(R.$$.fragment,e),Xe=n(e),k=o(e,"P",{"data-svelte-h":!0}),c(k)!=="svelte-z4z0b9"&&(k.textContent=$t),je=n(e),u(V.$$.fragment,e),ve=n(e),Z=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(Z)!=="svelte-1in84qc"&&(Z.innerHTML=xt),Be=n(e),N=o(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-60q53m"&&(N.textContent=Wt),Ce=n(e),u(G.$$.fragment,e),Re=n(e),H=o(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-di6juu"&&(H.textContent=Xt),ke=n(e),u(I.$$.fragment,e),Ve=n(e),L=o(e,"P",{"data-svelte-h":!0}),c(L)!=="svelte-tsz4qp"&&(L.textContent=jt),Ne=n(e),u(E.$$.fragment,e),Ge=n(e),Y=o(e,"P",{"data-svelte-h":!0}),c(Y)!=="svelte-1fkfdql"&&(Y.innerHTML=vt),He=n(e),u(S.$$.fragment,e),Ie=n(e),$=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c($)!=="svelte-1i8y0cd"&&($.innerHTML=Bt),Le=n(e),z=o(e,"P",{"data-svelte-h":!0}),c(z)!=="svelte-1q049xx"&&(z.innerHTML=Ct),Ee=n(e),F=o(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-9pyoon"&&(F.innerHTML=Rt),Ye=n(e),u(Q.$$.fragment,e),Se=n(e),A=o(e,"P",{"data-svelte-h":!0}),c(A)!=="svelte-156hk"&&(A.innerHTML=kt),ze=n(e),q=o(e,"UL",{"data-svelte-h":!0}),c(q)!=="svelte-1wjvidq"&&(q.innerHTML=Vt),Fe=n(e),u(D.$$.fragment,e),Qe=n(e),P=o(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-117tmc7"&&(P.innerHTML=Nt),Ae=n(e),K=o(e,"P",{"data-svelte-h":!0}),c(K)!=="svelte-tp3kp"&&(K.innerHTML=Gt),qe=n(e),u(O.$$.fragment,e),De=n(e),u(ee.$$.fragment,e),Pe=n(e),te=o(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-1lew7ju"&&(te.innerHTML=Ht),Ke=n(e),le=o(e,"P",{"data-svelte-h":!0}),c(le)!=="svelte-vxr0rt"&&(le.innerHTML=It),Oe=n(e),ie=o(e,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-9e3dc8"&&(ie.innerHTML=Lt),et=n(e),u(ae.$$.fragment,e),tt=n(e),ne=o(e,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-19ae5vc"&&(ne.innerHTML=Et),lt=n(e),u(se.$$.fragment,e),it=n(e),oe=o(e,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-168omb4"&&(oe.textContent=Yt),at=n(e),u(re.$$.fragment,e),nt=n(e),pe=o(e,"P",{"data-svelte-h":!0}),c(pe)!=="svelte-15uikpu"&&(pe.innerHTML=St),st=n(e),u(ce.$$.fragment,e),ot=n(e),me=o(e,"P",{"data-svelte-h":!0}),c(me)!=="svelte-6gmbd2"&&(me.innerHTML=zt),rt=n(e),u(de.$$.fragment,e),pt=n(e),fe=o(e,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-9dei1q"&&(fe.textContent=Ft),ct=n(e),ue=o(e,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-1rijod9"&&(ue.innerHTML=Qt),mt=n(e),x=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(x)!=="svelte-exdmft"&&(x.innerHTML=At),dt=n(e),u(he.$$.fragment,e),ft=n(e),be=o(e,"P",{"data-svelte-h":!0}),c(be)!=="svelte-ay58z1"&&(be.textContent=qt),ut=n(e),u(W.$$.fragment,e),ht=n(e),u(ye.$$.fragment,e),bt=n(e),Me=o(e,"P",{"data-svelte-h":!0}),c(Me)!=="svelte-1gdijji"&&(Me.textContent=Dt),yt=n(e),ge=o(e,"UL",{"data-svelte-h":!0}),c(ge)!=="svelte-187x0qc"&&(ge.innerHTML=Pt),Mt=n(e),u(we.$$.fragment,e),gt=n(e),Je=o(e,"P",{}),Ot(Je).forEach(l),this.h()},h(){_e(r,"name","hf:doc:metadata"),_e(r,"content",hl),_e(U,"class","warning"),_e(Z,"class","tip"),_e($,"class","tip"),_e(x,"class","tip")},m(e,t){ol(document.head,r),i(e,w,t),i(e,m,t),i(e,g,t),h(p,e,t),i(e,d,t),h(_,e,t),i(e,X,t),i(e,U,t),i(e,Ue,t),i(e,j,t),i(e,Ze,t),i(e,v,t),i(e,$e,t),i(e,B,t),i(e,xe,t),i(e,C,t),i(e,We,t),h(R,e,t),i(e,Xe,t),i(e,k,t),i(e,je,t),h(V,e,t),i(e,ve,t),i(e,Z,t),i(e,Be,t),i(e,N,t),i(e,Ce,t),h(G,e,t),i(e,Re,t),i(e,H,t),i(e,ke,t),h(I,e,t),i(e,Ve,t),i(e,L,t),i(e,Ne,t),h(E,e,t),i(e,Ge,t),i(e,Y,t),i(e,He,t),h(S,e,t),i(e,Ie,t),i(e,$,t),i(e,Le,t),i(e,z,t),i(e,Ee,t),i(e,F,t),i(e,Ye,t),h(Q,e,t),i(e,Se,t),i(e,A,t),i(e,ze,t),i(e,q,t),i(e,Fe,t),h(D,e,t),i(e,Qe,t),i(e,P,t),i(e,Ae,t),i(e,K,t),i(e,qe,t),h(O,e,t),i(e,De,t),h(ee,e,t),i(e,Pe,t),i(e,te,t),i(e,Ke,t),i(e,le,t),i(e,Oe,t),i(e,ie,t),i(e,et,t),h(ae,e,t),i(e,tt,t),i(e,ne,t),i(e,lt,t),h(se,e,t),i(e,it,t),i(e,oe,t),i(e,at,t),h(re,e,t),i(e,nt,t),i(e,pe,t),i(e,st,t),h(ce,e,t),i(e,ot,t),i(e,me,t),i(e,rt,t),h(de,e,t),i(e,pt,t),i(e,fe,t),i(e,ct,t),i(e,ue,t),i(e,mt,t),i(e,x,t),i(e,dt,t),h(he,e,t),i(e,ft,t),i(e,be,t),i(e,ut,t),h(W,e,t),i(e,ht,t),h(ye,e,t),i(e,bt,t),i(e,Me,t),i(e,yt,t),i(e,ge,t),i(e,Mt,t),h(we,e,t),i(e,gt,t),i(e,Je,t),wt=!0},p(e,[t]){const Kt={};t&2&&(Kt.$$scope={dirty:t,ctx:e}),W.$set(Kt)},i(e){wt||(b(p.$$.fragment,e),b(_.$$.fragment,e),b(R.$$.fragment,e),b(V.$$.fragment,e),b(G.$$.fragment,e),b(I.$$.fragment,e),b(E.$$.fragment,e),b(S.$$.fragment,e),b(Q.$$.fragment,e),b(D.$$.fragment,e),b(O.$$.fragment,e),b(ee.$$.fragment,e),b(ae.$$.fragment,e),b(se.$$.fragment,e),b(re.$$.fragment,e),b(ce.$$.fragment,e),b(de.$$.fragment,e),b(he.$$.fragment,e),b(W.$$.fragment,e),b(ye.$$.fragment,e),b(we.$$.fragment,e),wt=!0)},o(e){y(p.$$.fragment,e),y(_.$$.fragment,e),y(R.$$.fragment,e),y(V.$$.fragment,e),y(G.$$.fragment,e),y(I.$$.fragment,e),y(E.$$.fragment,e),y(S.$$.fragment,e),y(Q.$$.fragment,e),y(D.$$.fragment,e),y(O.$$.fragment,e),y(ee.$$.fragment,e),y(ae.$$.fragment,e),y(se.$$.fragment,e),y(re.$$.fragment,e),y(ce.$$.fragment,e),y(de.$$.fragment,e),y(he.$$.fragment,e),y(W.$$.fragment,e),y(ye.$$.fragment,e),y(we.$$.fragment,e),wt=!1},d(e){e&&(l(w),l(m),l(g),l(d),l(X),l(U),l(Ue),l(j),l(Ze),l(v),l($e),l(B),l(xe),l(C),l(We),l(Xe),l(k),l(je),l(ve),l(Z),l(Be),l(N),l(Ce),l(Re),l(H),l(ke),l(Ve),l(L),l(Ne),l(Ge),l(Y),l(He),l(Ie),l($),l(Le),l(z),l(Ee),l(F),l(Ye),l(Se),l(A),l(ze),l(q),l(Fe),l(Qe),l(P),l(Ae),l(K),l(qe),l(De),l(Pe),l(te),l(Ke),l(le),l(Oe),l(ie),l(et),l(tt),l(ne),l(lt),l(it),l(oe),l(at),l(nt),l(pe),l(st),l(ot),l(me),l(rt),l(pt),l(fe),l(ct),l(ue),l(mt),l(x),l(dt),l(ft),l(be),l(ut),l(ht),l(bt),l(Me),l(yt),l(ge),l(Mt),l(gt),l(Je)),l(r),M(p,e),M(_,e),M(R,e),M(V,e),M(G,e),M(I,e),M(E,e),M(S,e),M(Q,e),M(D,e),M(O,e),M(ee,e),M(ae,e),M(se,e),M(re,e),M(ce,e),M(de,e),M(he,e),M(W,e),M(ye,e),M(we,e)}}}const hl='{"title":"Stable Diffusion XL","local":"stable-diffusion-xl","sections":[{"title":"Script parameters","local":"script-parameters","sections":[{"title":"Min-SNR weighting","local":"min-snr-weighting","sections":[],"depth":3}],"depth":2},{"title":"Training script","local":"training-script","sections":[],"depth":2},{"title":"Launch the script","local":"launch-the-script","sections":[],"depth":2},{"title":"Next steps","local":"next-steps","sections":[],"depth":2}],"depth":1}';function bl(J){return il(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jl extends al{constructor(r){super(),nl(this,r,bl,ul,ll,{})}}export{Jl as component};
