import{s as _s,o as Cs,n as W}from"../chunks/scheduler.5c93273d.js";import{S as Ws,i as ks,g as T,s as i,r as U,A as Gs,h as b,f as s,c as o,j as hs,u as r,x as $,k as Zs,y as Vs,a as t,v as M,d,t as f,w as y}from"../chunks/index.e43dd92b.js";import{T as gs}from"../chunks/Tip.1cbfe904.js";import{C as Z}from"../chunks/CodeBlock.6896320e.js";import{H as R,E as xs}from"../chunks/getInferenceSnippets.d410b42d.js";import{H as Ee,a as Rl}from"../chunks/HfOption.d50154c3.js";function Bs(w){let n,J;return n=new Z({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLm1vZHVsYXJfcGlwZWxpbmVzJTIwaW1wb3J0JTIwU2VxdWVudGlhbFBpcGVsaW5lQmxvY2tzJTBBZnJvbSUyMGRpZmZ1c2Vycy5tb2R1bGFyX3BpcGVsaW5lcy5zdGFibGVfZGlmZnVzaW9uX3hsJTIwaW1wb3J0JTIwVEVYVDJJTUFHRV9CTE9DS1MlMEElMEFibG9ja3MlMjAlM0QlMjBTZXF1ZW50aWFsUGlwZWxpbmVCbG9ja3MuZnJvbV9ibG9ja3NfZGljdChURVhUMklNQUdFX0JMT0NLUyklMEElMEFtb2R1bGFyX3JlcG9faWQlMjAlM0QlMjAlMjJZaVlpWHUlMkZtb2R1bGFyLWxvYWRlci10MmktMDcwNCUyMiUwQXBpcGVsaW5lJTIwJTNEJTIwYmxvY2tzLmluaXRfcGlwZWxpbmUobW9kdWxhcl9yZXBvX2lkKSUwQSUwQXBpcGVsaW5lLmxvYWRfY29tcG9uZW50cyh0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZWxpbmUudG8oJTIyY3VkYSUyMiklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUzRCUyMkFzdHJvbmF1dCUyMGluJTIwYSUyMGp1bmdsZSUyQyUyMGNvbGQlMjBjb2xvciUyMHBhbGV0dGUlMkMlMjBtdXRlZCUyMGNvbG9ycyUyQyUyMGRldGFpbGVkJTJDJTIwOGslMjIlMkMlMjBvdXRwdXQlM0QlMjJpbWFnZXMlMjIpJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIybW9kdWxhcl90Mmlfb3V0LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers.modular_pipelines <span class="hljs-keyword">import</span> SequentialPipelineBlocks
<span class="hljs-keyword">from</span> diffusers.modular_pipelines.stable_diffusion_xl <span class="hljs-keyword">import</span> TEXT2IMAGE_BLOCKS

blocks = SequentialPipelineBlocks.from_blocks_dict(TEXT2IMAGE_BLOCKS)

modular_repo_id = <span class="hljs-string">&quot;YiYiXu/modular-loader-t2i-0704&quot;</span>
pipeline = blocks.init_pipeline(modular_repo_id)

pipeline.load_components(torch_dtype=torch.float16)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

image = pipeline(prompt=<span class="hljs-string">&quot;Astronaut in a jungle, cold color palette, muted colors, detailed, 8k&quot;</span>, output=<span class="hljs-string">&quot;images&quot;</span>)[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;modular_t2i_out.png&quot;</span>)`,wrap:!1}}),{c(){U(n.$$.fragment)},l(a){r(n.$$.fragment,a)},m(a,m){M(n,a,m),J=!0},p:W,i(a){J||(d(n.$$.fragment,a),J=!0)},o(a){f(n.$$.fragment,a),J=!1},d(a){y(n,a)}}}function Rs(w){let n,J;return n=new Z({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLm1vZHVsYXJfcGlwZWxpbmVzJTIwaW1wb3J0JTIwU2VxdWVudGlhbFBpcGVsaW5lQmxvY2tzJTBBZnJvbSUyMGRpZmZ1c2Vycy5tb2R1bGFyX3BpcGVsaW5lcy5zdGFibGVfZGlmZnVzaW9uX3hsJTIwaW1wb3J0JTIwSU1BR0UySU1BR0VfQkxPQ0tTJTBBJTBBYmxvY2tzJTIwJTNEJTIwU2VxdWVudGlhbFBpcGVsaW5lQmxvY2tzLmZyb21fYmxvY2tzX2RpY3QoSU1BR0UySU1BR0VfQkxPQ0tTKSUwQSUwQW1vZHVsYXJfcmVwb19pZCUyMCUzRCUyMCUyMllpWWlYdSUyRm1vZHVsYXItbG9hZGVyLXQyaS0wNzA0JTIyJTBBcGlwZWxpbmUlMjAlM0QlMjBibG9ja3MuaW5pdF9waXBlbGluZShtb2R1bGFyX3JlcG9faWQpJTBBJTBBcGlwZWxpbmUubG9hZF9jb21wb25lbnRzKHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlbGluZS50byglMjJjdWRhJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdGlvbi1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmRpZmZ1c2VycyUyRnNkeGwtdGV4dDJpbWcucG5nJTIyJTBBaW5pdF9pbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UodXJsKSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBkb2clMjBjYXRjaGluZyUyMGElMjBmcmlzYmVlJTIwaW4lMjB0aGUlMjBqdW5nbGUlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUzRHByb21wdCUyQyUyMGltYWdlJTNEaW5pdF9pbWFnZSUyQyUyMHN0cmVuZ3RoJTNEMC44JTJDJTIwb3V0cHV0JTNEJTIyaW1hZ2VzJTIyKSU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMm1vZHVsYXJfaTJpX291dC5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers.modular_pipelines <span class="hljs-keyword">import</span> SequentialPipelineBlocks
<span class="hljs-keyword">from</span> diffusers.modular_pipelines.stable_diffusion_xl <span class="hljs-keyword">import</span> IMAGE2IMAGE_BLOCKS

blocks = SequentialPipelineBlocks.from_blocks_dict(IMAGE2IMAGE_BLOCKS)

modular_repo_id = <span class="hljs-string">&quot;YiYiXu/modular-loader-t2i-0704&quot;</span>
pipeline = blocks.init_pipeline(modular_repo_id)

pipeline.load_components(torch_dtype=torch.float16)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

url = <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/sdxl-text2img.png&quot;</span>
init_image = load_image(url)
prompt = <span class="hljs-string">&quot;a dog catching a frisbee in the jungle&quot;</span>
image = pipeline(prompt=prompt, image=init_image, strength=<span class="hljs-number">0.8</span>, output=<span class="hljs-string">&quot;images&quot;</span>)[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;modular_i2i_out.png&quot;</span>)`,wrap:!1}}),{c(){U(n.$$.fragment)},l(a){r(n.$$.fragment,a)},m(a,m){M(n,a,m),J=!0},p:W,i(a){J||(d(n.$$.fragment,a),J=!0)},o(a){f(n.$$.fragment,a),J=!1},d(a){y(n,a)}}}function Xs(w){let n,J;return n=new Z({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLm1vZHVsYXJfcGlwZWxpbmVzJTIwaW1wb3J0JTIwU2VxdWVudGlhbFBpcGVsaW5lQmxvY2tzJTBBZnJvbSUyMGRpZmZ1c2Vycy5tb2R1bGFyX3BpcGVsaW5lcy5zdGFibGVfZGlmZnVzaW9uX3hsJTIwaW1wb3J0JTIwSU5QQUlOVF9CTE9DS1MlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQSUwQWJsb2NrcyUyMCUzRCUyMFNlcXVlbnRpYWxQaXBlbGluZUJsb2Nrcy5mcm9tX2Jsb2Nrc19kaWN0KElOUEFJTlRfQkxPQ0tTKSUwQSUwQW1vZHVsYXJfcmVwb19pZCUyMCUzRCUyMCUyMllpWWlYdSUyRm1vZHVsYXItbG9hZGVyLXQyaS0wNzA0JTIyJTBBcGlwZWxpbmUlMjAlM0QlMjBibG9ja3MuaW5pdF9waXBlbGluZShtb2R1bGFyX3JlcG9faWQpJTBBJTBBcGlwZWxpbmUubG9hZF9jb21wb25lbnRzKHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlbGluZS50byglMjJjdWRhJTIyKSUwQSUwQWltZ191cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZkaWZmdXNlcnMlMkZzZHhsLXRleHQyaW1nLnBuZyUyMiUwQW1hc2tfdXJsJTIwJTNEJTIwJTIyaCUwQXR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGc2R4bC1pbnBhaW50LW1hc2sucG5nJTIyJTBBJTBBaW5pdF9pbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoaW1nX3VybCklMEFtYXNrX2ltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZShtYXNrX3VybCklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwZGVlcCUyMHNlYSUyMGRpdmVyJTIwZmxvYXRpbmclMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUzRHByb21wdCUyQyUyMGltYWdlJTNEaW5pdF9pbWFnZSUyQyUyMG1hc2tfaW1hZ2UlM0RtYXNrX2ltYWdlJTJDJTIwc3RyZW5ndGglM0QwLjg1JTJDJTIwb3V0cHV0JTNEJTIyaW1hZ2VzJTIyKSU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMm1vZHVhcl9pbnBhaW50X291dC5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers.modular_pipelines <span class="hljs-keyword">import</span> SequentialPipelineBlocks
<span class="hljs-keyword">from</span> diffusers.modular_pipelines.stable_diffusion_xl <span class="hljs-keyword">import</span> INPAINT_BLOCKS
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

blocks = SequentialPipelineBlocks.from_blocks_dict(INPAINT_BLOCKS)

modular_repo_id = <span class="hljs-string">&quot;YiYiXu/modular-loader-t2i-0704&quot;</span>
pipeline = blocks.init_pipeline(modular_repo_id)

pipeline.load_components(torch_dtype=torch.float16)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

img_url = <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/sdxl-text2img.png&quot;</span>
mask_url = <span class="hljs-string">&quot;h
ttps://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/sdxl-inpaint-mask.png&quot;</span>

init_image = load_image(img_url)
mask_image = load_image(mask_url)

prompt = <span class="hljs-string">&quot;A deep sea diver floating&quot;</span>
image = pipeline(prompt=prompt, image=init_image, mask_image=mask_image, strength=<span class="hljs-number">0.85</span>, output=<span class="hljs-string">&quot;images&quot;</span>)[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;moduar_inpaint_out.png&quot;</span>)`,wrap:!1}}),{c(){U(n.$$.fragment)},l(a){r(n.$$.fragment,a)},m(a,m){M(n,a,m),J=!0},p:W,i(a){J||(d(n.$$.fragment,a),J=!0)},o(a){f(n.$$.fragment,a),J=!1},d(a){y(n,a)}}}function Qs(w){let n,J,a,m,p,c;return n=new Rl({props:{id:"example",option:"text-to-image",$$slots:{default:[Bs]},$$scope:{ctx:w}}}),a=new Rl({props:{id:"example",option:"image-to-image",$$slots:{default:[Rs]},$$scope:{ctx:w}}}),p=new Rl({props:{id:"example",option:"inpainting",$$slots:{default:[Xs]},$$scope:{ctx:w}}}),{c(){U(n.$$.fragment),J=i(),U(a.$$.fragment),m=i(),U(p.$$.fragment)},l(u){r(n.$$.fragment,u),J=o(u),r(a.$$.fragment,u),m=o(u),r(p.$$.fragment,u)},m(u,h){M(n,u,h),t(u,J,h),M(a,u,h),t(u,m,h),M(p,u,h),c=!0},p(u,h){const g={};h&2&&(g.$$scope={dirty:h,ctx:u}),n.$set(g);const _={};h&2&&(_.$$scope={dirty:h,ctx:u}),a.$set(_);const j={};h&2&&(j.$$scope={dirty:h,ctx:u}),p.$set(j)},i(u){c||(d(n.$$.fragment,u),d(a.$$.fragment,u),d(p.$$.fragment,u),c=!0)},o(u){f(n.$$.fragment,u),f(a.$$.fragment,u),f(p.$$.fragment,u),c=!1},d(u){u&&(s(J),s(m)),y(n,u),y(a,u),y(p,u)}}}function Is(w){let n,J='有关它如何帮助管理不同工作流中的组件的更多详细信息，请参阅<a href="./components_manager">ComponentsManager</a>文档。';return{c(){n=T("p"),n.innerHTML=J},l(a){n=b(a,"P",{"data-svelte-h":!0}),$(n)!=="svelte-82mzip"&&(n.innerHTML=J)},m(a,m){t(a,n,m)},p:W,d(a){a&&s(n)}}}function vs(w){let n,J="使用<code>init_pipeline()</code>方法从组件和配置规范创建一个<code>ModularPipeline</code>。此方法从<code>modular_model_index.json</code>文件加载<em>规范</em>，但尚未加载<em>模型</em>。",a,m,p;return m=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvbXBvbmVudHNNYW5hZ2VyJTBBZnJvbSUyMGRpZmZ1c2Vycy5tb2R1bGFyX3BpcGVsaW5lcyUyMGltcG9ydCUyMFNlcXVlbnRpYWxQaXBlbGluZUJsb2NrcyUwQWZyb20lMjBkaWZmdXNlcnMubW9kdWxhcl9waXBlbGluZXMuc3RhYmxlX2RpZmZ1c2lvbl94bCUyMGltcG9ydCUyMFRFWFQySU1BR0VfQkxPQ0tTJTBBJTBBdDJpX2Jsb2NrcyUyMCUzRCUyMFNlcXVlbnRpYWxQaXBlbGluZUJsb2Nrcy5mcm9tX2Jsb2Nrc19kaWN0KFRFWFQySU1BR0VfQkxPQ0tTKSUwQSUwQW1vZHVsYXJfcmVwb19pZCUyMCUzRCUyMCUyMllpWWlYdSUyRm1vZHVsYXItbG9hZGVyLXQyaS0wNzA0JTIyJTBBY29tcG9uZW50cyUyMCUzRCUyMENvbXBvbmVudHNNYW5hZ2VyKCklMEF0MmlfcGlwZWxpbmUlMjAlM0QlMjB0MmlfYmxvY2tzLmluaXRfcGlwZWxpbmUobW9kdWxhcl9yZXBvX2lkJTJDJTIwY29tcG9uZW50c19tYW5hZ2VyJTNEY29tcG9uZW50cyk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentsManager
<span class="hljs-keyword">from</span> diffusers.modular_pipelines <span class="hljs-keyword">import</span> SequentialPipelineBlocks
<span class="hljs-keyword">from</span> diffusers.modular_pipelines.stable_diffusion_xl <span class="hljs-keyword">import</span> TEXT2IMAGE_BLOCKS

t2i_blocks = SequentialPipelineBlocks.from_blocks_dict(TEXT2IMAGE_BLOCKS)

modular_repo_id = <span class="hljs-string">&quot;YiYiXu/modular-loader-t2i-0704&quot;</span>
components = ComponentsManager()
t2i_pipeline = t2i_blocks.init_pipeline(modular_repo_id, components_manager=components)`,wrap:!1}}),{c(){n=T("p"),n.innerHTML=J,a=i(),U(m.$$.fragment)},l(c){n=b(c,"P",{"data-svelte-h":!0}),$(n)!=="svelte-uwjwzu"&&(n.innerHTML=J),a=o(c),r(m.$$.fragment,c)},m(c,u){t(c,n,u),t(c,a,u),M(m,c,u),p=!0},p:W,i(c){p||(d(m.$$.fragment,c),p=!0)},o(c){f(m.$$.fragment,c),p=!1},d(c){c&&(s(n),s(a)),y(m,c)}}}function Ns(w){let n,J="<code>from_pretrained()</code>方法创建一个<code>ModularPipeline</code>从Hub上的模块化仓库加载。",a,m,p,c,u="添加<code>trust_remote_code</code>参数以加载自定义的<code>ModularPipeline</code>。",h,g,_;return m=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyME1vZHVsYXJQaXBlbGluZSUyQyUyMENvbXBvbmVudHNNYW5hZ2VyJTBBJTBBY29tcG9uZW50cyUyMCUzRCUyMENvbXBvbmVudHNNYW5hZ2VyKCklMEFwaXBlbGluZSUyMCUzRCUyME1vZHVsYXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyWWlZaVh1JTJGbW9kdWxhci1sb2FkZXItdDJpLTA3MDQlMjIlMkMlMjBjb21wb25lbnRzX21hbmFnZXIlM0Rjb21wb25lbnRzKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ModularPipeline, ComponentsManager

components = ComponentsManager()
pipeline = ModularPipeline.from_pretrained(<span class="hljs-string">&quot;YiYiXu/modular-loader-t2i-0704&quot;</span>, components_manager=components)`,wrap:!1}}),g=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyME1vZHVsYXJQaXBlbGluZSUyQyUyMENvbXBvbmVudHNNYW5hZ2VyJTBBJTBBY29tcG9uZW50cyUyMCUzRCUyMENvbXBvbmVudHNNYW5hZ2VyKCklMEFtb2R1bGFyX3JlcG9faWQlMjAlM0QlMjAlMjJZaVlpWHUlMkZtb2R1bGFyLWRpZmZkaWZmLTA3MDQlMjIlMEFkaWZmZGlmZl9waXBlbGluZSUyMCUzRCUyME1vZHVsYXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kdWxhcl9yZXBvX2lkJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlJTJDJTIwY29tcG9uZW50c19tYW5hZ2VyJTNEY29tcG9uZW50cyk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ModularPipeline, ComponentsManager

components = ComponentsManager()
modular_repo_id = <span class="hljs-string">&quot;YiYiXu/modular-diffdiff-0704&quot;</span>
diffdiff_pipeline = ModularPipeline.from_pretrained(modular_repo_id, trust_remote_code=<span class="hljs-literal">True</span>, components_manager=components)`,wrap:!1}}),{c(){n=T("p"),n.innerHTML=J,a=i(),U(m.$$.fragment),p=i(),c=T("p"),c.innerHTML=u,h=i(),U(g.$$.fragment)},l(j){n=b(j,"P",{"data-svelte-h":!0}),$(n)!=="svelte-17xnvg1"&&(n.innerHTML=J),a=o(j),r(m.$$.fragment,j),p=o(j),c=b(j,"P",{"data-svelte-h":!0}),$(c)!=="svelte-fc8gjt"&&(c.innerHTML=u),h=o(j),r(g.$$.fragment,j)},m(j,C){t(j,n,C),t(j,a,C),M(m,j,C),t(j,p,C),t(j,c,C),t(j,h,C),M(g,j,C),_=!0},p:W,i(j){_||(d(m.$$.fragment,j),d(g.$$.fragment,j),_=!0)},o(j){f(m.$$.fragment,j),f(g.$$.fragment,j),_=!1},d(j){j&&(s(n),s(a),s(p),s(c),s(h)),y(m,j),y(g,j)}}}function Ys(w){let n,J,a,m;return n=new Rl({props:{id:"create",option:"ModularPipelineBlocks",$$slots:{default:[vs]},$$scope:{ctx:w}}}),a=new Rl({props:{id:"create",option:"from_pretrained",$$slots:{default:[Ns]},$$scope:{ctx:w}}}),{c(){U(n.$$.fragment),J=i(),U(a.$$.fragment)},l(p){r(n.$$.fragment,p),J=o(p),r(a.$$.fragment,p)},m(p,c){M(n,p,c),t(p,J,c),M(a,p,c),m=!0},p(p,c){const u={};c&2&&(u.$$scope={dirty:c,ctx:p}),n.$set(u);const h={};c&2&&(h.$$scope={dirty:c,ctx:p}),a.$set(h)},i(p){m||(d(n.$$.fragment,p),d(a.$$.fragment,p),m=!0)},o(p){f(n.$$.fragment,p),f(a.$$.fragment,p),m=!1},d(p){p&&s(J),y(n,p),y(a,p)}}}function Es(w){let n,J;return n=new Z({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEF0MmlfcGlwZWxpbmUubG9hZF9jb21wb25lbnRzKHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEF0MmlfcGlwZWxpbmUudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch

t2i_pipeline.load_components(torch_dtype=torch.float16)
t2i_pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),{c(){U(n.$$.fragment)},l(a){r(n.$$.fragment,a)},m(a,m){M(n,a,m),J=!0},p:W,i(a){J||(d(n.$$.fragment,a),J=!0)},o(a){f(n.$$.fragment,a),J=!1},d(a){y(n,a)}}}function Fs(w){let n,J="下面的例子仅加载UNet和VAE。",a,m,p;return m=new Z({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEF0MmlfcGlwZWxpbmUubG9hZF9jb21wb25lbnRzKG5hbWVzJTNEJTVCJTIydW5ldCUyMiUyQyUyMCUyMnZhZSUyMiU1RCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNik=",highlighted:`<span class="hljs-keyword">import</span> torch

t2i_pipeline.load_components(names=[<span class="hljs-string">&quot;unet&quot;</span>, <span class="hljs-string">&quot;vae&quot;</span>], torch_dtype=torch.float16)`,wrap:!1}}),{c(){n=T("p"),n.textContent=J,a=i(),U(m.$$.fragment)},l(c){n=b(c,"P",{"data-svelte-h":!0}),$(n)!=="svelte-1xongu0"&&(n.textContent=J),a=o(c),r(m.$$.fragment,c)},m(c,u){t(c,n,u),t(c,a,u),M(m,c,u),p=!0},p:W,i(c){p||(d(m.$$.fragment,c),p=!0)},o(c){f(m.$$.fragment,c),p=!1},d(c){c&&(s(n),s(a)),y(m,c)}}}function Ss(w){let n,J,a,m;return n=new Rl({props:{id:"load",option:"load_components",$$slots:{default:[Es]},$$scope:{ctx:w}}}),a=new Rl({props:{id:"load",option:"load_components",$$slots:{default:[Fs]},$$scope:{ctx:w}}}),{c(){U(n.$$.fragment),J=i(),U(a.$$.fragment)},l(p){r(n.$$.fragment,p),J=o(p),r(a.$$.fragment,p)},m(p,c){M(n,p,c),t(p,J,c),M(a,p,c),m=!0},p(p,c){const u={};c&2&&(u.$$scope={dirty:c,ctx:p}),n.$set(u);const h={};c&2&&(h.$$scope={dirty:c,ctx:p}),a.$set(h)},i(p){m||(d(n.$$.fragment,p),d(a.$$.fragment,p),m=!0)},o(p){f(n.$$.fragment,p),f(a.$$.fragment,p),m=!1},d(p){p&&s(J),y(n,p),y(a,p)}}}function Hs(w){let n,J="在更新组件时，组件可能会从预训练变为配置。组件类型最初是在块的 <code>expected_components</code> 字段中定义的。";return{c(){n=T("p"),n.innerHTML=J},l(a){n=b(a,"P",{"data-svelte-h":!0}),$(n)!=="svelte-axskhu"&&(n.innerHTML=J)},m(a,m){t(a,n,m)},p:W,d(a){a&&s(n)}}}function zs(w){let n,J,a,m,p,c,u,h="<code>ModularPipeline</code> 将 <code>ModularPipelineBlocks</code> 转换为可执行的管道，加载模型并执行块中定义的计算步骤。它是运行管道的主要接口，与 <code>DiffusionPipeline</code> API 非常相似。",g,_,j="主要区别在于在管道中包含了一个预期的 <code>output</code> 参数。",C,k,Ql,X,Fe="本指南将向您展示如何创建一个<code>ModularPipeline</code>并管理其中的组件。",Il,Q,vl,I,Se="块是<code>InsertableDict</code>对象，可以在特定位置插入，提供了一种灵活的方式来混合和匹配块。",Nl,v,He="使用<code>insert()</code>在块类或<code>sub_blocks</code>属性上添加一个块。",Yl,N,El,Y,ze="使用<code>pop()</code>在块类或<code>sub_blocks</code>属性上移除一个块。",Fl,E,Sl,F,Le="通过将现有块设置为新块来交换块。",Hl,S,zl,H,Ll,z,qe="有两种方法可以创建一个<code>ModularPipeline</code>。从<code>ModularPipelineBlocks</code>组装并创建管道，或使用<code>from_pretrained()</code>加载现有管道。",ql,L,Ae="您还应该初始化一个<code>ComponentsManager</code>来处理设备放置和内存以及组件管理。",Al,G,Pl,V,Dl,q,Ol,A,Pe="一个<code>ModularPipeline</code>不会自动实例化组件。它只加载配置和组件规范。您可以使用<code>load_components()</code>加载所有组件，或仅使用<code>load_components()</code>加载特定组件。",Kl,x,le,P,De="打印管道以检查加载的预训练组件。",ee,D,se,O,Oe="这应该与管道初始化自的模块化仓库中的<code>modular_model_index.json</code>文件匹配。如果管道不需要某个组件，即使它在模块化仓库中存在，也不会被包含。",te,K,Ke="要修改组件加载的来源，编辑仓库中的<code>modular_model_index.json</code>文件，并将其更改为您希望的加载路径。下面的例子从不同的仓库加载UNet。",ne,ll,ae,el,pe,sl,ls="下面的管道属性提供了关于哪些组件被加载的更多信息。",ie,tl,es="使用<code>component_names</code>返回所有预期的组件。",oe,nl,ce,al,ss="使用<code>null_component_names</code>返回尚未加载的组件。使用<code>from_pretrained()</code>加载这些组件。",me,pl,Je,il,ts="使用<code>pretrained_component_names</code>返回将从预训练模型加载的组件。",ue,ol,Ue,cl,ns="使用 <code>config_component_names</code> 返回那些使用默认配置创建的组件（不是从模块化仓库加载的）。来自配置的组件不包括在内，因为它们已经在管道创建期间初始化。这就是为什么它们没有列在 <code>null_component_names</code> 中。",re,ml,Me,Jl,de,ul,as="根据组件是<em>预训练组件</em>还是<em>配置组件</em>，组件可能会被更新。",fe,B,ye,Ul,ps="预训练组件通过 <code>ComponentSpec</code> 更新，而配置组件则通过直接传递对象或使用 <code>ComponentSpec</code> 更新。",Te,rl,is="<code>ComponentSpec</code> 对于预训练组件显示 <code>default_creation_method=&quot;from_pretrained&quot;</code>，对于配置组件显示 <code>default_creation_method=&quot;from_config</code>。",be,Ml,os="要更新预训练组件，创建一个 <code>ComponentSpec</code>，指定组件的名称和从哪里加载它。使用 <code>load()</code> 方法来加载组件。",$e,dl,je,fl,cs="<code>update_components()</code> 方法用一个新的组件替换原来的组件。",we,yl,he,Tl,ms="当组件被更新时，加载规范也会在管道配置中更新。",Ze,bl,ge,$l,Js="当你使用 <code>load()</code> 时，新组件保持其加载规范。这使得提取规范并重新创建组件成为可能。",_e,jl,Ce,wl,us="<code>get_component_spec()</code> 方法获取当前组件规范的副本以进行修改或更新。",We,hl,ke,Zl,Ge,gl,Us=`一个仓库
如果管道块使用<em>预训练组件</em>，则需要y。该存储库提供了加载规范和元数据。`,Ve,_l,rs='<code>ModularPipeline</code>特别需要<em>模块化存储库</em>（参见<a href="https://huggingface.co/YiYiXu/modular-diffdiff" rel="nofollow">示例存储库</a>），这比典型的存储库更灵活。它包含一个<code>modular_model_index.json</code>文件，包含以下3个元素。',xe,Cl,Ms="<li><code>library</code>和<code>class</code>显示组件是从哪个库加载的及其类。如果是<code>null</code>，则表示组件尚未加载。</li> <li><code>loading_specs_dict</code>包含加载组件所需的信息，例如从中加载的存储库和子文件夹。</li>",Be,Wl,ds="与标准存储库不同，模块化存储库可以根据<code>loading_specs_dict</code>从不同的存储库获取组件。组件不需要存在于同一个存储库中。",Re,kl,fs="模块化存储库可能包含用于加载<code>ModularPipeline</code>的自定义代码。这允许您使用不是Diffusers原生的专用块。",Xe,Gl,Qe,Vl,ys='<a href="https://huggingface.co/YiYiXu/modular-diffdiff-0704/blob/main/config.json" rel="nofollow">config.json</a>文件包含一个<code>auto_map</code>键，指向<code>block.py</code>中定义自定义块的位置。',Ie,xl,ve,Bl,Ne,Xl,Ye;return p=new R({props:{title:"模块化管道",local:"模块化管道",headingTag:"h1"}}),k=new Ee({props:{id:"example",options:["text-to-image","image-to-image","inpainting"],$$slots:{default:[Qs]},$$scope:{ctx:w}}}),Q=new R({props:{title:"添加块",local:"添加块",headingTag:"h2"}}),N=new Z({props:{code:"JTIzJTIwQkxPQ0tTJUU2JTk4JUFGJUU1JTlEJTk3JUU3JUIxJUJCJUU3JTlBJTg0JUU1JUFEJTk3JUU1JTg1JUI4JUVGJUJDJThDJUU2JTgyJUE4JUU5JTlDJTgwJUU4JUE2JTgxJUU1JTkwJTkxJUU1JTg1JUI2JUU0JUI4JUFEJUU2JUI3JUJCJUU1JThBJUEwJUU3JUIxJUJCJTBBQkxPQ0tTLmluc2VydCglMjJibG9ja19uYW1lJTIyJTJDJTIwQmxvY2tDbGFzcyUyQyUyMGluZGV4KSUwQSUyMyUyMHN1Yl9ibG9ja3MlRTUlQjElOUUlRTYlODAlQTclRTUlOEMlODUlRTUlOTAlQUIlRTUlQUUlOUUlRTQlQkUlOEIlRUYlQkMlOEMlRTUlOTAlOTElRTglQUYlQTUlRTUlQjElOUUlRTYlODAlQTclRTYlQjclQkIlRTUlOEElQTAlRTQlQjglODAlRTQlQjglQUElRTUlOUQlOTclRTUlQUUlOUUlRTQlQkUlOEIlMEF0MmlfYmxvY2tzLnN1Yl9ibG9ja3MuaW5zZXJ0KCUyMmJsb2NrX25hbWUlMjIlMkMlMjBibG9ja19pbnN0YW5jZSUyQyUyMGluZGV4KQ==",highlighted:`<span class="hljs-comment"># BLOCKS是块类的字典，您需要向其中添加类</span>
BLOCKS.insert(<span class="hljs-string">&quot;block_name&quot;</span>, BlockClass, index)
<span class="hljs-comment"># sub_blocks属性包含实例，向该属性添加一个块实例</span>
t2i_blocks.sub_blocks.insert(<span class="hljs-string">&quot;block_name&quot;</span>, block_instance, index)`,wrap:!1}}),E=new Z({props:{code:"JTIzJTIwJUU0JUJCJThFJUU5JUEyJTg0JUU4JUFFJUJFJUU0JUI4JUFEJUU3JUE3JUJCJUU5JTk5JUE0JUU0JUI4JTgwJUU0JUI4JUFBJUU1JTlEJTk3JUU3JUIxJUJCJTBBQkxPQ0tTLnBvcCglMjJ0ZXh0X2VuY29kZXIlMjIpJTBBJTIzJTIwJUU1JTg4JTg2JUU3JUE2JUJCJUU1JTg3JUJBJUU0JUI4JTgwJUU0JUI4JUFBJUU1JTlEJTk3JUU1JUFFJTlFJUU0JUJFJThCJTBBdGV4dF9lbmNvZGVyX2Jsb2NrJTIwJTNEJTIwdDJpX2Jsb2Nrcy5zdWJfYmxvY2tzLnBvcCglMjJ0ZXh0X2VuY29kZXIlMjIp",highlighted:`<span class="hljs-comment"># 从预设中移除一个块类</span>
BLOCKS.pop(<span class="hljs-string">&quot;text_encoder&quot;</span>)
<span class="hljs-comment"># 分离出一个块实例</span>
text_encoder_block = t2i_blocks.sub_blocks.pop(<span class="hljs-string">&quot;text_encoder&quot;</span>)`,wrap:!1}}),S=new Z({props:{code:"JTIzJTIwJUU1JTlDJUE4JUU5JUEyJTg0JUU4JUFFJUJFJUU0JUI4JUFEJUU2JTlCJUJGJUU2JThEJUEyJUU1JTlEJTk3JUU3JUIxJUJCJTBBQkxPQ0tTJTVCJTIycHJlcGFyZV9sYXRlbnRzJTIyJTVEJTIwJTNEJTIwQ3VzdG9tUHJlcGFyZUxhdGVudHMlMEElMjMlMjAlRTQlQkQlQkYlRTclOTQlQTglRTUlOUQlOTclRTUlQUUlOUUlRTQlQkUlOEIlRTUlOUMlQThzdWJfYmxvY2tzJUU1JUIxJTlFJUU2JTgwJUE3JUU0JUI4JUFEJUU2JTlCJUJGJUU2JThEJUEyJTBBdDJpX2Jsb2Nrcy5zdWJfYmxvY2tzJTVCJTIycHJlcGFyZV9sYXRlbnRzJTIyJTVEJTIwJTNEJTIwQ3VzdG9tUHJlcGFyZUxhdGVudHMoKQ==",highlighted:`<span class="hljs-comment"># 在预设中替换块类</span>
BLOCKS[<span class="hljs-string">&quot;prepare_latents&quot;</span>] = CustomPrepareLatents
<span class="hljs-comment"># 使用块实例在sub_blocks属性中替换</span>
t2i_blocks.sub_blocks[<span class="hljs-string">&quot;prepare_latents&quot;</span>] = CustomPrepareLatents()`,wrap:!1}}),H=new R({props:{title:"创建管道",local:"创建管道",headingTag:"h2"}}),G=new gs({props:{warning:!1,$$slots:{default:[Is]},$$scope:{ctx:w}}}),V=new Ee({props:{id:"create",options:["ModularPipelineBlocks","from_pretrained"],$$slots:{default:[Ys]},$$scope:{ctx:w}}}),q=new R({props:{title:"加载组件",local:"加载组件",headingTag:"h2"}}),x=new Ee({props:{id:"load",options:["load_components","load_components"],$$slots:{default:[Ss]},$$scope:{ctx:w}}}),D=new Z({props:{code:"dDJpX3BpcGVsaW5l",highlighted:"t2i_pipeline",wrap:!1}}),ll=new Z({props:{code:"JTIzJTIwJUU1JThFJTlGJUU1JUE3JThCJTBBJTIydW5ldCUyMiUzQSUyMCU1QiUwQSUyMCUyMG51bGwlMkMlMjBudWxsJTJDJTBBJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIycmVwbyUyMiUzQSUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMnN1YmZvbGRlciUyMiUzQSUyMCUyMnVuZXQlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJ2YXJpYW50JTIyJTNBJTIwJTIyZnAxNiUyMiUwQSUyMCUyMCU3RCUwQSU1RCUwQSUwQSUyMyUyMCVFNCVCRiVBRSVFNiU5NCVCOSVFNSU5MCU4RSUwQSUyMnVuZXQlMjIlM0ElMjAlNUIlMEElMjAlMjBudWxsJTJDJTIwbnVsbCUyQyUwQSUyMCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnJlcG8lMjIlM0ElMjAlMjJSdW5EaWZmdXNpb24lMkZKdWdnZXJuYXV0LVhMLXY5JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyc3ViZm9sZGVyJTIyJTNBJTIwJTIydW5ldCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMnZhcmlhbnQlMjIlM0ElMjAlMjJmcDE2JTIyJTBBJTIwJTIwJTdEJTBBJTVE",highlighted:`# 原始
<span class="hljs-attr">&quot;unet&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
  <span class="hljs-literal"><span class="hljs-keyword">null</span></span><span class="hljs-punctuation">,</span> <span class="hljs-literal"><span class="hljs-keyword">null</span></span><span class="hljs-punctuation">,</span>
  <span class="hljs-punctuation">{</span>
    <span class="hljs-attr">&quot;repo&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span><span class="hljs-punctuation">,</span>
    <span class="hljs-attr">&quot;subfolder&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;unet&quot;</span><span class="hljs-punctuation">,</span>
    <span class="hljs-attr">&quot;variant&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;fp16&quot;</span>
  <span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>

# 修改后
<span class="hljs-attr">&quot;unet&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
  <span class="hljs-literal"><span class="hljs-keyword">null</span></span><span class="hljs-punctuation">,</span> <span class="hljs-literal"><span class="hljs-keyword">null</span></span><span class="hljs-punctuation">,</span>
  <span class="hljs-punctuation">{</span>
    <span class="hljs-attr">&quot;repo&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;RunDiffusion/Juggernaut-XL-v9&quot;</span><span class="hljs-punctuation">,</span>
    <span class="hljs-attr">&quot;subfolder&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;unet&quot;</span><span class="hljs-punctuation">,</span>
    <span class="hljs-attr">&quot;variant&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;fp16&quot;</span>
  <span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>`,wrap:!1}}),el=new R({props:{title:"组件加载状态",local:"组件加载状态",headingTag:"h3"}}),nl=new Z({props:{code:"dDJpX3BpcGVsaW5lLmNvbXBvbmVudF9uYW1lcyUwQSU1Qid0ZXh0X2VuY29kZXInJTJDJTIwJ3RleHRfZW5jb2Rlcl8yJyUyQyUyMCd0b2tlbml6ZXInJTJDJTIwJ3Rva2VuaXplcl8yJyUyQyUyMCdndWlkZXInJTJDJTIwJ3NjaGVkdWxlciclMkMlMjAndW5ldCclMkMlMjAndmFlJyUyQyUyMCdpbWFnZV9wcm9jZXNzb3InJTVE",highlighted:`t2i_pipeline.component_names
[<span class="hljs-string">&#x27;text_encoder&#x27;</span>, <span class="hljs-string">&#x27;text_encoder_2&#x27;</span>, <span class="hljs-string">&#x27;tokenizer&#x27;</span>, <span class="hljs-string">&#x27;tokenizer_2&#x27;</span>, <span class="hljs-string">&#x27;guider&#x27;</span>, <span class="hljs-string">&#x27;scheduler&#x27;</span>, <span class="hljs-string">&#x27;unet&#x27;</span>, <span class="hljs-string">&#x27;vae&#x27;</span>, <span class="hljs-string">&#x27;image_processor&#x27;</span>]`,wrap:!1}}),pl=new Z({props:{code:"dDJpX3BpcGVsaW5lLm51bGxfY29tcG9uZW50X25hbWVzJTBBJTVCJ3RleHRfZW5jb2RlciclMkMlMjAndGV4dF9lbmNvZGVyXzInJTJDJTIwJ3Rva2VuaXplciclMkMlMjAndG9rZW5pemVyXzInJTJDJTIwJ3NjaGVkdWxlciclNUQ=",highlighted:`t2i_pipeline.null_component_names
[<span class="hljs-string">&#x27;text_encoder&#x27;</span>, <span class="hljs-string">&#x27;text_encoder_2&#x27;</span>, <span class="hljs-string">&#x27;tokenizer&#x27;</span>, <span class="hljs-string">&#x27;tokenizer_2&#x27;</span>, <span class="hljs-string">&#x27;scheduler&#x27;</span>]`,wrap:!1}}),ol=new Z({props:{code:"dDJpX3BpcGVsaW5lLnByZXRyYWluZWRfY29tcG9uZW50X25hbWVzJTBBJTVCJ3RleHRfZW5jb2RlciclMkMlMjAndGV4dF9lbmNvZGVyXzInJTJDJTIwJ3Rva2VuaXplciclMkMlMjAndG9rZW5pemVyXzInJTJDJTIwJ3NjaGVkdWxlciclMkMlMjAndW5ldCclMkMlMjAndmFlJyU1RA==",highlighted:`t2i_pipeline.pretrained_component_names
[<span class="hljs-string">&#x27;text_encoder&#x27;</span>, <span class="hljs-string">&#x27;text_encoder_2&#x27;</span>, <span class="hljs-string">&#x27;tokenizer&#x27;</span>, <span class="hljs-string">&#x27;tokenizer_2&#x27;</span>, <span class="hljs-string">&#x27;scheduler&#x27;</span>, <span class="hljs-string">&#x27;unet&#x27;</span>, <span class="hljs-string">&#x27;vae&#x27;</span>]`,wrap:!1}}),ml=new Z({props:{code:"dDJpX3BpcGVsaW5lLmNvbmZpZ19jb21wb25lbnRfbmFtZXMlMEElNUInZ3VpZGVyJyUyQyUyMCdpbWFnZV9wcm9jZXNzb3InJTVE",highlighted:`t2i_pipeline.config_component_names
[<span class="hljs-string">&#x27;guider&#x27;</span>, <span class="hljs-string">&#x27;image_processor&#x27;</span>]`,wrap:!1}}),Jl=new R({props:{title:"更新组件",local:"更新组件",headingTag:"h2"}}),B=new gs({props:{warning:!0,$$slots:{default:[Hs]},$$scope:{ctx:w}}}),dl=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvbXBvbmVudFNwZWMlMkMlMjBVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQXVuZXRfc3BlYyUyMCUzRCUyMENvbXBvbmVudFNwZWMobmFtZSUzRCUyMnVuZXQlMjIlMkN0eXBlX2hpbnQlM0RVTmV0MkRDb25kaXRpb25Nb2RlbCUyQyUyMHJlcG8lM0QlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyJTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIpJTBBdW5ldCUyMCUzRCUyMHVuZXRfc3BlYy5sb2FkKHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentSpec, UNet2DConditionModel

unet_spec = ComponentSpec(name=<span class="hljs-string">&quot;unet&quot;</span>,type_hint=UNet2DConditionModel, repo=<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, variant=<span class="hljs-string">&quot;fp16&quot;</span>)
unet = unet_spec.load(torch_dtype=torch.float16)`,wrap:!1}}),yl=new Z({props:{code:"dDJpX3BpcGVsaW5lLnVwZGF0ZV9jb21wb25lbnRzKHVuZXQlM0R1bmV0Mik=",highlighted:"t2i_pipeline.update_components(unet=unet2)",wrap:!1}}),bl=new R({props:{title:"组件提取和修改",local:"组件提取和修改",headingTag:"h3"}}),jl=new Z({props:{code:"c3BlYyUyMCUzRCUyMENvbXBvbmVudFNwZWMuZnJvbV9jb21wb25lbnQoJTIydW5ldCUyMiUyQyUyMHVuZXQyKSUwQXNwZWMlMEFDb21wb25lbnRTcGVjKG5hbWUlM0QndW5ldCclMkMlMjB0eXBlX2hpbnQlM0QlM0NjbGFzcyUyMCdkaWZmdXNlcnMubW9kZWxzLnVuZXRzLnVuZXRfMmRfY29uZGl0aW9uLlVOZXQyRENvbmRpdGlvbk1vZGVsJyUzRSUyQyUyMGRlc2NyaXB0aW9uJTNETm9uZSUyQyUyMGNvbmZpZyUzRE5vbmUlMkMlMjByZXBvJTNEJ3N0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCclMkMlMjBzdWJmb2xkZXIlM0QndW5ldCclMkMlMjB2YXJpYW50JTNEJ2ZwMTYnJTJDJTIwcmV2aXNpb24lM0ROb25lJTJDJTIwZGVmYXVsdF9jcmVhdGlvbl9tZXRob2QlM0QnZnJvbV9wcmV0cmFpbmVkJyklMEF1bmV0Ml9yZWNyZWF0ZWQlMjAlM0QlMjBzcGVjLmxvYWQodG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KQ==",highlighted:`spec = ComponentSpec.from_component(<span class="hljs-string">&quot;unet&quot;</span>, unet2)
spec
ComponentSpec(name=<span class="hljs-string">&#x27;unet&#x27;</span>, type_hint=&lt;<span class="hljs-keyword">class</span> <span class="hljs-string">&#x27;diffusers.models.unets.unet_2d_condition.UNet2DConditionModel&#x27;</span>&gt;, description=<span class="hljs-literal">None</span>, config=<span class="hljs-literal">None</span>, repo=<span class="hljs-string">&#x27;stabilityai/stable-diffusion-xl-base-1.0&#x27;</span>, subfolder=<span class="hljs-string">&#x27;unet&#x27;</span>, variant=<span class="hljs-string">&#x27;fp16&#x27;</span>, revision=<span class="hljs-literal">None</span>, default_creation_method=<span class="hljs-string">&#x27;from_pretrained&#x27;</span>)
unet2_recreated = spec.load(torch_dtype=torch.float16)`,wrap:!1}}),hl=new Z({props:{code:"dW5ldF9zcGVjJTIwJTNEJTIwdDJpX3BpcGVsaW5lLmdldF9jb21wb25lbnRfc3BlYyglMjJ1bmV0JTIyKSUwQXVuZXRfc3BlYyUwQUNvbXBvbmVudFNwZWMoJTBBJTIwJTIwJTIwJTIwbmFtZSUzRCd1bmV0JyUyQyUwQSUyMCUyMCUyMCUyMHR5cGVfaGludCUzRCUzQ2NsYXNzJTIwJ2RpZmZ1c2Vycy5tb2RlbHMudW5ldHMudW5ldF8yZF9jb25kaXRpb24uVU5ldDJEQ29uZGl0aW9uTW9kZWwnJTNFJTJDJTBBJTIwJTIwJTIwJTIwcmVwbyUzRCdSdW5EaWZmdXNpb24lMkZKdWdnZXJuYXV0LVhMLXY5JyUyQyUwQSUyMCUyMCUyMCUyMHN1YmZvbGRlciUzRCd1bmV0JyUyQyUwQSUyMCUyMCUyMCUyMHZhcmlhbnQlM0QnZnAxNiclMkMlMEElMjAlMjAlMjAlMjBkZWZhdWx0X2NyZWF0aW9uX21ldGhvZCUzRCdmcm9tX3ByZXRyYWluZWQnJTBBKSUwQSUwQSUyMyUyMCVFNCVCRiVBRSVFNiU5NCVCOSVFNCVCQiVBNSVFNCVCQiU4RSVFNCVCOCU4RCVFNSU5MCU4QyVFNyU5QSU4NCVFNCVCQiU5MyVFNSVCQSU5MyVFNSU4QSVBMCVFOCVCRCVCRCUwQXVuZXRfc3BlYy5yZXBvJTIwJTNEJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTBBJTBBJTIzJTIwJUU0JUJEJUJGJUU3JTk0JUE4JUU0JUJGJUFFJUU2JTk0JUI5JUU1JTkwJThFJUU3JTlBJTg0JUU4JUE3JTg0JUU4JThDJTgzJUU1JThBJUEwJUU4JUJEJUJEJUU3JUJCJTg0JUU0JUJCJUI2JTBBdW5ldCUyMCUzRCUyMHVuZXRfc3BlYy5sb2FkKHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNik=",highlighted:`unet_spec = t2i_pipeline.get_component_spec(<span class="hljs-string">&quot;unet&quot;</span>)
unet_spec
ComponentSpec(
    name=<span class="hljs-string">&#x27;unet&#x27;</span>,
    type_hint=&lt;<span class="hljs-keyword">class</span> <span class="hljs-string">&#x27;diffusers.models.unets.unet_2d_condition.UNet2DConditionModel&#x27;</span>&gt;,
    repo=<span class="hljs-string">&#x27;RunDiffusion/Juggernaut-XL-v9&#x27;</span>,
    subfolder=<span class="hljs-string">&#x27;unet&#x27;</span>,
    variant=<span class="hljs-string">&#x27;fp16&#x27;</span>,
    default_creation_method=<span class="hljs-string">&#x27;from_pretrained&#x27;</span>
)

<span class="hljs-comment"># 修改以从不同的仓库加载</span>
unet_spec.repo = <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>

<span class="hljs-comment"># 使用修改后的规范加载组件</span>
unet = unet_spec.load(torch_dtype=torch.float16)`,wrap:!1}}),Zl=new R({props:{title:"模块化仓库",local:"模块化仓库",headingTag:"h2"}}),Gl=new Z({props:{code:"bW9kdWxhci1kaWZmZGlmZi0wNzA0JTJGJTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwYmxvY2sucHklMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjAlRTglODclQUElRTUlQUUlOUElRTQlQjklODklRTclQUUlQTElRTklODElOTMlRTUlOUQlOTclRTUlQUUlOUUlRTclOEUlQjAlMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjBjb25maWcuanNvbiUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMCVFNyVBRSVBMSVFOSU4MSU5MyVFOSU4NSU4RCVFNyVCRCVBRSVFNSU5MiU4Q2F1dG9fbWFwJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwbW9kdWxhcl9tb2RlbF9pbmRleC5qc29uJTIwJTIwJTIwJTIwJTIzJTIwJUU3JUJCJTg0JUU0JUJCJUI2JUU1JThBJUEwJUU4JUJEJUJEJUU4JUE3JTg0JUU4JThDJTgz",highlighted:`modular-<span class="hljs-keyword">diffdiff-0704/
</span>├── <span class="hljs-keyword">block.py </span>                   <span class="hljs-comment"># 自定义管道块实现</span>
├── <span class="hljs-built_in">config</span>.<span class="hljs-keyword">json </span>                <span class="hljs-comment"># 管道配置和auto_map</span>
└── modular_model_index.<span class="hljs-keyword">json </span>   <span class="hljs-comment"># 组件加载规范</span>`,wrap:!1}}),xl=new Z({props:{code:"JTdCJTBBJTIwJTIwJTIyX2NsYXNzX25hbWUlMjIlM0ElMjAlMjJEaWZmRGlmZkJsb2NrcyUyMiUyQyUwQSUyMCUyMCUyMmF1dG9fbWFwJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIyTW9kdWxhclBpcGVsaW5lQmxvY2tzJTIyJTNBJTIwJTIyYmxvY2suRGlmZkRpZmZCbG9ja3MlMjIlMEElMjAlMjAlN0QlMEElN0Q=",highlighted:`<span class="hljs-punctuation">{</span>
  <span class="hljs-attr">&quot;_class_name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;DiffDiffBlocks&quot;</span><span class="hljs-punctuation">,</span>
  <span class="hljs-attr">&quot;auto_map&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
    <span class="hljs-attr">&quot;ModularPipelineBlocks&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;block.DiffDiffBlocks&quot;</span>
  <span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>`,wrap:!1}}),Bl=new xs({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/zh/modular_diffusers/modular_pipeline.md"}}),{c(){n=T("meta"),J=i(),a=T("p"),m=i(),U(p.$$.fragment),c=i(),u=T("p"),u.innerHTML=h,g=i(),_=T("p"),_.innerHTML=j,C=i(),U(k.$$.fragment),Ql=i(),X=T("p"),X.innerHTML=Fe,Il=i(),U(Q.$$.fragment),vl=i(),I=T("p"),I.innerHTML=Se,Nl=i(),v=T("p"),v.innerHTML=He,Yl=i(),U(N.$$.fragment),El=i(),Y=T("p"),Y.innerHTML=ze,Fl=i(),U(E.$$.fragment),Sl=i(),F=T("p"),F.textContent=Le,Hl=i(),U(S.$$.fragment),zl=i(),U(H.$$.fragment),Ll=i(),z=T("p"),z.innerHTML=qe,ql=i(),L=T("p"),L.innerHTML=Ae,Al=i(),U(G.$$.fragment),Pl=i(),U(V.$$.fragment),Dl=i(),U(q.$$.fragment),Ol=i(),A=T("p"),A.innerHTML=Pe,Kl=i(),U(x.$$.fragment),le=i(),P=T("p"),P.textContent=De,ee=i(),U(D.$$.fragment),se=i(),O=T("p"),O.innerHTML=Oe,te=i(),K=T("p"),K.innerHTML=Ke,ne=i(),U(ll.$$.fragment),ae=i(),U(el.$$.fragment),pe=i(),sl=T("p"),sl.textContent=ls,ie=i(),tl=T("p"),tl.innerHTML=es,oe=i(),U(nl.$$.fragment),ce=i(),al=T("p"),al.innerHTML=ss,me=i(),U(pl.$$.fragment),Je=i(),il=T("p"),il.innerHTML=ts,ue=i(),U(ol.$$.fragment),Ue=i(),cl=T("p"),cl.innerHTML=ns,re=i(),U(ml.$$.fragment),Me=i(),U(Jl.$$.fragment),de=i(),ul=T("p"),ul.innerHTML=as,fe=i(),U(B.$$.fragment),ye=i(),Ul=T("p"),Ul.innerHTML=ps,Te=i(),rl=T("p"),rl.innerHTML=is,be=i(),Ml=T("p"),Ml.innerHTML=os,$e=i(),U(dl.$$.fragment),je=i(),fl=T("p"),fl.innerHTML=cs,we=i(),U(yl.$$.fragment),he=i(),Tl=T("p"),Tl.textContent=ms,Ze=i(),U(bl.$$.fragment),ge=i(),$l=T("p"),$l.innerHTML=Js,_e=i(),U(jl.$$.fragment),Ce=i(),wl=T("p"),wl.innerHTML=us,We=i(),U(hl.$$.fragment),ke=i(),U(Zl.$$.fragment),Ge=i(),gl=T("p"),gl.innerHTML=Us,Ve=i(),_l=T("p"),_l.innerHTML=rs,xe=i(),Cl=T("ul"),Cl.innerHTML=Ms,Be=i(),Wl=T("p"),Wl.innerHTML=ds,Re=i(),kl=T("p"),kl.innerHTML=fs,Xe=i(),U(Gl.$$.fragment),Qe=i(),Vl=T("p"),Vl.innerHTML=ys,Ie=i(),U(xl.$$.fragment),ve=i(),U(Bl.$$.fragment),Ne=i(),Xl=T("p"),this.h()},l(l){const e=Gs("svelte-u9bgzb",document.head);n=b(e,"META",{name:!0,content:!0}),e.forEach(s),J=o(l),a=b(l,"P",{}),hs(a).forEach(s),m=o(l),r(p.$$.fragment,l),c=o(l),u=b(l,"P",{"data-svelte-h":!0}),$(u)!=="svelte-3l6vxs"&&(u.innerHTML=h),g=o(l),_=b(l,"P",{"data-svelte-h":!0}),$(_)!=="svelte-p3173h"&&(_.innerHTML=j),C=o(l),r(k.$$.fragment,l),Ql=o(l),X=b(l,"P",{"data-svelte-h":!0}),$(X)!=="svelte-i1kyih"&&(X.innerHTML=Fe),Il=o(l),r(Q.$$.fragment,l),vl=o(l),I=b(l,"P",{"data-svelte-h":!0}),$(I)!=="svelte-v36peo"&&(I.innerHTML=Se),Nl=o(l),v=b(l,"P",{"data-svelte-h":!0}),$(v)!=="svelte-1wajzy7"&&(v.innerHTML=He),Yl=o(l),r(N.$$.fragment,l),El=o(l),Y=b(l,"P",{"data-svelte-h":!0}),$(Y)!=="svelte-1fan2kj"&&(Y.innerHTML=ze),Fl=o(l),r(E.$$.fragment,l),Sl=o(l),F=b(l,"P",{"data-svelte-h":!0}),$(F)!=="svelte-12ukh94"&&(F.textContent=Le),Hl=o(l),r(S.$$.fragment,l),zl=o(l),r(H.$$.fragment,l),Ll=o(l),z=b(l,"P",{"data-svelte-h":!0}),$(z)!=="svelte-1gbr70r"&&(z.innerHTML=qe),ql=o(l),L=b(l,"P",{"data-svelte-h":!0}),$(L)!=="svelte-1h4e5k0"&&(L.innerHTML=Ae),Al=o(l),r(G.$$.fragment,l),Pl=o(l),r(V.$$.fragment,l),Dl=o(l),r(q.$$.fragment,l),Ol=o(l),A=b(l,"P",{"data-svelte-h":!0}),$(A)!=="svelte-1g6vf14"&&(A.innerHTML=Pe),Kl=o(l),r(x.$$.fragment,l),le=o(l),P=b(l,"P",{"data-svelte-h":!0}),$(P)!=="svelte-kmr9eu"&&(P.textContent=De),ee=o(l),r(D.$$.fragment,l),se=o(l),O=b(l,"P",{"data-svelte-h":!0}),$(O)!=="svelte-987np3"&&(O.innerHTML=Oe),te=o(l),K=b(l,"P",{"data-svelte-h":!0}),$(K)!=="svelte-mk6r5f"&&(K.innerHTML=Ke),ne=o(l),r(ll.$$.fragment,l),ae=o(l),r(el.$$.fragment,l),pe=o(l),sl=b(l,"P",{"data-svelte-h":!0}),$(sl)!=="svelte-1qwmf8p"&&(sl.textContent=ls),ie=o(l),tl=b(l,"P",{"data-svelte-h":!0}),$(tl)!=="svelte-1sx8a5s"&&(tl.innerHTML=es),oe=o(l),r(nl.$$.fragment,l),ce=o(l),al=b(l,"P",{"data-svelte-h":!0}),$(al)!=="svelte-1o5wl8u"&&(al.innerHTML=ss),me=o(l),r(pl.$$.fragment,l),Je=o(l),il=b(l,"P",{"data-svelte-h":!0}),$(il)!=="svelte-15803xy"&&(il.innerHTML=ts),ue=o(l),r(ol.$$.fragment,l),Ue=o(l),cl=b(l,"P",{"data-svelte-h":!0}),$(cl)!=="svelte-sq2xuk"&&(cl.innerHTML=ns),re=o(l),r(ml.$$.fragment,l),Me=o(l),r(Jl.$$.fragment,l),de=o(l),ul=b(l,"P",{"data-svelte-h":!0}),$(ul)!=="svelte-1xlsgxp"&&(ul.innerHTML=as),fe=o(l),r(B.$$.fragment,l),ye=o(l),Ul=b(l,"P",{"data-svelte-h":!0}),$(Ul)!=="svelte-fxs3zu"&&(Ul.innerHTML=ps),Te=o(l),rl=b(l,"P",{"data-svelte-h":!0}),$(rl)!=="svelte-b4c15s"&&(rl.innerHTML=is),be=o(l),Ml=b(l,"P",{"data-svelte-h":!0}),$(Ml)!=="svelte-8tqc26"&&(Ml.innerHTML=os),$e=o(l),r(dl.$$.fragment,l),je=o(l),fl=b(l,"P",{"data-svelte-h":!0}),$(fl)!=="svelte-1vzrbwt"&&(fl.innerHTML=cs),we=o(l),r(yl.$$.fragment,l),he=o(l),Tl=b(l,"P",{"data-svelte-h":!0}),$(Tl)!=="svelte-umbxrn"&&(Tl.textContent=ms),Ze=o(l),r(bl.$$.fragment,l),ge=o(l),$l=b(l,"P",{"data-svelte-h":!0}),$($l)!=="svelte-ogvelu"&&($l.innerHTML=Js),_e=o(l),r(jl.$$.fragment,l),Ce=o(l),wl=b(l,"P",{"data-svelte-h":!0}),$(wl)!=="svelte-px539i"&&(wl.innerHTML=us),We=o(l),r(hl.$$.fragment,l),ke=o(l),r(Zl.$$.fragment,l),Ge=o(l),gl=b(l,"P",{"data-svelte-h":!0}),$(gl)!=="svelte-1s5subu"&&(gl.innerHTML=Us),Ve=o(l),_l=b(l,"P",{"data-svelte-h":!0}),$(_l)!=="svelte-1t7tovr"&&(_l.innerHTML=rs),xe=o(l),Cl=b(l,"UL",{"data-svelte-h":!0}),$(Cl)!=="svelte-1vxbcwi"&&(Cl.innerHTML=Ms),Be=o(l),Wl=b(l,"P",{"data-svelte-h":!0}),$(Wl)!=="svelte-17wiqmf"&&(Wl.innerHTML=ds),Re=o(l),kl=b(l,"P",{"data-svelte-h":!0}),$(kl)!=="svelte-psgcdq"&&(kl.innerHTML=fs),Xe=o(l),r(Gl.$$.fragment,l),Qe=o(l),Vl=b(l,"P",{"data-svelte-h":!0}),$(Vl)!=="svelte-f3q7al"&&(Vl.innerHTML=ys),Ie=o(l),r(xl.$$.fragment,l),ve=o(l),r(Bl.$$.fragment,l),Ne=o(l),Xl=b(l,"P",{}),hs(Xl).forEach(s),this.h()},h(){Zs(n,"name","hf:doc:metadata"),Zs(n,"content",Ls)},m(l,e){Vs(document.head,n),t(l,J,e),t(l,a,e),t(l,m,e),M(p,l,e),t(l,c,e),t(l,u,e),t(l,g,e),t(l,_,e),t(l,C,e),M(k,l,e),t(l,Ql,e),t(l,X,e),t(l,Il,e),M(Q,l,e),t(l,vl,e),t(l,I,e),t(l,Nl,e),t(l,v,e),t(l,Yl,e),M(N,l,e),t(l,El,e),t(l,Y,e),t(l,Fl,e),M(E,l,e),t(l,Sl,e),t(l,F,e),t(l,Hl,e),M(S,l,e),t(l,zl,e),M(H,l,e),t(l,Ll,e),t(l,z,e),t(l,ql,e),t(l,L,e),t(l,Al,e),M(G,l,e),t(l,Pl,e),M(V,l,e),t(l,Dl,e),M(q,l,e),t(l,Ol,e),t(l,A,e),t(l,Kl,e),M(x,l,e),t(l,le,e),t(l,P,e),t(l,ee,e),M(D,l,e),t(l,se,e),t(l,O,e),t(l,te,e),t(l,K,e),t(l,ne,e),M(ll,l,e),t(l,ae,e),M(el,l,e),t(l,pe,e),t(l,sl,e),t(l,ie,e),t(l,tl,e),t(l,oe,e),M(nl,l,e),t(l,ce,e),t(l,al,e),t(l,me,e),M(pl,l,e),t(l,Je,e),t(l,il,e),t(l,ue,e),M(ol,l,e),t(l,Ue,e),t(l,cl,e),t(l,re,e),M(ml,l,e),t(l,Me,e),M(Jl,l,e),t(l,de,e),t(l,ul,e),t(l,fe,e),M(B,l,e),t(l,ye,e),t(l,Ul,e),t(l,Te,e),t(l,rl,e),t(l,be,e),t(l,Ml,e),t(l,$e,e),M(dl,l,e),t(l,je,e),t(l,fl,e),t(l,we,e),M(yl,l,e),t(l,he,e),t(l,Tl,e),t(l,Ze,e),M(bl,l,e),t(l,ge,e),t(l,$l,e),t(l,_e,e),M(jl,l,e),t(l,Ce,e),t(l,wl,e),t(l,We,e),M(hl,l,e),t(l,ke,e),M(Zl,l,e),t(l,Ge,e),t(l,gl,e),t(l,Ve,e),t(l,_l,e),t(l,xe,e),t(l,Cl,e),t(l,Be,e),t(l,Wl,e),t(l,Re,e),t(l,kl,e),t(l,Xe,e),M(Gl,l,e),t(l,Qe,e),t(l,Vl,e),t(l,Ie,e),M(xl,l,e),t(l,ve,e),M(Bl,l,e),t(l,Ne,e),t(l,Xl,e),Ye=!0},p(l,[e]){const Ts={};e&2&&(Ts.$$scope={dirty:e,ctx:l}),k.$set(Ts);const bs={};e&2&&(bs.$$scope={dirty:e,ctx:l}),G.$set(bs);const $s={};e&2&&($s.$$scope={dirty:e,ctx:l}),V.$set($s);const js={};e&2&&(js.$$scope={dirty:e,ctx:l}),x.$set(js);const ws={};e&2&&(ws.$$scope={dirty:e,ctx:l}),B.$set(ws)},i(l){Ye||(d(p.$$.fragment,l),d(k.$$.fragment,l),d(Q.$$.fragment,l),d(N.$$.fragment,l),d(E.$$.fragment,l),d(S.$$.fragment,l),d(H.$$.fragment,l),d(G.$$.fragment,l),d(V.$$.fragment,l),d(q.$$.fragment,l),d(x.$$.fragment,l),d(D.$$.fragment,l),d(ll.$$.fragment,l),d(el.$$.fragment,l),d(nl.$$.fragment,l),d(pl.$$.fragment,l),d(ol.$$.fragment,l),d(ml.$$.fragment,l),d(Jl.$$.fragment,l),d(B.$$.fragment,l),d(dl.$$.fragment,l),d(yl.$$.fragment,l),d(bl.$$.fragment,l),d(jl.$$.fragment,l),d(hl.$$.fragment,l),d(Zl.$$.fragment,l),d(Gl.$$.fragment,l),d(xl.$$.fragment,l),d(Bl.$$.fragment,l),Ye=!0)},o(l){f(p.$$.fragment,l),f(k.$$.fragment,l),f(Q.$$.fragment,l),f(N.$$.fragment,l),f(E.$$.fragment,l),f(S.$$.fragment,l),f(H.$$.fragment,l),f(G.$$.fragment,l),f(V.$$.fragment,l),f(q.$$.fragment,l),f(x.$$.fragment,l),f(D.$$.fragment,l),f(ll.$$.fragment,l),f(el.$$.fragment,l),f(nl.$$.fragment,l),f(pl.$$.fragment,l),f(ol.$$.fragment,l),f(ml.$$.fragment,l),f(Jl.$$.fragment,l),f(B.$$.fragment,l),f(dl.$$.fragment,l),f(yl.$$.fragment,l),f(bl.$$.fragment,l),f(jl.$$.fragment,l),f(hl.$$.fragment,l),f(Zl.$$.fragment,l),f(Gl.$$.fragment,l),f(xl.$$.fragment,l),f(Bl.$$.fragment,l),Ye=!1},d(l){l&&(s(J),s(a),s(m),s(c),s(u),s(g),s(_),s(C),s(Ql),s(X),s(Il),s(vl),s(I),s(Nl),s(v),s(Yl),s(El),s(Y),s(Fl),s(Sl),s(F),s(Hl),s(zl),s(Ll),s(z),s(ql),s(L),s(Al),s(Pl),s(Dl),s(Ol),s(A),s(Kl),s(le),s(P),s(ee),s(se),s(O),s(te),s(K),s(ne),s(ae),s(pe),s(sl),s(ie),s(tl),s(oe),s(ce),s(al),s(me),s(Je),s(il),s(ue),s(Ue),s(cl),s(re),s(Me),s(de),s(ul),s(fe),s(ye),s(Ul),s(Te),s(rl),s(be),s(Ml),s($e),s(je),s(fl),s(we),s(he),s(Tl),s(Ze),s(ge),s($l),s(_e),s(Ce),s(wl),s(We),s(ke),s(Ge),s(gl),s(Ve),s(_l),s(xe),s(Cl),s(Be),s(Wl),s(Re),s(kl),s(Xe),s(Qe),s(Vl),s(Ie),s(ve),s(Ne),s(Xl)),s(n),y(p,l),y(k,l),y(Q,l),y(N,l),y(E,l),y(S,l),y(H,l),y(G,l),y(V,l),y(q,l),y(x,l),y(D,l),y(ll,l),y(el,l),y(nl,l),y(pl,l),y(ol,l),y(ml,l),y(Jl,l),y(B,l),y(dl,l),y(yl,l),y(bl,l),y(jl,l),y(hl,l),y(Zl,l),y(Gl,l),y(xl,l),y(Bl,l)}}}const Ls='{"title":"模块化管道","local":"模块化管道","sections":[{"title":"添加块","local":"添加块","sections":[],"depth":2},{"title":"创建管道","local":"创建管道","sections":[],"depth":2},{"title":"加载组件","local":"加载组件","sections":[{"title":"组件加载状态","local":"组件加载状态","sections":[],"depth":3}],"depth":2},{"title":"更新组件","local":"更新组件","sections":[{"title":"组件提取和修改","local":"组件提取和修改","sections":[],"depth":3}],"depth":2},{"title":"模块化仓库","local":"模块化仓库","sections":[],"depth":2}],"depth":1}';function qs(w){return Cs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class et extends Ws{constructor(n){super(),ks(this,n,qs,zs,_s,{})}}export{et as component};
