import{s as _t,o as kt,n as Rl}from"../chunks/scheduler.e4ff9b64.js";import{S as Wt,i as Gt,e as T,s as i,c as U,h as Vt,a as b,d as t,b as o,f as gt,g as r,j as $,k as Fe,l as xt,m as s,n as M,t as d,o as f,p as y}from"../chunks/index.09f1bca0.js";import{C as Bt,H as B,E as Rt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.dde31fc2.js";import{C as h}from"../chunks/CodeBlock.54e44b16.js";import{H as Se,a as Bl}from"../chunks/HfOption.44827c7f.js";function Xt(Z){let n,u;return n=new h({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,J){M(n,a,J),u=!0},p:Rl,i(a){u||(d(n.$$.fragment,a),u=!0)},o(a){f(n.$$.fragment,a),u=!1},d(a){y(n,a)}}}function Qt(Z){let n,u;return n=new h({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,J){M(n,a,J),u=!0},p:Rl,i(a){u||(d(n.$$.fragment,a),u=!0)},o(a){f(n.$$.fragment,a),u=!1},d(a){y(n,a)}}}function It(Z){let n,u;return n=new h({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,J){M(n,a,J),u=!0},p:Rl,i(a){u||(d(n.$$.fragment,a),u=!0)},o(a){f(n.$$.fragment,a),u=!1},d(a){y(n,a)}}}function vt(Z){let n,u,a,J,p,c;return n=new Bl({props:{id:"example",option:"text-to-image",$$slots:{default:[Xt]},$$scope:{ctx:Z}}}),a=new Bl({props:{id:"example",option:"image-to-image",$$slots:{default:[Qt]},$$scope:{ctx:Z}}}),p=new Bl({props:{id:"example",option:"inpainting",$$slots:{default:[It]},$$scope:{ctx:Z}}}),{c(){U(n.$$.fragment),u=i(),U(a.$$.fragment),J=i(),U(p.$$.fragment)},l(m){r(n.$$.fragment,m),u=o(m),r(a.$$.fragment,m),J=o(m),r(p.$$.fragment,m)},m(m,w){M(n,m,w),s(m,u,w),M(a,m,w),s(m,J,w),M(p,m,w),c=!0},p(m,w){const C={};w&2&&(C.$$scope={dirty:w,ctx:m}),n.$set(C);const _={};w&2&&(_.$$scope={dirty:w,ctx:m}),a.$set(_);const j={};w&2&&(j.$$scope={dirty:w,ctx:m}),p.$set(j)},i(m){c||(d(n.$$.fragment,m),d(a.$$.fragment,m),d(p.$$.fragment,m),c=!0)},o(m){f(n.$$.fragment,m),f(a.$$.fragment,m),f(p.$$.fragment,m),c=!1},d(m){m&&(t(u),t(J)),y(n,m),y(a,m),y(p,m)}}}function Nt(Z){let n,u="使用<code>init_pipeline()</code>方法从组件和配置规范创建一个<code>ModularPipeline</code>。此方法从<code>modular_model_index.json</code>文件加载<em>规范</em>，但尚未加载<em>模型</em>。",a,J,p;return J=new h({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=u,a=i(),U(J.$$.fragment)},l(c){n=b(c,"P",{"data-svelte-h":!0}),$(n)!=="svelte-uwjwzu"&&(n.innerHTML=u),a=o(c),r(J.$$.fragment,c)},m(c,m){s(c,n,m),s(c,a,m),M(J,c,m),p=!0},p:Rl,i(c){p||(d(J.$$.fragment,c),p=!0)},o(c){f(J.$$.fragment,c),p=!1},d(c){c&&(t(n),t(a)),y(J,c)}}}function Et(Z){let n,u="<code>from_pretrained()</code>方法创建一个<code>ModularPipeline</code>从Hub上的模块化仓库加载。",a,J,p,c,m="添加<code>trust_remote_code</code>参数以加载自定义的<code>ModularPipeline</code>。",w,C,_;return J=new h({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}}),C=new h({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=u,a=i(),U(J.$$.fragment),p=i(),c=T("p"),c.innerHTML=m,w=i(),U(C.$$.fragment)},l(j){n=b(j,"P",{"data-svelte-h":!0}),$(n)!=="svelte-17xnvg1"&&(n.innerHTML=u),a=o(j),r(J.$$.fragment,j),p=o(j),c=b(j,"P",{"data-svelte-h":!0}),$(c)!=="svelte-fc8gjt"&&(c.innerHTML=m),w=o(j),r(C.$$.fragment,j)},m(j,g){s(j,n,g),s(j,a,g),M(J,j,g),s(j,p,g),s(j,c,g),s(j,w,g),M(C,j,g),_=!0},p:Rl,i(j){_||(d(J.$$.fragment,j),d(C.$$.fragment,j),_=!0)},o(j){f(J.$$.fragment,j),f(C.$$.fragment,j),_=!1},d(j){j&&(t(n),t(a),t(p),t(c),t(w)),y(J,j),y(C,j)}}}function Yt(Z){let n,u,a,J;return n=new Bl({props:{id:"create",option:"ModularPipelineBlocks",$$slots:{default:[Nt]},$$scope:{ctx:Z}}}),a=new Bl({props:{id:"create",option:"from_pretrained",$$slots:{default:[Et]},$$scope:{ctx:Z}}}),{c(){U(n.$$.fragment),u=i(),U(a.$$.fragment)},l(p){r(n.$$.fragment,p),u=o(p),r(a.$$.fragment,p)},m(p,c){M(n,p,c),s(p,u,c),M(a,p,c),J=!0},p(p,c){const m={};c&2&&(m.$$scope={dirty:c,ctx:p}),n.$set(m);const w={};c&2&&(w.$$scope={dirty:c,ctx:p}),a.$set(w)},i(p){J||(d(n.$$.fragment,p),d(a.$$.fragment,p),J=!0)},o(p){f(n.$$.fragment,p),f(a.$$.fragment,p),J=!1},d(p){p&&t(u),y(n,p),y(a,p)}}}function Ft(Z){let n,u;return n=new h({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,J){M(n,a,J),u=!0},p:Rl,i(a){u||(d(n.$$.fragment,a),u=!0)},o(a){f(n.$$.fragment,a),u=!1},d(a){y(n,a)}}}function St(Z){let n,u="下面的例子仅加载UNet和VAE。",a,J,p;return J=new h({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=u,a=i(),U(J.$$.fragment)},l(c){n=b(c,"P",{"data-svelte-h":!0}),$(n)!=="svelte-1xongu0"&&(n.textContent=u),a=o(c),r(J.$$.fragment,c)},m(c,m){s(c,n,m),s(c,a,m),M(J,c,m),p=!0},p:Rl,i(c){p||(d(J.$$.fragment,c),p=!0)},o(c){f(J.$$.fragment,c),p=!1},d(c){c&&(t(n),t(a)),y(J,c)}}}function Ht(Z){let n,u,a,J;return n=new Bl({props:{id:"load",option:"load_components",$$slots:{default:[Ft]},$$scope:{ctx:Z}}}),a=new Bl({props:{id:"load",option:"load_components",$$slots:{default:[St]},$$scope:{ctx:Z}}}),{c(){U(n.$$.fragment),u=i(),U(a.$$.fragment)},l(p){r(n.$$.fragment,p),u=o(p),r(a.$$.fragment,p)},m(p,c){M(n,p,c),s(p,u,c),M(a,p,c),J=!0},p(p,c){const m={};c&2&&(m.$$scope={dirty:c,ctx:p}),n.$set(m);const w={};c&2&&(w.$$scope={dirty:c,ctx:p}),a.$set(w)},i(p){J||(d(n.$$.fragment,p),d(a.$$.fragment,p),J=!0)},o(p){f(n.$$.fragment,p),f(a.$$.fragment,p),J=!1},d(p){p&&t(u),y(n,p),y(a,p)}}}function zt(Z){let n,u,a,J,p,c,m,w,C,_="<code>ModularPipeline</code> 将 <code>ModularPipelineBlocks</code> 转换为可执行的管道，加载模型并执行块中定义的计算步骤。它是运行管道的主要接口，与 <code>DiffusionPipeline</code> API 非常相似。",j,g,He="主要区别在于在管道中包含了一个预期的 <code>output</code> 参数。",Ql,k,Il,R,ze="本指南将向您展示如何创建一个<code>ModularPipeline</code>并管理其中的组件。",vl,X,Nl,Q,Le="块是<code>InsertableDict</code>对象，可以在特定位置插入，提供了一种灵活的方式来混合和匹配块。",El,I,qe="使用<code>insert()</code>在块类或<code>sub_blocks</code>属性上添加一个块。",Yl,v,Fl,N,Ae="使用<code>pop()</code>在块类或<code>sub_blocks</code>属性上移除一个块。",Sl,E,Hl,Y,Pe="通过将现有块设置为新块来交换块。",zl,F,Ll,S,ql,H,De="有两种方法可以创建一个<code>ModularPipeline</code>。从<code>ModularPipelineBlocks</code>组装并创建管道，或使用<code>from_pretrained()</code>加载现有管道。",Al,z,Oe="您还应该初始化一个<code>ComponentsManager</code>来处理设备放置和内存以及组件管理。",Pl,W,Ke='<p>有关它如何帮助管理不同工作流中的组件的更多详细信息，请参阅<a href="./components_manager">ComponentsManager</a>文档。</p>',Dl,G,Ol,L,Kl,q,lt="一个<code>ModularPipeline</code>不会自动实例化组件。它只加载配置和组件规范。您可以使用<code>load_components()</code>加载所有组件，或仅使用<code>load_components()</code>加载特定组件。",le,V,ee,A,et="打印管道以检查加载的预训练组件。",te,P,se,D,tt="这应该与管道初始化自的模块化仓库中的<code>modular_model_index.json</code>文件匹配。如果管道不需要某个组件，即使它在模块化仓库中存在，也不会被包含。",ne,O,st="要修改组件加载的来源，编辑仓库中的<code>modular_model_index.json</code>文件，并将其更改为您希望的加载路径。下面的例子从不同的仓库加载UNet。",ae,K,pe,ll,ie,el,nt="下面的管道属性提供了关于哪些组件被加载的更多信息。",oe,tl,at="使用<code>component_names</code>返回所有预期的组件。",ce,sl,me,nl,pt="使用<code>null_component_names</code>返回尚未加载的组件。使用<code>from_pretrained()</code>加载这些组件。",Je,al,ue,pl,it="使用<code>pretrained_component_names</code>返回将从预训练模型加载的组件。",Ue,il,re,ol,ot="使用 <code>config_component_names</code> 返回那些使用默认配置创建的组件（不是从模块化仓库加载的）。来自配置的组件不包括在内，因为它们已经在管道创建期间初始化。这就是为什么它们没有列在 <code>null_component_names</code> 中。",Me,cl,de,ml,fe,Jl,ct="根据组件是<em>预训练组件</em>还是<em>配置组件</em>，组件可能会被更新。",ye,x,mt="<p>在更新组件时，组件可能会从预训练变为配置。组件类型最初是在块的 <code>expected_components</code> 字段中定义的。</p>",Te,ul,Jt="预训练组件通过 <code>ComponentSpec</code> 更新，而配置组件则通过直接传递对象或使用 <code>ComponentSpec</code> 更新。",be,Ul,ut="<code>ComponentSpec</code> 对于预训练组件显示 <code>default_creation_method=&quot;from_pretrained&quot;</code>，对于配置组件显示 <code>default_creation_method=&quot;from_config</code>。",$e,rl,Ut="要更新预训练组件，创建一个 <code>ComponentSpec</code>，指定组件的名称和从哪里加载它。使用 <code>load()</code> 方法来加载组件。",je,Ml,we,dl,rt="<code>update_components()</code> 方法用一个新的组件替换原来的组件。",he,fl,Ze,yl,Mt="当组件被更新时，加载规范也会在管道配置中更新。",Ce,Tl,ge,bl,dt="当你使用 <code>load()</code> 时，新组件保持其加载规范。这使得提取规范并重新创建组件成为可能。",_e,$l,ke,jl,ft="<code>get_component_spec()</code> 方法获取当前组件规范的副本以进行修改或更新。",We,wl,Ge,hl,Ve,Zl,yt=`一个仓库
如果管道块使用<em>预训练组件</em>，则需要y。该存储库提供了加载规范和元数据。`,xe,Cl,Tt='<code>ModularPipeline</code>特别需要<em>模块化存储库</em>（参见<a href="https://huggingface.co/YiYiXu/modular-diffdiff" rel="nofollow">示例存储库</a>），这比典型的存储库更灵活。它包含一个<code>modular_model_index.json</code>文件，包含以下3个元素。',Be,gl,bt="<li><code>library</code>和<code>class</code>显示组件是从哪个库加载的及其类。如果是<code>null</code>，则表示组件尚未加载。</li> <li><code>loading_specs_dict</code>包含加载组件所需的信息，例如从中加载的存储库和子文件夹。</li>",Re,_l,$t="与标准存储库不同，模块化存储库可以根据<code>loading_specs_dict</code>从不同的存储库获取组件。组件不需要存在于同一个存储库中。",Xe,kl,jt="模块化存储库可能包含用于加载<code>ModularPipeline</code>的自定义代码。这允许您使用不是Diffusers原生的专用块。",Qe,Wl,Ie,Gl,wt='<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>中定义自定义块的位置。',ve,Vl,Ne,xl,Ee,Xl,Ye;return p=new Bt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),m=new B({props:{title:"模块化管道",local:"模块化管道",headingTag:"h1"}}),k=new Se({props:{id:"example",options:["text-to-image","image-to-image","inpainting"],$$slots:{default:[vt]},$$scope:{ctx:Z}}}),X=new B({props:{title:"添加块",local:"添加块",headingTag:"h2"}}),v=new h({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 h({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}}),F=new h({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}}),S=new B({props:{title:"创建管道",local:"创建管道",headingTag:"h2"}}),G=new Se({props:{id:"create",options:["ModularPipelineBlocks","from_pretrained"],$$slots:{default:[Yt]},$$scope:{ctx:Z}}}),L=new B({props:{title:"加载组件",local:"加载组件",headingTag:"h2"}}),V=new Se({props:{id:"load",options:["load_components","load_components"],$$slots:{default:[Ht]},$$scope:{ctx:Z}}}),P=new h({props:{code:"dDJpX3BpcGVsaW5l",highlighted:"t2i_pipeline",wrap:!1}}),K=new h({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}}),ll=new B({props:{title:"组件加载状态",local:"组件加载状态",headingTag:"h3"}}),sl=new h({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}}),al=new h({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}}),il=new h({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}}),cl=new h({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}}),ml=new B({props:{title:"更新组件",local:"更新组件",headingTag:"h2"}}),Ml=new h({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}}),fl=new h({props:{code:"dDJpX3BpcGVsaW5lLnVwZGF0ZV9jb21wb25lbnRzKHVuZXQlM0R1bmV0Mik=",highlighted:"t2i_pipeline.update_components(unet=unet2)",wrap:!1}}),Tl=new B({props:{title:"组件提取和修改",local:"组件提取和修改",headingTag:"h3"}}),$l=new h({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}}),wl=new h({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}}),hl=new B({props:{title:"模块化仓库",local:"模块化仓库",headingTag:"h2"}}),Wl=new h({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}}),Vl=new h({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}}),xl=new Rt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/zh/modular_diffusers/modular_pipeline.md"}}),{c(){n=T("meta"),u=i(),a=T("p"),J=i(),U(p.$$.fragment),c=i(),U(m.$$.fragment),w=i(),C=T("p"),C.innerHTML=_,j=i(),g=T("p"),g.innerHTML=He,Ql=i(),U(k.$$.fragment),Il=i(),R=T("p"),R.innerHTML=ze,vl=i(),U(X.$$.fragment),Nl=i(),Q=T("p"),Q.innerHTML=Le,El=i(),I=T("p"),I.innerHTML=qe,Yl=i(),U(v.$$.fragment),Fl=i(),N=T("p"),N.innerHTML=Ae,Sl=i(),U(E.$$.fragment),Hl=i(),Y=T("p"),Y.textContent=Pe,zl=i(),U(F.$$.fragment),Ll=i(),U(S.$$.fragment),ql=i(),H=T("p"),H.innerHTML=De,Al=i(),z=T("p"),z.innerHTML=Oe,Pl=i(),W=T("blockquote"),W.innerHTML=Ke,Dl=i(),U(G.$$.fragment),Ol=i(),U(L.$$.fragment),Kl=i(),q=T("p"),q.innerHTML=lt,le=i(),U(V.$$.fragment),ee=i(),A=T("p"),A.textContent=et,te=i(),U(P.$$.fragment),se=i(),D=T("p"),D.innerHTML=tt,ne=i(),O=T("p"),O.innerHTML=st,ae=i(),U(K.$$.fragment),pe=i(),U(ll.$$.fragment),ie=i(),el=T("p"),el.textContent=nt,oe=i(),tl=T("p"),tl.innerHTML=at,ce=i(),U(sl.$$.fragment),me=i(),nl=T("p"),nl.innerHTML=pt,Je=i(),U(al.$$.fragment),ue=i(),pl=T("p"),pl.innerHTML=it,Ue=i(),U(il.$$.fragment),re=i(),ol=T("p"),ol.innerHTML=ot,Me=i(),U(cl.$$.fragment),de=i(),U(ml.$$.fragment),fe=i(),Jl=T("p"),Jl.innerHTML=ct,ye=i(),x=T("blockquote"),x.innerHTML=mt,Te=i(),ul=T("p"),ul.innerHTML=Jt,be=i(),Ul=T("p"),Ul.innerHTML=ut,$e=i(),rl=T("p"),rl.innerHTML=Ut,je=i(),U(Ml.$$.fragment),we=i(),dl=T("p"),dl.innerHTML=rt,he=i(),U(fl.$$.fragment),Ze=i(),yl=T("p"),yl.textContent=Mt,Ce=i(),U(Tl.$$.fragment),ge=i(),bl=T("p"),bl.innerHTML=dt,_e=i(),U($l.$$.fragment),ke=i(),jl=T("p"),jl.innerHTML=ft,We=i(),U(wl.$$.fragment),Ge=i(),U(hl.$$.fragment),Ve=i(),Zl=T("p"),Zl.innerHTML=yt,xe=i(),Cl=T("p"),Cl.innerHTML=Tt,Be=i(),gl=T("ul"),gl.innerHTML=bt,Re=i(),_l=T("p"),_l.innerHTML=$t,Xe=i(),kl=T("p"),kl.innerHTML=jt,Qe=i(),U(Wl.$$.fragment),Ie=i(),Gl=T("p"),Gl.innerHTML=wt,ve=i(),U(Vl.$$.fragment),Ne=i(),U(xl.$$.fragment),Ee=i(),Xl=T("p"),this.h()},l(l){const e=Vt("svelte-u9bgzb",document.head);n=b(e,"META",{name:!0,content:!0}),e.forEach(t),u=o(l),a=b(l,"P",{}),gt(a).forEach(t),J=o(l),r(p.$$.fragment,l),c=o(l),r(m.$$.fragment,l),w=o(l),C=b(l,"P",{"data-svelte-h":!0}),$(C)!=="svelte-3l6vxs"&&(C.innerHTML=_),j=o(l),g=b(l,"P",{"data-svelte-h":!0}),$(g)!=="svelte-p3173h"&&(g.innerHTML=He),Ql=o(l),r(k.$$.fragment,l),Il=o(l),R=b(l,"P",{"data-svelte-h":!0}),$(R)!=="svelte-i1kyih"&&(R.innerHTML=ze),vl=o(l),r(X.$$.fragment,l),Nl=o(l),Q=b(l,"P",{"data-svelte-h":!0}),$(Q)!=="svelte-v36peo"&&(Q.innerHTML=Le),El=o(l),I=b(l,"P",{"data-svelte-h":!0}),$(I)!=="svelte-1wajzy7"&&(I.innerHTML=qe),Yl=o(l),r(v.$$.fragment,l),Fl=o(l),N=b(l,"P",{"data-svelte-h":!0}),$(N)!=="svelte-1fan2kj"&&(N.innerHTML=Ae),Sl=o(l),r(E.$$.fragment,l),Hl=o(l),Y=b(l,"P",{"data-svelte-h":!0}),$(Y)!=="svelte-12ukh94"&&(Y.textContent=Pe),zl=o(l),r(F.$$.fragment,l),Ll=o(l),r(S.$$.fragment,l),ql=o(l),H=b(l,"P",{"data-svelte-h":!0}),$(H)!=="svelte-1gbr70r"&&(H.innerHTML=De),Al=o(l),z=b(l,"P",{"data-svelte-h":!0}),$(z)!=="svelte-1h4e5k0"&&(z.innerHTML=Oe),Pl=o(l),W=b(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),$(W)!=="svelte-1cpf61y"&&(W.innerHTML=Ke),Dl=o(l),r(G.$$.fragment,l),Ol=o(l),r(L.$$.fragment,l),Kl=o(l),q=b(l,"P",{"data-svelte-h":!0}),$(q)!=="svelte-1g6vf14"&&(q.innerHTML=lt),le=o(l),r(V.$$.fragment,l),ee=o(l),A=b(l,"P",{"data-svelte-h":!0}),$(A)!=="svelte-kmr9eu"&&(A.textContent=et),te=o(l),r(P.$$.fragment,l),se=o(l),D=b(l,"P",{"data-svelte-h":!0}),$(D)!=="svelte-987np3"&&(D.innerHTML=tt),ne=o(l),O=b(l,"P",{"data-svelte-h":!0}),$(O)!=="svelte-mk6r5f"&&(O.innerHTML=st),ae=o(l),r(K.$$.fragment,l),pe=o(l),r(ll.$$.fragment,l),ie=o(l),el=b(l,"P",{"data-svelte-h":!0}),$(el)!=="svelte-1qwmf8p"&&(el.textContent=nt),oe=o(l),tl=b(l,"P",{"data-svelte-h":!0}),$(tl)!=="svelte-1sx8a5s"&&(tl.innerHTML=at),ce=o(l),r(sl.$$.fragment,l),me=o(l),nl=b(l,"P",{"data-svelte-h":!0}),$(nl)!=="svelte-1o5wl8u"&&(nl.innerHTML=pt),Je=o(l),r(al.$$.fragment,l),ue=o(l),pl=b(l,"P",{"data-svelte-h":!0}),$(pl)!=="svelte-15803xy"&&(pl.innerHTML=it),Ue=o(l),r(il.$$.fragment,l),re=o(l),ol=b(l,"P",{"data-svelte-h":!0}),$(ol)!=="svelte-sq2xuk"&&(ol.innerHTML=ot),Me=o(l),r(cl.$$.fragment,l),de=o(l),r(ml.$$.fragment,l),fe=o(l),Jl=b(l,"P",{"data-svelte-h":!0}),$(Jl)!=="svelte-1xlsgxp"&&(Jl.innerHTML=ct),ye=o(l),x=b(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),$(x)!=="svelte-ln1uvo"&&(x.innerHTML=mt),Te=o(l),ul=b(l,"P",{"data-svelte-h":!0}),$(ul)!=="svelte-fxs3zu"&&(ul.innerHTML=Jt),be=o(l),Ul=b(l,"P",{"data-svelte-h":!0}),$(Ul)!=="svelte-b4c15s"&&(Ul.innerHTML=ut),$e=o(l),rl=b(l,"P",{"data-svelte-h":!0}),$(rl)!=="svelte-8tqc26"&&(rl.innerHTML=Ut),je=o(l),r(Ml.$$.fragment,l),we=o(l),dl=b(l,"P",{"data-svelte-h":!0}),$(dl)!=="svelte-1vzrbwt"&&(dl.innerHTML=rt),he=o(l),r(fl.$$.fragment,l),Ze=o(l),yl=b(l,"P",{"data-svelte-h":!0}),$(yl)!=="svelte-umbxrn"&&(yl.textContent=Mt),Ce=o(l),r(Tl.$$.fragment,l),ge=o(l),bl=b(l,"P",{"data-svelte-h":!0}),$(bl)!=="svelte-ogvelu"&&(bl.innerHTML=dt),_e=o(l),r($l.$$.fragment,l),ke=o(l),jl=b(l,"P",{"data-svelte-h":!0}),$(jl)!=="svelte-px539i"&&(jl.innerHTML=ft),We=o(l),r(wl.$$.fragment,l),Ge=o(l),r(hl.$$.fragment,l),Ve=o(l),Zl=b(l,"P",{"data-svelte-h":!0}),$(Zl)!=="svelte-1s5subu"&&(Zl.innerHTML=yt),xe=o(l),Cl=b(l,"P",{"data-svelte-h":!0}),$(Cl)!=="svelte-1t7tovr"&&(Cl.innerHTML=Tt),Be=o(l),gl=b(l,"UL",{"data-svelte-h":!0}),$(gl)!=="svelte-1vxbcwi"&&(gl.innerHTML=bt),Re=o(l),_l=b(l,"P",{"data-svelte-h":!0}),$(_l)!=="svelte-17wiqmf"&&(_l.innerHTML=$t),Xe=o(l),kl=b(l,"P",{"data-svelte-h":!0}),$(kl)!=="svelte-psgcdq"&&(kl.innerHTML=jt),Qe=o(l),r(Wl.$$.fragment,l),Ie=o(l),Gl=b(l,"P",{"data-svelte-h":!0}),$(Gl)!=="svelte-f3q7al"&&(Gl.innerHTML=wt),ve=o(l),r(Vl.$$.fragment,l),Ne=o(l),r(xl.$$.fragment,l),Ee=o(l),Xl=b(l,"P",{}),gt(Xl).forEach(t),this.h()},h(){Fe(n,"name","hf:doc:metadata"),Fe(n,"content",Lt),Fe(W,"class","tip"),Fe(x,"class","warning")},m(l,e){xt(document.head,n),s(l,u,e),s(l,a,e),s(l,J,e),M(p,l,e),s(l,c,e),M(m,l,e),s(l,w,e),s(l,C,e),s(l,j,e),s(l,g,e),s(l,Ql,e),M(k,l,e),s(l,Il,e),s(l,R,e),s(l,vl,e),M(X,l,e),s(l,Nl,e),s(l,Q,e),s(l,El,e),s(l,I,e),s(l,Yl,e),M(v,l,e),s(l,Fl,e),s(l,N,e),s(l,Sl,e),M(E,l,e),s(l,Hl,e),s(l,Y,e),s(l,zl,e),M(F,l,e),s(l,Ll,e),M(S,l,e),s(l,ql,e),s(l,H,e),s(l,Al,e),s(l,z,e),s(l,Pl,e),s(l,W,e),s(l,Dl,e),M(G,l,e),s(l,Ol,e),M(L,l,e),s(l,Kl,e),s(l,q,e),s(l,le,e),M(V,l,e),s(l,ee,e),s(l,A,e),s(l,te,e),M(P,l,e),s(l,se,e),s(l,D,e),s(l,ne,e),s(l,O,e),s(l,ae,e),M(K,l,e),s(l,pe,e),M(ll,l,e),s(l,ie,e),s(l,el,e),s(l,oe,e),s(l,tl,e),s(l,ce,e),M(sl,l,e),s(l,me,e),s(l,nl,e),s(l,Je,e),M(al,l,e),s(l,ue,e),s(l,pl,e),s(l,Ue,e),M(il,l,e),s(l,re,e),s(l,ol,e),s(l,Me,e),M(cl,l,e),s(l,de,e),M(ml,l,e),s(l,fe,e),s(l,Jl,e),s(l,ye,e),s(l,x,e),s(l,Te,e),s(l,ul,e),s(l,be,e),s(l,Ul,e),s(l,$e,e),s(l,rl,e),s(l,je,e),M(Ml,l,e),s(l,we,e),s(l,dl,e),s(l,he,e),M(fl,l,e),s(l,Ze,e),s(l,yl,e),s(l,Ce,e),M(Tl,l,e),s(l,ge,e),s(l,bl,e),s(l,_e,e),M($l,l,e),s(l,ke,e),s(l,jl,e),s(l,We,e),M(wl,l,e),s(l,Ge,e),M(hl,l,e),s(l,Ve,e),s(l,Zl,e),s(l,xe,e),s(l,Cl,e),s(l,Be,e),s(l,gl,e),s(l,Re,e),s(l,_l,e),s(l,Xe,e),s(l,kl,e),s(l,Qe,e),M(Wl,l,e),s(l,Ie,e),s(l,Gl,e),s(l,ve,e),M(Vl,l,e),s(l,Ne,e),M(xl,l,e),s(l,Ee,e),s(l,Xl,e),Ye=!0},p(l,[e]){const ht={};e&2&&(ht.$$scope={dirty:e,ctx:l}),k.$set(ht);const Zt={};e&2&&(Zt.$$scope={dirty:e,ctx:l}),G.$set(Zt);const Ct={};e&2&&(Ct.$$scope={dirty:e,ctx:l}),V.$set(Ct)},i(l){Ye||(d(p.$$.fragment,l),d(m.$$.fragment,l),d(k.$$.fragment,l),d(X.$$.fragment,l),d(v.$$.fragment,l),d(E.$$.fragment,l),d(F.$$.fragment,l),d(S.$$.fragment,l),d(G.$$.fragment,l),d(L.$$.fragment,l),d(V.$$.fragment,l),d(P.$$.fragment,l),d(K.$$.fragment,l),d(ll.$$.fragment,l),d(sl.$$.fragment,l),d(al.$$.fragment,l),d(il.$$.fragment,l),d(cl.$$.fragment,l),d(ml.$$.fragment,l),d(Ml.$$.fragment,l),d(fl.$$.fragment,l),d(Tl.$$.fragment,l),d($l.$$.fragment,l),d(wl.$$.fragment,l),d(hl.$$.fragment,l),d(Wl.$$.fragment,l),d(Vl.$$.fragment,l),d(xl.$$.fragment,l),Ye=!0)},o(l){f(p.$$.fragment,l),f(m.$$.fragment,l),f(k.$$.fragment,l),f(X.$$.fragment,l),f(v.$$.fragment,l),f(E.$$.fragment,l),f(F.$$.fragment,l),f(S.$$.fragment,l),f(G.$$.fragment,l),f(L.$$.fragment,l),f(V.$$.fragment,l),f(P.$$.fragment,l),f(K.$$.fragment,l),f(ll.$$.fragment,l),f(sl.$$.fragment,l),f(al.$$.fragment,l),f(il.$$.fragment,l),f(cl.$$.fragment,l),f(ml.$$.fragment,l),f(Ml.$$.fragment,l),f(fl.$$.fragment,l),f(Tl.$$.fragment,l),f($l.$$.fragment,l),f(wl.$$.fragment,l),f(hl.$$.fragment,l),f(Wl.$$.fragment,l),f(Vl.$$.fragment,l),f(xl.$$.fragment,l),Ye=!1},d(l){l&&(t(u),t(a),t(J),t(c),t(w),t(C),t(j),t(g),t(Ql),t(Il),t(R),t(vl),t(Nl),t(Q),t(El),t(I),t(Yl),t(Fl),t(N),t(Sl),t(Hl),t(Y),t(zl),t(Ll),t(ql),t(H),t(Al),t(z),t(Pl),t(W),t(Dl),t(Ol),t(Kl),t(q),t(le),t(ee),t(A),t(te),t(se),t(D),t(ne),t(O),t(ae),t(pe),t(ie),t(el),t(oe),t(tl),t(ce),t(me),t(nl),t(Je),t(ue),t(pl),t(Ue),t(re),t(ol),t(Me),t(de),t(fe),t(Jl),t(ye),t(x),t(Te),t(ul),t(be),t(Ul),t($e),t(rl),t(je),t(we),t(dl),t(he),t(Ze),t(yl),t(Ce),t(ge),t(bl),t(_e),t(ke),t(jl),t(We),t(Ge),t(Ve),t(Zl),t(xe),t(Cl),t(Be),t(gl),t(Re),t(_l),t(Xe),t(kl),t(Qe),t(Ie),t(Gl),t(ve),t(Ne),t(Ee),t(Xl)),t(n),y(p,l),y(m,l),y(k,l),y(X,l),y(v,l),y(E,l),y(F,l),y(S,l),y(G,l),y(L,l),y(V,l),y(P,l),y(K,l),y(ll,l),y(sl,l),y(al,l),y(il,l),y(cl,l),y(ml,l),y(Ml,l),y(fl,l),y(Tl,l),y($l,l),y(wl,l),y(hl,l),y(Wl,l),y(Vl,l),y(xl,l)}}}const Lt='{"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 qt(Z){return kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ls extends Wt{constructor(n){super(),Gt(this,n,qt,zt,_t,{})}}export{ls as component};
