import{s as il,o as al,n as ht}from"../chunks/scheduler.5c93273d.js";import{S as pl,i as Ml,g as a,s as n,r as c,A as ml,h as p,f as l,c as i,j as sl,u as r,x as M,k as nl,y as cl,a as s,v as u,d,t as f,w as o}from"../chunks/index.e43dd92b.js";import{T as Ut}from"../chunks/Tip.1cbfe904.js";import{C as T}from"../chunks/CodeBlock.6896320e.js";import{H as Ue,E as rl}from"../chunks/getInferenceSnippets.bd93e167.js";function ul(g){let m,w='🤗 Accelerate 是一个库，用于帮助您在多个 GPU/TPU 上或使用混合精度进行训练。它将根据您的硬件和环境自动配置训练设置。查看 🤗 Accelerate <a href="https://huggingface.co/docs/accelerate/quicktour" rel="nofollow">快速导览</a> 以了解更多信息。';return{c(){m=a("p"),m.innerHTML=w},l(J){m=p(J,"P",{"data-svelte-h":!0}),M(m)!=="svelte-1i6u53p"&&(m.innerHTML=w)},m(J,b){s(J,m,b)},p:ht,d(J){J&&l(m)}}}function dl(g){let m,w='以下部分重点介绍了训练脚本中对于理解如何修改它很重要的部分，但并未详细涵盖脚本的每个方面。如果您有兴趣了解更多，请随时阅读 <a href="https://github.com/huggingface/diffusers/blob/main/examples/instruct_pix2pix/train_instruct_pix2pix.py" rel="nofollow">脚本</a>，并告诉我们如果您有任何问题或疑虑。';return{c(){m=a("p"),m.innerHTML=w},l(J){m=p(J,"P",{"data-svelte-h":!0}),M(m)!=="svelte-1daymkg"&&(m.innerHTML=w)},m(J,b){s(J,m,b)},p:ht,d(J){J&&l(m)}}}function fl(g){let m,w="为了获得更好的结果，尝试使用更大的数据集进行更长时间的训练。我们只在较小规模的数据集上测试过此训练脚本。",J,b,_,j,U="要使用 Weights and Biases 监控训练进度，请将 <code>--report_to=wandb</code> 参数添加到训练命令中，并使用 <code>--val_image_url</code> 指定验证图像，使用 <code>--validation_prompt</code> 指定验证提示。这对于调试模型非常有用。";return{c(){m=a("p"),m.textContent=w,J=n(),b=a("br"),_=n(),j=a("p"),j.innerHTML=U},l(y){m=p(y,"P",{"data-svelte-h":!0}),M(m)!=="svelte-19820at"&&(m.textContent=w),J=i(y),b=p(y,"BR",{}),_=i(y),j=p(y,"P",{"data-svelte-h":!0}),M(j)!=="svelte-1a4mrgj"&&(j.innerHTML=U)},m(y,h){s(y,m,h),s(y,J,h),s(y,b,h),s(y,_,h),s(y,j,h)},p:ht,d(y){y&&(l(m),l(J),l(b),l(_),l(j))}}}function ol(g){let m,w,J,b,_,j,U,y='<a href="https://hf.co/papers/2211.09800" rel="nofollow">InstructPix2Pix</a> 是一个基于 Stable Diffusion 训练的模型，用于根据人类提供的指令编辑图像。例如，您的提示可以是“将云变成雨天”，模型将相应编辑输入图像。该模型以文本提示（或编辑指令）和输入图像为条件。',h,$,gt='本指南将探索 <a href="https://github.com/huggingface/diffusers/blob/main/examples/instruct_pix2pix/train_instruct_pix2pix.py" rel="nofollow">train_instruct_pix2pix.py</a> 训练脚本，帮助您熟悉它，以及如何将其适应您自己的用例。',ge,C,xt="在运行脚本之前，请确保从源代码安装库：",xe,X,Ze,I,Zt="然后导航到包含训练脚本的示例文件夹，并安装脚本所需的依赖项：",We,v,$e,x,Ce,B,Wt="初始化一个 🤗 Accelerate 环境：",Xe,G,Ie,R,$t="要设置一个默认的 🤗 Accelerate 环境，无需选择任何配置：",ve,V,Be,N,Ct="或者，如果您的环境不支持交互式 shell，例如笔记本，您可以使用：",Ge,F,Re,k,Xt='最后，如果您想在自己的数据集上训练模型，请查看 <a href="create_dataset">创建用于训练的数据集</a> 指南，了解如何创建与训练脚本兼容的数据集。',Ve,Z,Ne,Y,Fe,H,It=`训练脚本有许多参数可帮助您自定义训练运行。所有
参数及其描述可在 <a href="https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L65" rel="nofollow"><code>parse_args()</code></a> 函数中找到。大多数参数都提供了默认值，这些值效果相当不错，但如果您愿意，也可以在训练命令中设置自己的值。`,ke,A,vt="例如，要增加输入图像的分辨率：",Ye,L,He,Q,Bt='许多基本和重要的参数在 <a href="text2image#script-parameters">文本到图像</a> 训练指南中已有描述，因此本指南仅关注与 InstructPix2Pix 相关的参数：',Ae,S,Gt="<li><code>--original_image_column</code>：编辑前的原始图像</li> <li><code>--edited_image_column</code>：编辑后的图像</li> <li><code>--edit_prompt_column</code>：编辑图像的指令</li> <li><code>--conditioning_dropout_prob</code>：训练期间编辑图像和编辑提示的 dropout 概率，这为一种或两种条件输入启用了无分类器引导（CFG）</li>",Le,E,Qe,z,Rt='数据集预处理代码和训练循环可在 <a href="https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L374" rel="nofollow"><code>main()</code></a> 函数中找到。这是您将修改训练脚本以适应自己用例的地方。',Se,P,Vt='与脚本参数类似，<a href="text2image#training-script">文本到图像</a> 训练指南提供了训练脚本的逐步说明。相反，本指南将查看脚本中与 InstructPix2Pix 相关的部分。',Ee,D,Nt='脚本首先修改 UNet 的第一个卷积层中的 <a href="https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L445" rel="nofollow">输入通道数</a>，以适应 InstructPix2Pix 的额外条件图像：',ze,q,Pe,K,Ft='这些 UNet 参数由优化器 <a href="https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L545C1-L551C6" rel="nofollow">更新</a>：',De,O,qe,ee,kt='接下来，编辑后的图像和编辑指令被 <a href="https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L624" rel="nofollow">预处理</a>并被<a href="https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L610C24-L610C24" rel="nofollow">tokenized</a>。重要的是，对原始图像和编辑后的图像应用相同的图像变换。',Ke,te,Oe,le,Yt='最后，在<a href="https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L730" rel="nofollow">训练循环</a>中，它首先将编辑后的图像编码到潜在空间：',et,se,tt,ne,Ht="然后，脚本对原始图像和编辑指令嵌入应用 dropout 以支持 CFG（Classifier-Free Guidance）。这使得模型能够调节编辑指令和原始图像对编辑后图像的影响。",lt,ie,st,ae,At='差不多就是这样了！除了这里描述的不同之处，脚本的其余部分与<a href="text2image#training-script">文本到图像</a>训练脚本非常相似，所以请随意查看以获取更多细节。如果您想了解更多关于训练循环如何工作的信息，请查看<a href="../using-diffusers/write_own_pipeline">理解管道、模型和调度器</a>教程，该教程分解了去噪过程的基本模式。',nt,pe,it,Me,Lt=`一旦您对脚本的更改感到满意，或者如果您对默认配置没问题，您
准备好启动训练脚本！🚀`,at,me,Qt='本指南使用 <a href="https://huggingface.co/datasets/fusing/instructpix2pix-1000-samples" rel="nofollow">fusing/instructpix2pix-1000-samples</a> 数据集，这是 <a href="https://huggingface.co/datasets/timbrooks/instructpix2pix-clip-filtered" rel="nofollow">原始数据集</a> 的一个较小版本。您也可以创建并使用自己的数据集（请参阅 <a href="create_dataset">创建用于训练的数据集</a> 指南）。',pt,ce,St="将 <code>MODEL_NAME</code> 环境变量设置为模型名称（可以是 Hub 上的模型 ID 或本地模型的路径），并将 <code>DATASET_ID</code> 设置为 Hub 上数据集的名称。脚本会创建并保存所有组件（特征提取器、调度器、文本编码器、UNet 等）到您的仓库中的一个子文件夹。",Mt,W,mt,re,Et="如果您在多个 GPU 上训练，请将 <code>--multi_gpu</code> 参数添加到 <code>accelerate launch</code> 命令中。",ct,ue,rt,de,zt="训练完成后，您可以使用您的新 InstructPix2Pix 进行推理：",ut,fe,dt,oe,Pt=`您应该尝试不同的 <code>num_inference_steps</code>、<code>image_guidance_scale</code> 和 <code>guidance_scale</code> 值，以查看它们如何影响推理速度和质量。指导比例参数
这些参数尤其重要，因为它们控制原始图像和编辑指令对编辑后图像的影响程度。`,ft,Je,ot,ye,Dt='Stable Diffusion XL (SDXL) 是一个强大的文本到图像模型，能够生成高分辨率图像，并在其架构中添加了第二个文本编码器。使用 <a href="https://github.com/huggingface/diffusers/blob/main/examples/instruct_pix2pix/train_instruct_pix2pix_sdxl.py" rel="nofollow"><code>train_instruct_pix2pix_sdxl.py</code></a> 脚本来训练 SDXL 模型以遵循图像编辑指令。',Jt,we,qt='SDXL 训练脚本在 <a href="sdxl">SDXL 训练</a> 指南中有更详细的讨论。',yt,be,wt,Te,Kt="恭喜您训练了自己的 InstructPix2Pix 模型！🥳 要了解更多关于该模型的信息，可能有助于：",bt,_e,Ot='<li>阅读 <a href="https://huggingface.co/blog/instruction-tuning-sd" rel="nofollow">Instruction-tuning Stable Diffusion with InstructPix2Pix</a> 博客文章，了解更多我们使用 InstructPix2Pix 进行的一些实验、数据集准备以及不同指令的结果。</li>',Tt,je,_t,he,jt;return _=new Ue({props:{title:"InstructPix2Pix",local:"instructpix2pix",headingTag:"h1"}}),X=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:"Y2QlMjBleGFtcGxlcyUyRmluc3RydWN0X3BpeDJwaXglMEFwaXAlMjBpbnN0YWxsJTIwLXIlMjByZXF1aXJlbWVudHMudHh0",highlighted:`<span class="hljs-built_in">cd</span> examples/instruct_pix2pix
pip install -r requirements.txt`,wrap:!1}}),x=new Ut({props:{$$slots:{default:[ul]},$$scope:{ctx:g}}}),G=new T({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config",wrap:!1}}),V=new T({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZyUyMGRlZmF1bHQ=",highlighted:"accelerate config default",wrap:!1}}),F=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}}),Z=new Ut({props:{$$slots:{default:[dl]},$$scope:{ctx:g}}}),Y=new Ue({props:{title:"脚本参数",local:"脚本参数",headingTag:"h2"}}),L=new T({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluX2luc3RydWN0X3BpeDJwaXgucHklMjAlNUMlMEElMjAlMjAtLXJlc29sdXRpb24lM0Q1MTIlMjAlNUM=",highlighted:`accelerate launch train_instruct_pix2pix.py \\
  --resolution=512 \\`,wrap:!1}}),E=new Ue({props:{title:"训练脚本",local:"训练脚本",headingTag:"h2"}}),q=new T({props:{code:"aW5fY2hhbm5lbHMlMjAlM0QlMjA4JTBBb3V0X2NoYW5uZWxzJTIwJTNEJTIwdW5ldC5jb252X2luLm91dF9jaGFubmVscyUwQXVuZXQucmVnaXN0ZXJfdG9fY29uZmlnKGluX2NoYW5uZWxzJTNEaW5fY2hhbm5lbHMpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG5ld19jb252X2luJTIwJTNEJTIwbm4uQ29udjJkKCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGluX2NoYW5uZWxzJTJDJTIwb3V0X2NoYW5uZWxzJTJDJTIwdW5ldC5jb252X2luLmtlcm5lbF9zaXplJTJDJTIwdW5ldC5jb252X2luLnN0cmlkZSUyQyUyMHVuZXQuY29udl9pbi5wYWRkaW5nJTBBJTIwJTIwJTIwJTIwKSUwQSUyMCUyMCUyMCUyMG5ld19jb252X2luLndlaWdodC56ZXJvXygpJTBBJTIwJTIwJTIwJTIwbmV3X2NvbnZfaW4ud2VpZ2h0JTVCJTNBJTJDJTIwJTNBNCUyQyUyMCUzQSUyQyUyMCUzQSU1RC5jb3B5Xyh1bmV0LmNvbnZfaW4ud2VpZ2h0KSUwQSUyMCUyMCUyMCUyMHVuZXQuY29udl9pbiUyMCUzRCUyMG5ld19jb252X2lu",highlighted:`in_channels = <span class="hljs-number">8</span>
out_channels = unet.conv_in.out_channels
unet.register_to_config(in_channels=in_channels)

<span class="hljs-keyword">with</span> torch.no_grad():
    new_conv_in = nn.Conv2d(
        in_channels, out_channels, unet.conv_in.kernel_size, unet.conv_in.stride, unet.conv_in.padding
    )
    new_conv_in.weight.zero_()
    new_conv_in.weight[:, :<span class="hljs-number">4</span>, :, :].copy_(unet.conv_in.weight)
    unet.conv_in = new_conv_in`,wrap:!1}}),O=new T({props:{code:"b3B0aW1pemVyJTIwJTNEJTIwb3B0aW1pemVyX2NscyglMEElMjAlMjAlMjAlMjB1bmV0LnBhcmFtZXRlcnMoKSUyQyUwQSUyMCUyMCUyMCUyMGxyJTNEYXJncy5sZWFybmluZ19yYXRlJTJDJTBBJTIwJTIwJTIwJTIwYmV0YXMlM0QoYXJncy5hZGFtX2JldGExJTJDJTIwYXJncy5hZGFtX2JldGEyKSUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9kZWNheSUzRGFyZ3MuYWRhbV93ZWlnaHRfZGVjYXklMkMlMEElMjAlMjAlMjAlMjBlcHMlM0RhcmdzLmFkYW1fZXBzaWxvbiUyQyUwQSk=",highlighted:`optimizer = optimizer_cls(
    unet.parameters(),
    lr=args.learning_rate,
    betas=(args.adam_beta1, args.adam_beta2),
    weight_decay=args.adam_weight_decay,
    eps=args.adam_epsilon,
)`,wrap:!1}}),te=new T({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc190cmFpbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBwcmVwcm9jZXNzZWRfaW1hZ2VzJTIwJTNEJTIwcHJlcHJvY2Vzc19pbWFnZXMoZXhhbXBsZXMpJTBBJTBBJTIwJTIwJTIwJTIwb3JpZ2luYWxfaW1hZ2VzJTJDJTIwZWRpdGVkX2ltYWdlcyUyMCUzRCUyMHByZXByb2Nlc3NlZF9pbWFnZXMuY2h1bmsoMiklMEElMjAlMjAlMjAlMjBvcmlnaW5hbF9pbWFnZXMlMjAlM0QlMjBvcmlnaW5hbF9pbWFnZXMucmVzaGFwZSgtMSUyQyUyMDMlMkMlMjBhcmdzLnJlc29sdXRpb24lMkMlMjBhcmdzLnJlc29sdXRpb24pJTBBJTIwJTIwJTIwJTIwZWRpdGVkX2ltYWdlcyUyMCUzRCUyMGVkaXRlZF9pbWFnZXMucmVzaGFwZSgtMSUyQyUyMDMlMkMlMjBhcmdzLnJlc29sdXRpb24lMkMlMjBhcmdzLnJlc29sdXRpb24pJTBBJTBBJTIwJTIwJTIwJTIwZXhhbXBsZXMlNUIlMjJvcmlnaW5hbF9waXhlbF92YWx1ZXMlMjIlNUQlMjAlM0QlMjBvcmlnaW5hbF9pbWFnZXMlMEElMjAlMjAlMjAlMjBleGFtcGxlcyU1QiUyMmVkaXRlZF9waXhlbF92YWx1ZXMlMjIlNUQlMjAlM0QlMjBlZGl0ZWRfaW1hZ2VzJTBBJTBBJTIwJTIwJTIwJTIwY2FwdGlvbnMlMjAlM0QlMjBsaXN0KGV4YW1wbGVzJTVCZWRpdF9wcm9tcHRfY29sdW1uJTVEKSUwQSUyMCUyMCUyMCUyMGV4YW1wbGVzJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTIwJTNEJTIwdG9rZW5pemVfY2FwdGlvbnMoY2FwdGlvbnMpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwZXhhbXBsZXM=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_train</span>(<span class="hljs-params">examples</span>):
    preprocessed_images = preprocess_images(examples)

    original_images, edited_images = preprocessed_images.chunk(<span class="hljs-number">2</span>)
    original_images = original_images.reshape(-<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, args.resolution, args.resolution)
    edited_images = edited_images.reshape(-<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, args.resolution, args.resolution)

    examples[<span class="hljs-string">&quot;original_pixel_values&quot;</span>] = original_images
    examples[<span class="hljs-string">&quot;edited_pixel_values&quot;</span>] = edited_images

    captions = <span class="hljs-built_in">list</span>(examples[edit_prompt_column])
    examples[<span class="hljs-string">&quot;input_ids&quot;</span>] = tokenize_captions(captions)
    <span class="hljs-keyword">return</span> examples`,wrap:!1}}),se=new T({props:{code:"bGF0ZW50cyUyMCUzRCUyMHZhZS5lbmNvZGUoYmF0Y2glNUIlMjJlZGl0ZWRfcGl4ZWxfdmFsdWVzJTIyJTVELnRvKHdlaWdodF9kdHlwZSkpLmxhdGVudF9kaXN0LnNhbXBsZSgpJTBBbGF0ZW50cyUyMCUzRCUyMGxhdGVudHMlMjAqJTIwdmFlLmNvbmZpZy5zY2FsaW5nX2ZhY3Rvcg==",highlighted:`latents = vae.encode(batch[<span class="hljs-string">&quot;edited_pixel_values&quot;</span>].to(weight_dtype)).latent_dist.sample()
latents = latents * vae.config.scaling_factor`,wrap:!1}}),ie=new T({props:{code:"ZW5jb2Rlcl9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwdGV4dF9lbmNvZGVyKGJhdGNoJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSU1QjAlNUQlMEFvcmlnaW5hbF9pbWFnZV9lbWJlZHMlMjAlM0QlMjB2YWUuZW5jb2RlKGJhdGNoJTVCJTIyb3JpZ2luYWxfcGl4ZWxfdmFsdWVzJTIyJTVELnRvKHdlaWdodF9kdHlwZSkpLmxhdGVudF9kaXN0Lm1vZGUoKSUwQSUwQWlmJTIwYXJncy5jb25kaXRpb25pbmdfZHJvcG91dF9wcm9iJTIwaXMlMjBub3QlMjBOb25lJTNBJTBBJTIwJTIwJTIwJTIwcmFuZG9tX3AlMjAlM0QlMjB0b3JjaC5yYW5kKGJzeiUyQyUyMGRldmljZSUzRGxhdGVudHMuZGV2aWNlJTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yKSUwQSUyMCUyMCUyMCUyMHByb21wdF9tYXNrJTIwJTNEJTIwcmFuZG9tX3AlMjAlM0MlMjAyJTIwKiUyMGFyZ3MuY29uZGl0aW9uaW5nX2Ryb3BvdXRfcHJvYiUwQSUyMCUyMCUyMCUyMHByb21wdF9tYXNrJTIwJTNEJTIwcHJvbXB0X21hc2sucmVzaGFwZShic3olMkMlMjAxJTJDJTIwMSklMEElMjAlMjAlMjAlMjBudWxsX2NvbmRpdGlvbmluZyUyMCUzRCUyMHRleHRfZW5jb2Rlcih0b2tlbml6ZV9jYXB0aW9ucyglNUIlMjIlMjIlNUQpLnRvKGFjY2VsZXJhdG9yLmRldmljZSkpJTVCMCU1RCUwQSUyMCUyMCUyMCUyMGVuY29kZXJfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMHRvcmNoLndoZXJlKHByb21wdF9tYXNrJTJDJTIwbnVsbF9jb25kaXRpb25pbmclMkMlMjBlbmNvZGVyX2hpZGRlbl9zdGF0ZXMpJTBBJTBBJTIwJTIwJTIwJTIwaW1hZ2VfbWFza19kdHlwZSUyMCUzRCUyMG9yaWdpbmFsX2ltYWdlX2VtYmVkcy5kdHlwZSUwQSUyMCUyMCUyMCUyMGltYWdlX21hc2slMjAlM0QlMjAxJTIwLSUyMCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAocmFuZG9tX3AlMjAlM0UlM0QlMjBhcmdzLmNvbmRpdGlvbmluZ19kcm9wb3V0X3Byb2IpLnRvKGltYWdlX21hc2tfZHR5cGUpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKiUyMChyYW5kb21fcCUyMCUzQyUyMDMlMjAqJTIwYXJncy5jb25kaXRpb25pbmdfZHJvcG91dF9wcm9iKS50byhpbWFnZV9tYXNrX2R0eXBlKSUwQSUyMCUyMCUyMCUyMCklMEElMjAlMjAlMjAlMjBpbWFnZV9tYXNrJTIwJTNEJTIwaW1hZ2VfbWFzay5yZXNoYXBlKGJzeiUyQyUyMDElMkMlMjAxJTJDJTIwMSklMEElMjAlMjAlMjAlMjBvcmlnaW5hbF9pbWFnZV9lbWJlZHMlMjAlM0QlMjBpbWFnZV9tYXNrJTIwKiUyMG9yaWdpbmFsX2ltYWdlX2VtYmVkcw==",highlighted:`encoder_hidden_states = text_encoder(batch[<span class="hljs-string">&quot;input_ids&quot;</span>])[<span class="hljs-number">0</span>]
original_image_embeds = vae.encode(batch[<span class="hljs-string">&quot;original_pixel_values&quot;</span>].to(weight_dtype)).latent_dist.mode()

<span class="hljs-keyword">if</span> args.conditioning_dropout_prob <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
    random_p = torch.rand(bsz, device=latents.device, generator=generator)
    prompt_mask = random_p &lt; <span class="hljs-number">2</span> * args.conditioning_dropout_prob
    prompt_mask = prompt_mask.reshape(bsz, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>)
    null_conditioning = text_encoder(tokenize_captions([<span class="hljs-string">&quot;&quot;</span>]).to(accelerator.device))[<span class="hljs-number">0</span>]
    encoder_hidden_states = torch.where(prompt_mask, null_conditioning, encoder_hidden_states)

    image_mask_dtype = original_image_embeds.dtype
    image_mask = <span class="hljs-number">1</span> - (
        (random_p &gt;= args.conditioning_dropout_prob).to(image_mask_dtype)
        * (random_p &lt; <span class="hljs-number">3</span> * args.conditioning_dropout_prob).to(image_mask_dtype)
    )
    image_mask = image_mask.reshape(bsz, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>)
    original_image_embeds = image_mask * original_image_embeds`,wrap:!1}}),pe=new Ue({props:{title:"启动脚本",local:"启动脚本",headingTag:"h2"}}),W=new Ut({props:{$$slots:{default:[fl]},$$scope:{ctx:g}}}),ue=new T({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMC0tbWl4ZWRfcHJlY2lzaW9uJTNEJTIyZnAxNiUyMiUyMHRyYWluX2luc3RydWN0X3BpeDJwaXgucHklMjAlNUMlMEElMjAlMjAlMjAlMjAtLXByZXRyYWluZWRfbW9kZWxfbmFtZV9vcl9wYXRoJTNEJTI0TU9ERUxfTkFNRSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZGF0YXNldF9uYW1lJTNEJTI0REFUQVNFVF9JRCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1yZXNvbHV0aW9uJTNEMjU2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1yYW5kb21fZmxpcCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDQlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWdyYWRpZW50X2NoZWNrcG9pbnRpbmclMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1heF90cmFpbl9zdGVwcyUzRDE1MDAwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1jaGVja3BvaW50aW5nX3N0ZXBzJTNENTAwMCUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tY2hlY2twb2ludHNfdG90YWxfbGltaXQlM0QxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1sZWFybmluZ19yYXRlJTNENWUtMDUlMjAlNUMlMEElMjAlMjAlMjAlMjAtLW1heF9ncmFkX25vcm0lM0QxJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1scl93YXJtdXBfc3RlcHMlM0QwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1jb25kaXRpb25pbmdfZHJvcG91dF9wcm9iJTNEMC4wNSUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbWl4ZWRfcHJlY2lzaW9uJTNEZnAxNiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tc2VlZCUzRDQyJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wdXNoX3RvX2h1Yg==",highlighted:`accelerate launch --mixed_precision=<span class="hljs-string">&quot;fp16&quot;</span> train_instruct_pix2pix.py \\
    --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span> \\
    --dataset_name=<span class="hljs-variable">$DATASET_ID</span> \\
    --enable_xformers_memory_efficient_attention \\
    --resolution=256 \\
    --random_flip \\
    --train_batch_size=4 \\
    --gradient_accumulation_steps=4 \\
    --gradient_checkpointing \\
    --max_train_steps=15000 \\
    --checkpointing_steps=5000 \\
    --checkpoints_total_limit=1 \\
    --learning_rate=5e-05 \\
    --max_grad_norm=1 \\
    --lr_warmup_steps=0 \\
    --conditioning_dropout_prob=0.05 \\
    --mixed_precision=fp16 \\
    --seed=42 \\
    --push_to_hub`,wrap:!1}}),fe=new T({props:{code:"aW1wb3J0JTIwUElMJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBTdGFibGVEaWZmdXNpb25JbnN0cnVjdFBpeDJQaXhQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25JbnN0cnVjdFBpeDJQaXhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyeW91cl9jb29sX21vZGVsJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvciglMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgwKSUwQSUwQWltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZzYXlha3BhdWwlMkZzYW1wbGUtZGF0YXNldHMlMkZyZXNvbHZlJTJGbWFpbiUyRnRlc3RfcGl4MnBpeF80LnBuZyUyMiklMEFwcm9tcHQlMjAlM0QlMjAlMjJhZGQlMjBzb21lJTIwZHVja3MlMjB0byUyMHRoZSUyMGxha2UlMjIlMEFudW1faW5mZXJlbmNlX3N0ZXBzJTIwJTNEJTIwMjAlMEFpbWFnZV9ndWlkYW5jZV9zY2FsZSUyMCUzRCUyMDEuNSUwQWd1aWRhbmNlX3NjYWxlJTIwJTNEJTIwMTAlMEElMEFlZGl0ZWRfaW1hZ2UlMjAlM0QlMjBwaXBlbGluZSglMEElMjAlMjAlMjBwcm9tcHQlMkMlMEElMjAlMjAlMjBpbWFnZSUzRGltYWdlJTJDJTBBJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRG51bV9pbmZlcmVuY2Vfc3RlcHMlMkMlMEElMjAlMjAlMjBpbWFnZV9ndWlkYW5jZV9zY2FsZSUzRGltYWdlX2d1aWRhbmNlX3NjYWxlJTJDJTBBJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0RndWlkYW5jZV9zY2FsZSUyQyUwQSUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWVkaXRlZF9pbWFnZS5zYXZlKCUyMmVkaXRlZF9pbWFnZS5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> PIL
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionInstructPix2PixPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

pipeline = StableDiffusionInstructPix2PixPipeline.from_pretrained(<span class="hljs-string">&quot;your_cool_model&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)

image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/test_pix2pix_4.png&quot;</span>)
prompt = <span class="hljs-string">&quot;add some ducks to the lake&quot;</span>
num_inference_steps = <span class="hljs-number">20</span>
image_guidance_scale = <span class="hljs-number">1.5</span>
guidance_scale = <span class="hljs-number">10</span>

edited_image = pipeline(
   prompt,
   image=image,
   num_inference_steps=num_inference_steps,
   image_guidance_scale=image_guidance_scale,
   guidance_scale=guidance_scale,
   generator=generator,
).images[<span class="hljs-number">0</span>]
edited_image.save(<span class="hljs-string">&quot;edited_image.png&quot;</span>)`,wrap:!1}}),Je=new Ue({props:{title:"Stable Diffusion XL",local:"stable-diffusion-xl",headingTag:"h2"}}),be=new Ue({props:{title:"后续步骤",local:"后续步骤",headingTag:"h2"}}),je=new rl({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/zh/training/instructpix2pix.md"}}),{c(){m=a("meta"),w=n(),J=a("p"),b=n(),c(_.$$.fragment),j=n(),U=a("p"),U.innerHTML=y,h=n(),$=a("p"),$.innerHTML=gt,ge=n(),C=a("p"),C.textContent=xt,xe=n(),c(X.$$.fragment),Ze=n(),I=a("p"),I.textContent=Zt,We=n(),c(v.$$.fragment),$e=n(),c(x.$$.fragment),Ce=n(),B=a("p"),B.textContent=Wt,Xe=n(),c(G.$$.fragment),Ie=n(),R=a("p"),R.textContent=$t,ve=n(),c(V.$$.fragment),Be=n(),N=a("p"),N.textContent=Ct,Ge=n(),c(F.$$.fragment),Re=n(),k=a("p"),k.innerHTML=Xt,Ve=n(),c(Z.$$.fragment),Ne=n(),c(Y.$$.fragment),Fe=n(),H=a("p"),H.innerHTML=It,ke=n(),A=a("p"),A.textContent=vt,Ye=n(),c(L.$$.fragment),He=n(),Q=a("p"),Q.innerHTML=Bt,Ae=n(),S=a("ul"),S.innerHTML=Gt,Le=n(),c(E.$$.fragment),Qe=n(),z=a("p"),z.innerHTML=Rt,Se=n(),P=a("p"),P.innerHTML=Vt,Ee=n(),D=a("p"),D.innerHTML=Nt,ze=n(),c(q.$$.fragment),Pe=n(),K=a("p"),K.innerHTML=Ft,De=n(),c(O.$$.fragment),qe=n(),ee=a("p"),ee.innerHTML=kt,Ke=n(),c(te.$$.fragment),Oe=n(),le=a("p"),le.innerHTML=Yt,et=n(),c(se.$$.fragment),tt=n(),ne=a("p"),ne.textContent=Ht,lt=n(),c(ie.$$.fragment),st=n(),ae=a("p"),ae.innerHTML=At,nt=n(),c(pe.$$.fragment),it=n(),Me=a("p"),Me.textContent=Lt,at=n(),me=a("p"),me.innerHTML=Qt,pt=n(),ce=a("p"),ce.innerHTML=St,Mt=n(),c(W.$$.fragment),mt=n(),re=a("p"),re.innerHTML=Et,ct=n(),c(ue.$$.fragment),rt=n(),de=a("p"),de.textContent=zt,ut=n(),c(fe.$$.fragment),dt=n(),oe=a("p"),oe.innerHTML=Pt,ft=n(),c(Je.$$.fragment),ot=n(),ye=a("p"),ye.innerHTML=Dt,Jt=n(),we=a("p"),we.innerHTML=qt,yt=n(),c(be.$$.fragment),wt=n(),Te=a("p"),Te.textContent=Kt,bt=n(),_e=a("ul"),_e.innerHTML=Ot,Tt=n(),c(je.$$.fragment),_t=n(),he=a("p"),this.h()},l(e){const t=ml("svelte-u9bgzb",document.head);m=p(t,"META",{name:!0,content:!0}),t.forEach(l),w=i(e),J=p(e,"P",{}),sl(J).forEach(l),b=i(e),r(_.$$.fragment,e),j=i(e),U=p(e,"P",{"data-svelte-h":!0}),M(U)!=="svelte-kvtlxy"&&(U.innerHTML=y),h=i(e),$=p(e,"P",{"data-svelte-h":!0}),M($)!=="svelte-18hslr6"&&($.innerHTML=gt),ge=i(e),C=p(e,"P",{"data-svelte-h":!0}),M(C)!=="svelte-sgtnc7"&&(C.textContent=xt),xe=i(e),r(X.$$.fragment,e),Ze=i(e),I=p(e,"P",{"data-svelte-h":!0}),M(I)!=="svelte-9jjxff"&&(I.textContent=Zt),We=i(e),r(v.$$.fragment,e),$e=i(e),r(x.$$.fragment,e),Ce=i(e),B=p(e,"P",{"data-svelte-h":!0}),M(B)!=="svelte-1cwu974"&&(B.textContent=Wt),Xe=i(e),r(G.$$.fragment,e),Ie=i(e),R=p(e,"P",{"data-svelte-h":!0}),M(R)!=="svelte-1ya6j5e"&&(R.textContent=$t),ve=i(e),r(V.$$.fragment,e),Be=i(e),N=p(e,"P",{"data-svelte-h":!0}),M(N)!=="svelte-1dtw1zl"&&(N.textContent=Ct),Ge=i(e),r(F.$$.fragment,e),Re=i(e),k=p(e,"P",{"data-svelte-h":!0}),M(k)!=="svelte-1jgrevq"&&(k.innerHTML=Xt),Ve=i(e),r(Z.$$.fragment,e),Ne=i(e),r(Y.$$.fragment,e),Fe=i(e),H=p(e,"P",{"data-svelte-h":!0}),M(H)!=="svelte-mzrevq"&&(H.innerHTML=It),ke=i(e),A=p(e,"P",{"data-svelte-h":!0}),M(A)!=="svelte-10gr0ue"&&(A.textContent=vt),Ye=i(e),r(L.$$.fragment,e),He=i(e),Q=p(e,"P",{"data-svelte-h":!0}),M(Q)!=="svelte-zt6q5m"&&(Q.innerHTML=Bt),Ae=i(e),S=p(e,"UL",{"data-svelte-h":!0}),M(S)!=="svelte-5ojhxj"&&(S.innerHTML=Gt),Le=i(e),r(E.$$.fragment,e),Qe=i(e),z=p(e,"P",{"data-svelte-h":!0}),M(z)!=="svelte-rqai5r"&&(z.innerHTML=Rt),Se=i(e),P=p(e,"P",{"data-svelte-h":!0}),M(P)!=="svelte-t5seyc"&&(P.innerHTML=Vt),Ee=i(e),D=p(e,"P",{"data-svelte-h":!0}),M(D)!=="svelte-5y3dd7"&&(D.innerHTML=Nt),ze=i(e),r(q.$$.fragment,e),Pe=i(e),K=p(e,"P",{"data-svelte-h":!0}),M(K)!=="svelte-1rehrmd"&&(K.innerHTML=Ft),De=i(e),r(O.$$.fragment,e),qe=i(e),ee=p(e,"P",{"data-svelte-h":!0}),M(ee)!=="svelte-wevf4r"&&(ee.innerHTML=kt),Ke=i(e),r(te.$$.fragment,e),Oe=i(e),le=p(e,"P",{"data-svelte-h":!0}),M(le)!=="svelte-iunhfx"&&(le.innerHTML=Yt),et=i(e),r(se.$$.fragment,e),tt=i(e),ne=p(e,"P",{"data-svelte-h":!0}),M(ne)!=="svelte-r6qgpq"&&(ne.textContent=Ht),lt=i(e),r(ie.$$.fragment,e),st=i(e),ae=p(e,"P",{"data-svelte-h":!0}),M(ae)!=="svelte-e3h19c"&&(ae.innerHTML=At),nt=i(e),r(pe.$$.fragment,e),it=i(e),Me=p(e,"P",{"data-svelte-h":!0}),M(Me)!=="svelte-1vpkey2"&&(Me.textContent=Lt),at=i(e),me=p(e,"P",{"data-svelte-h":!0}),M(me)!=="svelte-13qy68t"&&(me.innerHTML=Qt),pt=i(e),ce=p(e,"P",{"data-svelte-h":!0}),M(ce)!=="svelte-grlrdg"&&(ce.innerHTML=St),Mt=i(e),r(W.$$.fragment,e),mt=i(e),re=p(e,"P",{"data-svelte-h":!0}),M(re)!=="svelte-648nic"&&(re.innerHTML=Et),ct=i(e),r(ue.$$.fragment,e),rt=i(e),de=p(e,"P",{"data-svelte-h":!0}),M(de)!=="svelte-s53ljm"&&(de.textContent=zt),ut=i(e),r(fe.$$.fragment,e),dt=i(e),oe=p(e,"P",{"data-svelte-h":!0}),M(oe)!=="svelte-1nu20yy"&&(oe.innerHTML=Pt),ft=i(e),r(Je.$$.fragment,e),ot=i(e),ye=p(e,"P",{"data-svelte-h":!0}),M(ye)!=="svelte-zuxfbe"&&(ye.innerHTML=Dt),Jt=i(e),we=p(e,"P",{"data-svelte-h":!0}),M(we)!=="svelte-8i15cc"&&(we.innerHTML=qt),yt=i(e),r(be.$$.fragment,e),wt=i(e),Te=p(e,"P",{"data-svelte-h":!0}),M(Te)!=="svelte-1cad1aa"&&(Te.textContent=Kt),bt=i(e),_e=p(e,"UL",{"data-svelte-h":!0}),M(_e)!=="svelte-qkyfst"&&(_e.innerHTML=Ot),Tt=i(e),r(je.$$.fragment,e),_t=i(e),he=p(e,"P",{}),sl(he).forEach(l),this.h()},h(){nl(m,"name","hf:doc:metadata"),nl(m,"content",Jl)},m(e,t){cl(document.head,m),s(e,w,t),s(e,J,t),s(e,b,t),u(_,e,t),s(e,j,t),s(e,U,t),s(e,h,t),s(e,$,t),s(e,ge,t),s(e,C,t),s(e,xe,t),u(X,e,t),s(e,Ze,t),s(e,I,t),s(e,We,t),u(v,e,t),s(e,$e,t),u(x,e,t),s(e,Ce,t),s(e,B,t),s(e,Xe,t),u(G,e,t),s(e,Ie,t),s(e,R,t),s(e,ve,t),u(V,e,t),s(e,Be,t),s(e,N,t),s(e,Ge,t),u(F,e,t),s(e,Re,t),s(e,k,t),s(e,Ve,t),u(Z,e,t),s(e,Ne,t),u(Y,e,t),s(e,Fe,t),s(e,H,t),s(e,ke,t),s(e,A,t),s(e,Ye,t),u(L,e,t),s(e,He,t),s(e,Q,t),s(e,Ae,t),s(e,S,t),s(e,Le,t),u(E,e,t),s(e,Qe,t),s(e,z,t),s(e,Se,t),s(e,P,t),s(e,Ee,t),s(e,D,t),s(e,ze,t),u(q,e,t),s(e,Pe,t),s(e,K,t),s(e,De,t),u(O,e,t),s(e,qe,t),s(e,ee,t),s(e,Ke,t),u(te,e,t),s(e,Oe,t),s(e,le,t),s(e,et,t),u(se,e,t),s(e,tt,t),s(e,ne,t),s(e,lt,t),u(ie,e,t),s(e,st,t),s(e,ae,t),s(e,nt,t),u(pe,e,t),s(e,it,t),s(e,Me,t),s(e,at,t),s(e,me,t),s(e,pt,t),s(e,ce,t),s(e,Mt,t),u(W,e,t),s(e,mt,t),s(e,re,t),s(e,ct,t),u(ue,e,t),s(e,rt,t),s(e,de,t),s(e,ut,t),u(fe,e,t),s(e,dt,t),s(e,oe,t),s(e,ft,t),u(Je,e,t),s(e,ot,t),s(e,ye,t),s(e,Jt,t),s(e,we,t),s(e,yt,t),u(be,e,t),s(e,wt,t),s(e,Te,t),s(e,bt,t),s(e,_e,t),s(e,Tt,t),u(je,e,t),s(e,_t,t),s(e,he,t),jt=!0},p(e,[t]){const el={};t&2&&(el.$$scope={dirty:t,ctx:e}),x.$set(el);const tl={};t&2&&(tl.$$scope={dirty:t,ctx:e}),Z.$set(tl);const ll={};t&2&&(ll.$$scope={dirty:t,ctx:e}),W.$set(ll)},i(e){jt||(d(_.$$.fragment,e),d(X.$$.fragment,e),d(v.$$.fragment,e),d(x.$$.fragment,e),d(G.$$.fragment,e),d(V.$$.fragment,e),d(F.$$.fragment,e),d(Z.$$.fragment,e),d(Y.$$.fragment,e),d(L.$$.fragment,e),d(E.$$.fragment,e),d(q.$$.fragment,e),d(O.$$.fragment,e),d(te.$$.fragment,e),d(se.$$.fragment,e),d(ie.$$.fragment,e),d(pe.$$.fragment,e),d(W.$$.fragment,e),d(ue.$$.fragment,e),d(fe.$$.fragment,e),d(Je.$$.fragment,e),d(be.$$.fragment,e),d(je.$$.fragment,e),jt=!0)},o(e){f(_.$$.fragment,e),f(X.$$.fragment,e),f(v.$$.fragment,e),f(x.$$.fragment,e),f(G.$$.fragment,e),f(V.$$.fragment,e),f(F.$$.fragment,e),f(Z.$$.fragment,e),f(Y.$$.fragment,e),f(L.$$.fragment,e),f(E.$$.fragment,e),f(q.$$.fragment,e),f(O.$$.fragment,e),f(te.$$.fragment,e),f(se.$$.fragment,e),f(ie.$$.fragment,e),f(pe.$$.fragment,e),f(W.$$.fragment,e),f(ue.$$.fragment,e),f(fe.$$.fragment,e),f(Je.$$.fragment,e),f(be.$$.fragment,e),f(je.$$.fragment,e),jt=!1},d(e){e&&(l(w),l(J),l(b),l(j),l(U),l(h),l($),l(ge),l(C),l(xe),l(Ze),l(I),l(We),l($e),l(Ce),l(B),l(Xe),l(Ie),l(R),l(ve),l(Be),l(N),l(Ge),l(Re),l(k),l(Ve),l(Ne),l(Fe),l(H),l(ke),l(A),l(Ye),l(He),l(Q),l(Ae),l(S),l(Le),l(Qe),l(z),l(Se),l(P),l(Ee),l(D),l(ze),l(Pe),l(K),l(De),l(qe),l(ee),l(Ke),l(Oe),l(le),l(et),l(tt),l(ne),l(lt),l(st),l(ae),l(nt),l(it),l(Me),l(at),l(me),l(pt),l(ce),l(Mt),l(mt),l(re),l(ct),l(rt),l(de),l(ut),l(dt),l(oe),l(ft),l(ot),l(ye),l(Jt),l(we),l(yt),l(wt),l(Te),l(bt),l(_e),l(Tt),l(_t),l(he)),l(m),o(_,e),o(X,e),o(v,e),o(x,e),o(G,e),o(V,e),o(F,e),o(Z,e),o(Y,e),o(L,e),o(E,e),o(q,e),o(O,e),o(te,e),o(se,e),o(ie,e),o(pe,e),o(W,e),o(ue,e),o(fe,e),o(Je,e),o(be,e),o(je,e)}}}const Jl='{"title":"InstructPix2Pix","local":"instructpix2pix","sections":[{"title":"脚本参数","local":"脚本参数","sections":[],"depth":2},{"title":"训练脚本","local":"训练脚本","sections":[],"depth":2},{"title":"启动脚本","local":"启动脚本","sections":[],"depth":2},{"title":"Stable Diffusion XL","local":"stable-diffusion-xl","sections":[],"depth":2},{"title":"后续步骤","local":"后续步骤","sections":[],"depth":2}],"depth":1}';function yl(g){return al(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ul extends pl{constructor(m){super(),Ml(this,m,yl,ol,il,{})}}export{Ul as component};
