import{s as Gt,o as It,n as at}from"../chunks/scheduler.5c93273d.js";import{S as Ht,i as Vt,g as p,s as n,r as M,A as Bt,h as r,f as l,c as a,j as vt,u as c,x as m,k as Rt,y as Et,a as s,v as o,d as u,t as d,w as _}from"../chunks/index.e43dd92b.js";import{T as nt}from"../chunks/Tip.1cbfe904.js";import{C as y}from"../chunks/CodeBlock.6896320e.js";import{H as ce,E as kt}from"../chunks/getInferenceSnippets.d410b42d.js";function Nt(b){let i,h='🤗 Accelerate 是一个帮助您在多个 GPU/TPU 上或使用混合精度进行训练的库。它会根据您的硬件和环境自动配置训练设置。查看 🤗 Accelerate <a href="https://huggingface.co/docs/accelerate/quicktour" rel="nofollow">快速入门</a> 以了解更多信息。';return{c(){i=p("p"),i.innerHTML=h},l(f){i=r(f,"P",{"data-svelte-h":!0}),m(i)!=="svelte-115i41e"&&(i.innerHTML=h)},m(f,w){s(f,i,w)},p:at,d(f){f&&l(i)}}}function Ft(b){let i,h='以下部分重点介绍了训练脚本中对于理解如何修改它很重要的部分，但并未涵盖 <a href="https://github.com/huggingface/diffusers/blob/main/examples/wuerstchen/text_to_image/train_text_to_image_prior.py" rel="nofollow">脚本</a> 的详细信息。如果您有兴趣了解更多，请随时阅读脚本，并告诉我们您是否有任何问题或疑虑。';return{c(){i=p("p"),i.innerHTML=h},l(f){i=r(f,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1ilnp0n"&&(i.innerHTML=h)},m(f,w){s(f,i,w)},p:at,d(f){f&&l(i)}}}function Qt(b){let i,h="要使用Weights &amp; Biases监控训练进度，请在训练命令中添加<code>--report_to=wandb</code>参数。您还需要在训练命令中添加<code>--validation_prompt</code>以跟踪结果。这对于调试模型和查看中间结果非常有用。";return{c(){i=p("p"),i.innerHTML=h},l(f){i=r(f,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1e04jsc"&&(i.innerHTML=h)},m(f,w){s(f,i,w)},p:at,d(f){f&&l(i)}}}function At(b){let i,h,f,w,U,oe,j,it='<a href="https://hf.co/papers/2306.00637" rel="nofollow">Wuerstchen</a> 模型通过将潜在空间压缩 42 倍，在不影响图像质量的情况下大幅降低计算成本并加速推理。在训练过程中，Wuerstchen 使用两个模型（VQGAN + 自动编码器）来压缩潜在表示，然后第三个模型（文本条件潜在扩散模型）在这个高度压缩的空间上进行条件化以生成图像。',ue,g,pt="为了将先验模型放入 GPU 内存并加速训练，尝试分别启用 <code>gradient_accumulation_steps</code>、<code>gradient_checkpointing</code> 和 <code>mixed_precision</code>。",de,Z,rt='本指南探讨 <a href="https://github.com/huggingface/diffusers/blob/main/examples/wuerstchen/text_to_image/train_text_to_image_prior.py" rel="nofollow">train_text_to_image_prior.py</a> 脚本，帮助您更熟悉它，以及如何根据您的用例进行适配。',_e,W,mt="在运行脚本之前，请确保从源代码安装库：",he,x,ye,C,ft="然后导航到包含训练脚本的示例文件夹，并安装脚本所需的依赖项：",we,X,be,J,Je,v,Mt="初始化一个 🤗 Accelerate 环境：",Te,R,$e,G,ct="要设置一个默认的 🤗 Accelerate 环境而不选择任何配置：",Ue,I,je,H,ot="或者，如果您的环境不支持交互式 shell，例如笔记本，您可以使用：",ge,V,Ze,B,ut='最后，如果您想在自己的数据集上训练模型，请查看 <a href="create_dataset">创建训练数据集</a> 指南，了解如何创建与训练脚本兼容的数据集。',We,T,xe,E,Ce,k,dt='训练脚本提供了许多参数来帮助您自定义训练运行。所有参数及其描述都可以在 <a href="https://github.com/huggingface/diffusers/blob/6e68c71503682c8693cb5b06a4da4911dfd655ee/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L192" rel="nofollow"><code>parse_args()</code></a> 函数中找到。它为每个参数提供了默认值，例如训练批次大小和学习率，但如果您愿意，也可以在训练命令中设置自己的值。',Xe,N,_t="例如，要使用 fp16 格式的混合精度加速训练，请在训练命令中添加 <code>--mixed_precision</code> 参数：",ve,F,Re,Q,ht='大多数参数与 <a href="text2image#script-parameters">文本到图像</a> 训练指南中的参数相同，因此让我们直接深入 Wuerstchen 训练脚本！',Ge,A,Ie,Y,yt='训练脚本也与 <a href="text2image#training-script">文本到图像</a> 训练指南类似，但已修改以支持 Wuerstchen。本指南重点介绍 Wuerstchen 训练脚本中独特的代码。',He,L,wt='<a href="https://github.com/huggingface/diffusers/blob/6e68c71503682c8693cb5b06a4da4911dfd655ee/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L441" rel="nofollow"><code>main()</code></a> 函数首先初始化图像编码器 - 一个 <a href="https://github.com/huggingface/diffusers/blob/main/examples/wuerstchen/text_to_image/modeling_efficient_net_encoder.py" rel="nofollow">EfficientNet</a> - 以及通常的调度器和分词器。',Ve,S,Be,z,bt="您还将加载 <code>WuerstchenPrior</code> 模型以进行优化。",Ee,q,ke,P,Jt='接下来，您将对图像应用一些 <a href="https://github.com/huggingface/diffusers/blob/65ef7a0c5c594b4f84092e328fbdd73183613b30/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L656" rel="nofollow">transforms</a> 并对标题进行 <a href="https://github.com/huggingface/diffusers/blob/65ef7a0c5c594b4f84092e328fbdd73183613b30/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L637" rel="nofollow">tokenize</a>：',Ne,D,Fe,K,Tt='最后，<a href="https://github.com/huggingface/diffusers/blob/65ef7a0c5c594b4f84092e328fbdd73183613b30/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L656" rel="nofollow">训练循环</a>处理使用<code>EfficientNetEncoder</code>将图像压缩到潜在空间，向潜在表示添加噪声，并使用<code>WuerstchenPrior</code>模型预测噪声残差。',Qe,O,Ae,ee,$t='如果您想了解更多关于训练循环的工作原理，请查看<a href="../using-diffusers/write_own_pipeline">理解管道、模型和调度器</a>教程，该教程分解了去噪过程的基本模式。',Ye,te,Le,le,Ut="一旦您完成了所有更改或对默认配置满意，就可以启动训练脚本了！🚀",Se,se,jt='设置<code>DATASET_NAME</code>环境变量为Hub中的数据集名称。本指南使用<a href="https://huggingface.co/datasets/lambdalabs/naruto-blip-captions" rel="nofollow">Naruto BLIP captions</a>数据集，但您也可以创建和训练自己的数据集（参见<a href="create_dataset">创建用于训练的数据集</a>指南）。',ze,$,qe,ne,Pe,ae,gt="训练完成后，您可以使用新训练的模型进行推理！",De,ie,Ke,pe,Oe,re,Zt=`恭喜您训练了一个Wuerstchen模型！要了解更多关于如何使用您的新模型的信息，请参
以下内容可能有所帮助：`,et,me,Wt='<li>查看 <a href="../api/pipelines/wuerstchen#text-to-image-generation">Wuerstchen</a> API 文档，了解更多关于如何使用该管道进行文本到图像生成及其限制的信息。</li>',tt,fe,lt,Me,st;return U=new ce({props:{title:"Wuerstchen",local:"wuerstchen",headingTag:"h1"}}),x=new y({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}}),X=new y({props:{code:"Y2QlMjBleGFtcGxlcyUyRnd1ZXJzdGNoZW4lMkZ0ZXh0X3RvX2ltYWdlJTBBcGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:`<span class="hljs-built_in">cd</span> examples/wuerstchen/text_to_image
pip install -r requirements.txt`,wrap:!1}}),J=new nt({props:{$$slots:{default:[Nt]},$$scope:{ctx:b}}}),R=new y({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config",wrap:!1}}),I=new y({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZyUyMGRlZmF1bHQ=",highlighted:"accelerate config default",wrap:!1}}),V=new y({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}}),T=new nt({props:{$$slots:{default:[Ft]},$$scope:{ctx:b}}}),E=new ce({props:{title:"脚本参数",local:"脚本参数",headingTag:"h2"}}),F=new y({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluX3RleHRfdG9faW1hZ2VfcHJpb3IucHklMjAlNUMlMEElMjAlMjAtLW1peGVkX3ByZWNpc2lvbiUzRCUyMmZwMTYlMjI=",highlighted:`accelerate launch train_text_to_image_prior.py \\
  --mixed_precision=<span class="hljs-string">&quot;fp16&quot;</span>`,wrap:!1}}),A=new ce({props:{title:"训练脚本",local:"训练脚本",headingTag:"h2"}}),S=new y({props:{code:"d2l0aCUyMENvbnRleHRNYW5hZ2VycyhkZWVwc3BlZWRfemVyb19pbml0X2Rpc2FibGVkX2NvbnRleHRfbWFuYWdlcigpKSUzQSUwQSUyMCUyMCUyMCUyMHByZXRyYWluZWRfY2hlY2twb2ludF9maWxlJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUyMmRvbWUyNzIlMkZ3dWVyc3RjaGVuJTIyJTJDJTIwZmlsZW5hbWUlM0QlMjJtb2RlbF92Ml9zdGFnZV9iLnB0JTIyKSUwQSUyMCUyMCUyMCUyMHN0YXRlX2RpY3QlMjAlM0QlMjB0b3JjaC5sb2FkKHByZXRyYWluZWRfY2hlY2twb2ludF9maWxlJTJDJTIwbWFwX2xvY2F0aW9uJTNEJTIyY3B1JTIyKSUwQSUyMCUyMCUyMCUyMGltYWdlX2VuY29kZXIlMjAlM0QlMjBFZmZpY2llbnROZXRFbmNvZGVyKCklMEElMjAlMjAlMjAlMjBpbWFnZV9lbmNvZGVyLmxvYWRfc3RhdGVfZGljdChzdGF0ZV9kaWN0JTVCJTIyZWZmbmV0X3N0YXRlX2RpY3QlMjIlNUQpJTBBJTIwJTIwJTIwJTIwaW1hZ2VfZW5jb2Rlci5ldmFsKCk=",highlighted:`<span class="hljs-keyword">with</span> ContextManagers(deepspeed_zero_init_disabled_context_manager()):
    pretrained_checkpoint_file = hf_hub_download(<span class="hljs-string">&quot;dome272/wuerstchen&quot;</span>, filename=<span class="hljs-string">&quot;model_v2_stage_b.pt&quot;</span>)
    state_dict = torch.load(pretrained_checkpoint_file, map_location=<span class="hljs-string">&quot;cpu&quot;</span>)
    image_encoder = EfficientNetEncoder()
    image_encoder.load_state_dict(state_dict[<span class="hljs-string">&quot;effnet_state_dict&quot;</span>])
    image_encoder.<span class="hljs-built_in">eval</span>()`,wrap:!1}}),q=new y({props:{code:"cHJpb3IlMjAlM0QlMjBXdWVyc3RjaGVuUHJpb3IuZnJvbV9wcmV0cmFpbmVkKGFyZ3MucHJldHJhaW5lZF9wcmlvcl9tb2RlbF9uYW1lX29yX3BhdGglMkMlMjBzdWJmb2xkZXIlM0QlMjJwcmlvciUyMiklMEElMEFvcHRpbWl6ZXIlMjAlM0QlMjBvcHRpbWl6ZXJfY2xzKCUwQSUyMCUyMCUyMCUyMHByaW9yLnBhcmFtZXRlcnMoKSUyQyUwQSUyMCUyMCUyMCUyMGxyJTNEYXJncy5sZWFybmluZ19yYXRlJTJDJTBBJTIwJTIwJTIwJTIwYmV0YXMlM0QoYXJncy5hZGFtX2JldGExJTJDJTIwYXJncy5hZGFtX2JldGEyKSUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9kZWNheSUzRGFyZ3MuYWRhbV93ZWlnaHRfZGVjYXklMkMlMEElMjAlMjAlMjAlMjBlcHMlM0RhcmdzLmFkYW1fZXBzaWxvbiUyQyUwQSk=",highlighted:`prior = WuerstchenPrior.from_pretrained(args.pretrained_prior_model_name_or_path, subfolder=<span class="hljs-string">&quot;prior&quot;</span>)

optimizer = optimizer_cls(
    prior.parameters(),
    lr=args.learning_rate,
    betas=(args.adam_beta1, args.adam_beta2),
    weight_decay=args.adam_weight_decay,
    eps=args.adam_epsilon,
)`,wrap:!1}}),D=new y({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc190cmFpbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBpbWFnZXMlMjAlM0QlMjAlNUJpbWFnZS5jb252ZXIlMEF0KCUyMlJHQiUyMiklMjBmb3IlMjBpbWFnZSUyMGluJTIwZXhhbXBsZXMlNUJpbWFnZV9jb2x1bW4lNUQlNUQlMEElMjAlMjAlMjAlMjBleGFtcGxlcyU1QiUyMmVmZm5ldF9waXhlbF92YWx1ZXMlMjIlNUQlMjAlM0QlMjAlNUJlZmZuZXRfdHJhbnNmb3JtcyhpbWFnZSklMjBmb3IlMjBpbWFnZSUyMGluJTIwaW1hZ2VzJTVEJTBBJTIwJTIwJTIwJTIwZXhhbXBsZXMlNUIlMjJ0ZXh0X2lucHV0X2lkcyUyMiU1RCUyQyUyMGV4YW1wbGVzJTVCJTIydGV4dF9tYXNrJTIyJTVEJTIwJTNEJTIwdG9rZW5pemVfY2FwdGlvbnMoZXhhbXBsZXMpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwZXhhbXBsZXM=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_train</span>(<span class="hljs-params">examples</span>):
    images = [image.conver
t(<span class="hljs-string">&quot;RGB&quot;</span>) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> examples[image_column]]
    examples[<span class="hljs-string">&quot;effnet_pixel_values&quot;</span>] = [effnet_transforms(image) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> images]
    examples[<span class="hljs-string">&quot;text_input_ids&quot;</span>], examples[<span class="hljs-string">&quot;text_mask&quot;</span>] = tokenize_captions(examples)
    <span class="hljs-keyword">return</span> examples`,wrap:!1}}),O=new y({props:{code:"cHJlZF9ub2lzZSUyMCUzRCUyMHByaW9yKG5vaXN5X2xhdGVudHMlMkMlMjB0aW1lc3RlcHMlMkMlMjBwcm9tcHRfZW1iZWRzKQ==",highlighted:"pred_noise = prior(noisy_latents, timesteps, prompt_embeds)",wrap:!1}}),te=new ce({props:{title:"启动脚本",local:"启动脚本",headingTag:"h2"}}),$=new nt({props:{$$slots:{default:[Qt]},$$scope:{ctx:b}}}),ne=new y({props:{code:"ZXhwb3J0JTIwREFUQVNFVF9OQU1FJTNEJTIybGFtYmRhbGFicyUyRm5hcnV0by1ibGlwLWNhcHRpb25zJTIyJTBBJTBBYWNjZWxlcmF0ZSUyMGxhdW5jaCUyMCUyMHRyYWluX3RleHRfdG9faW1hZ2VfcHJpb3IucHklMjAlNUMlMEElMjAlMjAtLW1peGVkX3ByZWNpc2lvbiUzRCUyMmZwMTYlMjIlMjAlNUMlMEElMjAlMjAtLWRhdGFzZXRfbmFtZSUzRCUyNERBVEFTRVRfTkFNRSUyMCU1QyUwQSUyMCUyMC0tcmVzb2x1dGlvbiUzRDc2OCUyMCU1QyUwQSUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDQlMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2NoZWNrcG9pbnRpbmclMjAlNUMlMEElMjAlMjAtLWRhdGFsb2FkZXJfbnVtX3dvcmtlcnMlM0Q0JTIwJTVDJTBBJTIwJTIwLS1tYXhfdHJhaW5fc3RlcHMlM0QxNTAwMCUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDFlLTA1JTIwJTVDJTBBJTIwJTIwLS1tYXhfZ3JhZF9ub3JtJTNEMSUyMCU1QyUwQSUyMCUyMC0tY2hlY2twb2ludHNfdG90YWxfbGltaXQlM0QzJTIwJTVDJTBBJTIwJTIwLS1scl9zY2hlZHVsZXIlM0QlMjJjb25zdGFudCUyMiUyMCU1QyUwQSUyMCUyMC0tbHJfd2FybXVwX3N0ZXBzJTNEMCUyMCU1QyUwQSUyMCUyMC0tdmFsaWRhdGlvbl9wcm9tcHRzJTNEJTIyQSUyMHJvYm90JTIwbmFydXRvJTJDJTIwNGslMjBwaG90byUyMiUyMCU1QyUwQSUyMCUyMC0tcmVwb3J0X3RvJTNEJTIyd2FuZGIlMjIlMjAlNUMlMEElMjAlMjAtLXB1c2hfdG9faHViJTIwJTVDJTBBJTIwJTIwLS1vdXRwdXRfZGlyJTNEJTIyd3VlcnN0Y2hlbi1wcmlvci1uYXJ1dG8tbW9kZWwlMjI=",highlighted:`<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_prior.py \\
  --mixed_precision=<span class="hljs-string">&quot;fp16&quot;</span> \\
  --dataset_name=<span class="hljs-variable">$DATASET_NAME</span> \\
  --resolution=768 \\
  --train_batch_size=4 \\
  --gradient_accumulation_steps=4 \\
  --gradient_checkpointing \\
  --dataloader_num_workers=4 \\
  --max_train_steps=15000 \\
  --learning_rate=1e-05 \\
  --max_grad_norm=1 \\
  --checkpoints_total_limit=3 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --validation_prompts=<span class="hljs-string">&quot;A robot naruto, 4k photo&quot;</span> \\
  --report_to=<span class="hljs-string">&quot;wandb&quot;</span> \\
  --push_to_hub \\
  --output_dir=<span class="hljs-string">&quot;wuerstchen-prior-naruto-model&quot;</span>`,wrap:!1}}),ie=new y({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQWZyb20lMjBkaWZmdXNlcnMucGlwZWxpbmVzLnd1ZXJzdGNoZW4lMjBpbXBvcnQlMjBERUZBVUxUX1NUQUdFX0NfVElNRVNURVBTJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMjJwYXRoJTJGdG8lMkZzYXZlZCUyRm1vZGVsJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQSUwQWNhcHRpb24lMjAlM0QlMjAlMjJBJTIwY3V0ZSUyMGJpcmQlMjBuYXJ1dG8lMjBob2xkaW5nJTIwYSUyMHNoaWVsZCUyMiUwQWltYWdlcyUyMCUzRCUyMHBpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMGNhcHRpb24lMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjBoZWlnaHQlM0QxNTM2JTJDJTBBJTIwJTIwJTIwJTIwcHJpb3JfdGltZXN0ZXBzJTNEREVGQVVMVF9TVEFHRV9DX1RJTUVTVEVQUyUyQyUwQSUyMCUyMCUyMCUyMHByaW9yX2d1aWRhbmNlX3NjYWxlJTNENC4wJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ltYWdlc19wZXJfcHJvbXB0JTNEMiUyQyUwQSkuaW1hZ2Vz",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">from</span> diffusers.pipelines.wuerstchen <span class="hljs-keyword">import</span> DEFAULT_STAGE_C_TIMESTEPS

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

caption = <span class="hljs-string">&quot;A cute bird naruto holding a shield&quot;</span>
images = pipeline(
    caption,
    width=<span class="hljs-number">1024</span>,
    height=<span class="hljs-number">1536</span>,
    prior_timesteps=DEFAULT_STAGE_C_TIMESTEPS,
    prior_guidance_scale=<span class="hljs-number">4.0</span>,
    num_images_per_prompt=<span class="hljs-number">2</span>,
).images`,wrap:!1}}),pe=new ce({props:{title:"下一步",local:"下一步",headingTag:"h2"}}),fe=new kt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/zh/training/wuerstchen.md"}}),{c(){i=p("meta"),h=n(),f=p("p"),w=n(),M(U.$$.fragment),oe=n(),j=p("p"),j.innerHTML=it,ue=n(),g=p("p"),g.innerHTML=pt,de=n(),Z=p("p"),Z.innerHTML=rt,_e=n(),W=p("p"),W.textContent=mt,he=n(),M(x.$$.fragment),ye=n(),C=p("p"),C.textContent=ft,we=n(),M(X.$$.fragment),be=n(),M(J.$$.fragment),Je=n(),v=p("p"),v.textContent=Mt,Te=n(),M(R.$$.fragment),$e=n(),G=p("p"),G.textContent=ct,Ue=n(),M(I.$$.fragment),je=n(),H=p("p"),H.textContent=ot,ge=n(),M(V.$$.fragment),Ze=n(),B=p("p"),B.innerHTML=ut,We=n(),M(T.$$.fragment),xe=n(),M(E.$$.fragment),Ce=n(),k=p("p"),k.innerHTML=dt,Xe=n(),N=p("p"),N.innerHTML=_t,ve=n(),M(F.$$.fragment),Re=n(),Q=p("p"),Q.innerHTML=ht,Ge=n(),M(A.$$.fragment),Ie=n(),Y=p("p"),Y.innerHTML=yt,He=n(),L=p("p"),L.innerHTML=wt,Ve=n(),M(S.$$.fragment),Be=n(),z=p("p"),z.innerHTML=bt,Ee=n(),M(q.$$.fragment),ke=n(),P=p("p"),P.innerHTML=Jt,Ne=n(),M(D.$$.fragment),Fe=n(),K=p("p"),K.innerHTML=Tt,Qe=n(),M(O.$$.fragment),Ae=n(),ee=p("p"),ee.innerHTML=$t,Ye=n(),M(te.$$.fragment),Le=n(),le=p("p"),le.textContent=Ut,Se=n(),se=p("p"),se.innerHTML=jt,ze=n(),M($.$$.fragment),qe=n(),M(ne.$$.fragment),Pe=n(),ae=p("p"),ae.textContent=gt,De=n(),M(ie.$$.fragment),Ke=n(),M(pe.$$.fragment),Oe=n(),re=p("p"),re.textContent=Zt,et=n(),me=p("ul"),me.innerHTML=Wt,tt=n(),M(fe.$$.fragment),lt=n(),Me=p("p"),this.h()},l(e){const t=Bt("svelte-u9bgzb",document.head);i=r(t,"META",{name:!0,content:!0}),t.forEach(l),h=a(e),f=r(e,"P",{}),vt(f).forEach(l),w=a(e),c(U.$$.fragment,e),oe=a(e),j=r(e,"P",{"data-svelte-h":!0}),m(j)!=="svelte-1y37dzb"&&(j.innerHTML=it),ue=a(e),g=r(e,"P",{"data-svelte-h":!0}),m(g)!=="svelte-1hevm7y"&&(g.innerHTML=pt),de=a(e),Z=r(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-15amkt"&&(Z.innerHTML=rt),_e=a(e),W=r(e,"P",{"data-svelte-h":!0}),m(W)!=="svelte-sgtnc7"&&(W.textContent=mt),he=a(e),c(x.$$.fragment,e),ye=a(e),C=r(e,"P",{"data-svelte-h":!0}),m(C)!=="svelte-9jjxff"&&(C.textContent=ft),we=a(e),c(X.$$.fragment,e),be=a(e),c(J.$$.fragment,e),Je=a(e),v=r(e,"P",{"data-svelte-h":!0}),m(v)!=="svelte-1cwu974"&&(v.textContent=Mt),Te=a(e),c(R.$$.fragment,e),$e=a(e),G=r(e,"P",{"data-svelte-h":!0}),m(G)!=="svelte-6b3ch3"&&(G.textContent=ct),Ue=a(e),c(I.$$.fragment,e),je=a(e),H=r(e,"P",{"data-svelte-h":!0}),m(H)!=="svelte-1dtw1zl"&&(H.textContent=ot),ge=a(e),c(V.$$.fragment,e),Ze=a(e),B=r(e,"P",{"data-svelte-h":!0}),m(B)!=="svelte-48cuyc"&&(B.innerHTML=ut),We=a(e),c(T.$$.fragment,e),xe=a(e),c(E.$$.fragment,e),Ce=a(e),k=r(e,"P",{"data-svelte-h":!0}),m(k)!=="svelte-1oqektq"&&(k.innerHTML=dt),Xe=a(e),N=r(e,"P",{"data-svelte-h":!0}),m(N)!=="svelte-1q1qn86"&&(N.innerHTML=_t),ve=a(e),c(F.$$.fragment,e),Re=a(e),Q=r(e,"P",{"data-svelte-h":!0}),m(Q)!=="svelte-1sf1qme"&&(Q.innerHTML=ht),Ge=a(e),c(A.$$.fragment,e),Ie=a(e),Y=r(e,"P",{"data-svelte-h":!0}),m(Y)!=="svelte-wph2oy"&&(Y.innerHTML=yt),He=a(e),L=r(e,"P",{"data-svelte-h":!0}),m(L)!=="svelte-3ku2gt"&&(L.innerHTML=wt),Ve=a(e),c(S.$$.fragment,e),Be=a(e),z=r(e,"P",{"data-svelte-h":!0}),m(z)!=="svelte-1yy5jk"&&(z.innerHTML=bt),Ee=a(e),c(q.$$.fragment,e),ke=a(e),P=r(e,"P",{"data-svelte-h":!0}),m(P)!=="svelte-1bm1yy2"&&(P.innerHTML=Jt),Ne=a(e),c(D.$$.fragment,e),Fe=a(e),K=r(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-1ybzclb"&&(K.innerHTML=Tt),Qe=a(e),c(O.$$.fragment,e),Ae=a(e),ee=r(e,"P",{"data-svelte-h":!0}),m(ee)!=="svelte-1kc06wj"&&(ee.innerHTML=$t),Ye=a(e),c(te.$$.fragment,e),Le=a(e),le=r(e,"P",{"data-svelte-h":!0}),m(le)!=="svelte-eho98"&&(le.textContent=Ut),Se=a(e),se=r(e,"P",{"data-svelte-h":!0}),m(se)!=="svelte-m0a24v"&&(se.innerHTML=jt),ze=a(e),c($.$$.fragment,e),qe=a(e),c(ne.$$.fragment,e),Pe=a(e),ae=r(e,"P",{"data-svelte-h":!0}),m(ae)!=="svelte-2s2vlp"&&(ae.textContent=gt),De=a(e),c(ie.$$.fragment,e),Ke=a(e),c(pe.$$.fragment,e),Oe=a(e),re=r(e,"P",{"data-svelte-h":!0}),m(re)!=="svelte-1y86jkc"&&(re.textContent=Zt),et=a(e),me=r(e,"UL",{"data-svelte-h":!0}),m(me)!=="svelte-thqmm8"&&(me.innerHTML=Wt),tt=a(e),c(fe.$$.fragment,e),lt=a(e),Me=r(e,"P",{}),vt(Me).forEach(l),this.h()},h(){Rt(i,"name","hf:doc:metadata"),Rt(i,"content",Yt)},m(e,t){Et(document.head,i),s(e,h,t),s(e,f,t),s(e,w,t),o(U,e,t),s(e,oe,t),s(e,j,t),s(e,ue,t),s(e,g,t),s(e,de,t),s(e,Z,t),s(e,_e,t),s(e,W,t),s(e,he,t),o(x,e,t),s(e,ye,t),s(e,C,t),s(e,we,t),o(X,e,t),s(e,be,t),o(J,e,t),s(e,Je,t),s(e,v,t),s(e,Te,t),o(R,e,t),s(e,$e,t),s(e,G,t),s(e,Ue,t),o(I,e,t),s(e,je,t),s(e,H,t),s(e,ge,t),o(V,e,t),s(e,Ze,t),s(e,B,t),s(e,We,t),o(T,e,t),s(e,xe,t),o(E,e,t),s(e,Ce,t),s(e,k,t),s(e,Xe,t),s(e,N,t),s(e,ve,t),o(F,e,t),s(e,Re,t),s(e,Q,t),s(e,Ge,t),o(A,e,t),s(e,Ie,t),s(e,Y,t),s(e,He,t),s(e,L,t),s(e,Ve,t),o(S,e,t),s(e,Be,t),s(e,z,t),s(e,Ee,t),o(q,e,t),s(e,ke,t),s(e,P,t),s(e,Ne,t),o(D,e,t),s(e,Fe,t),s(e,K,t),s(e,Qe,t),o(O,e,t),s(e,Ae,t),s(e,ee,t),s(e,Ye,t),o(te,e,t),s(e,Le,t),s(e,le,t),s(e,Se,t),s(e,se,t),s(e,ze,t),o($,e,t),s(e,qe,t),o(ne,e,t),s(e,Pe,t),s(e,ae,t),s(e,De,t),o(ie,e,t),s(e,Ke,t),o(pe,e,t),s(e,Oe,t),s(e,re,t),s(e,et,t),s(e,me,t),s(e,tt,t),o(fe,e,t),s(e,lt,t),s(e,Me,t),st=!0},p(e,[t]){const xt={};t&2&&(xt.$$scope={dirty:t,ctx:e}),J.$set(xt);const Ct={};t&2&&(Ct.$$scope={dirty:t,ctx:e}),T.$set(Ct);const Xt={};t&2&&(Xt.$$scope={dirty:t,ctx:e}),$.$set(Xt)},i(e){st||(u(U.$$.fragment,e),u(x.$$.fragment,e),u(X.$$.fragment,e),u(J.$$.fragment,e),u(R.$$.fragment,e),u(I.$$.fragment,e),u(V.$$.fragment,e),u(T.$$.fragment,e),u(E.$$.fragment,e),u(F.$$.fragment,e),u(A.$$.fragment,e),u(S.$$.fragment,e),u(q.$$.fragment,e),u(D.$$.fragment,e),u(O.$$.fragment,e),u(te.$$.fragment,e),u($.$$.fragment,e),u(ne.$$.fragment,e),u(ie.$$.fragment,e),u(pe.$$.fragment,e),u(fe.$$.fragment,e),st=!0)},o(e){d(U.$$.fragment,e),d(x.$$.fragment,e),d(X.$$.fragment,e),d(J.$$.fragment,e),d(R.$$.fragment,e),d(I.$$.fragment,e),d(V.$$.fragment,e),d(T.$$.fragment,e),d(E.$$.fragment,e),d(F.$$.fragment,e),d(A.$$.fragment,e),d(S.$$.fragment,e),d(q.$$.fragment,e),d(D.$$.fragment,e),d(O.$$.fragment,e),d(te.$$.fragment,e),d($.$$.fragment,e),d(ne.$$.fragment,e),d(ie.$$.fragment,e),d(pe.$$.fragment,e),d(fe.$$.fragment,e),st=!1},d(e){e&&(l(h),l(f),l(w),l(oe),l(j),l(ue),l(g),l(de),l(Z),l(_e),l(W),l(he),l(ye),l(C),l(we),l(be),l(Je),l(v),l(Te),l($e),l(G),l(Ue),l(je),l(H),l(ge),l(Ze),l(B),l(We),l(xe),l(Ce),l(k),l(Xe),l(N),l(ve),l(Re),l(Q),l(Ge),l(Ie),l(Y),l(He),l(L),l(Ve),l(Be),l(z),l(Ee),l(ke),l(P),l(Ne),l(Fe),l(K),l(Qe),l(Ae),l(ee),l(Ye),l(Le),l(le),l(Se),l(se),l(ze),l(qe),l(Pe),l(ae),l(De),l(Ke),l(Oe),l(re),l(et),l(me),l(tt),l(lt),l(Me)),l(i),_(U,e),_(x,e),_(X,e),_(J,e),_(R,e),_(I,e),_(V,e),_(T,e),_(E,e),_(F,e),_(A,e),_(S,e),_(q,e),_(D,e),_(O,e),_(te,e),_($,e),_(ne,e),_(ie,e),_(pe,e),_(fe,e)}}}const Yt='{"title":"Wuerstchen","local":"wuerstchen","sections":[{"title":"脚本参数","local":"脚本参数","sections":[],"depth":2},{"title":"训练脚本","local":"训练脚本","sections":[],"depth":2},{"title":"启动脚本","local":"启动脚本","sections":[],"depth":2},{"title":"下一步","local":"下一步","sections":[],"depth":2}],"depth":1}';function Lt(b){return It(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kt extends Ht{constructor(i){super(),Vt(this,i,Lt,At,Gt,{})}}export{Kt as component};
