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