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