import{s as qn,o as Gn,n as Zn}from"../chunks/scheduler.8c3d61f6.js";import{S as zn,i as An,g as r,s as n,r as m,A as Fn,h as s,f as a,c as o,j as x,u as d,x as h,k as b,y as t,a as C,v as c,d as f,t as u,w as g}from"../chunks/index.da70eac4.js";import{T as Hn}from"../chunks/Tip.1d9b8c37.js";import{D as y}from"../chunks/Docstring.91dd4639.js";import{C as Yn}from"../chunks/CodeBlock.a9c4becf.js";import{E as Qn}from"../chunks/ExampleCodeBlock.d368b7c4.js";import{H as Ke,E as Xn}from"../chunks/getInferenceSnippets.28ca3596.js";function Kn(ye){let _,O="This is an experimental feature and is likely to change in the future.";return{c(){_=r("p"),_.textContent=O},l(D){_=s(D,"P",{"data-svelte-h":!0}),h(_)!=="svelte-ozwf5m"&&(_.textContent=O)},m(D,M){C(D,_,M)},p:Zn,d(D){D&&a(_)}}}function eo(ye){let _,O="Example:",D,M,T;return M=new Yn({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvbXBvbmVudHNNYW5hZ2VyJTBBJTBBJTIzJTIwQ3JlYXRlJTIwYSUyMGNvbXBvbmVudHMlMjBtYW5hZ2VyJTBBY20lMjAlM0QlMjBDb21wb25lbnRzTWFuYWdlcigpJTBBJTBBJTIzJTIwQWRkJTIwY29tcG9uZW50cyUwQWNtLmFkZCglMjJ1bmV0JTIyJTJDJTIwdW5ldF9tb2RlbCUyQyUyMGNvbGxlY3Rpb24lM0QlMjJzZHhsJTIyKSUwQWNtLmFkZCglMjJ2YWUlMjIlMkMlMjB2YWVfbW9kZWwlMkMlMjBjb2xsZWN0aW9uJTNEJTIyc2R4bCUyMiklMEElMEElMjMlMjBFbmFibGUlMjBhdXRvJTIwb2ZmbG9hZGluZyUwQWNtLmVuYWJsZV9hdXRvX2NwdV9vZmZsb2FkKGRldmljZSUzRCUyMmN1ZGElMjIpJTBBJTBBJTIzJTIwUmV0cmlldmUlMjBjb21wb25lbnRzJTBBdW5ldCUyMCUzRCUyMGNtLmdldF9vbmUobmFtZSUzRCUyMnVuZXQlMjIlMkMlMjBjb2xsZWN0aW9uJTNEJTIyc2R4bCUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentsManager

<span class="hljs-comment"># Create a components manager</span>
cm = ComponentsManager()

<span class="hljs-comment"># Add components</span>
cm.add(<span class="hljs-string">&quot;unet&quot;</span>, unet_model, collection=<span class="hljs-string">&quot;sdxl&quot;</span>)
cm.add(<span class="hljs-string">&quot;vae&quot;</span>, vae_model, collection=<span class="hljs-string">&quot;sdxl&quot;</span>)

<span class="hljs-comment"># Enable auto offloading</span>
cm.enable_auto_cpu_offload(device=<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># Retrieve components</span>
unet = cm.get_one(name=<span class="hljs-string">&quot;unet&quot;</span>, collection=<span class="hljs-string">&quot;sdxl&quot;</span>)`,wrap:!1}}),{c(){_=r("p"),_.textContent=O,D=n(),m(M.$$.fragment)},l(w){_=s(w,"P",{"data-svelte-h":!0}),h(_)!=="svelte-11lpom8"&&(_.textContent=O),D=o(w),d(M.$$.fragment,w)},m(w,N){C(w,_,N),C(w,D,N),c(M,w,N),T=!0},p:Zn,i(w){T||(f(M.$$.fragment,w),T=!0)},o(w){u(M.$$.fragment,w),T=!1},d(w){w&&(a(_),a(D)),g(M,w)}}}function to(ye){let _,O,D,M,T,w,N,et,v,Q,yt,we,gn="Specification for a pipeline component.",wt,De,hn="A component can be created in two ways:",Dt,Me,_n="<li>From scratch using <strong>init</strong> with a config dict</li> <li>using <code>from_pretrained</code></li>",Mt,j,X,Tt,Te,vn="Create component using from_config with config.",It,V,K,Lt,Ie,xn="Decode a load_id string back into a dictionary of loading fields and values.",Nt,I,ee,Ot,Le,bn="Create a ComponentSpec from a Component.",Et,Ne,$n="Currently supports:",St,Oe,Cn="<li>Components created with <code>ComponentSpec.load()</code> method</li> <li>Components that are ConfigMixin subclasses but not nn.Modules (e.g. schedulers, guiders)</li>",jt,k,te,Vt,Ee,yn="Load component using from_pretrained.",kt,U,ne,Ut,Se,wn="Return the names of all loading‐related fields (i.e. those whose field.metadata[“loading”] is True).",tt,oe,nt,S,re,Pt,je,Dn="Specification for a pipeline configuration parameter.",ot,se,rt,i,ae,Jt,Ve,Mn="A central registry and management system for model components across multiple pipelines.",Bt,ke,Tn=`<a href="/docs/diffusers/main/en/api/modular_diffusers/pipeline_components#diffusers.ComponentsManager">ComponentsManager</a> provides a unified way to register, track, and reuse model components (like UNet, VAE, text
encoders, etc.) across different modular pipelines. It includes features for duplicate detection, memory
management, and component organization.`,Rt,P,Wt,J,Zt,B,ie,qt,Ue,In="Add a component to the ComponentsManager.",Gt,R,le,zt,Pe,Ln="Disable automatic CPU offloading for all components.",At,L,pe,Ft,Je,Nn="Enable automatic CPU offloading for all components.",Ht,Be,On="The algorithm works as follows:",Yt,Re,En="<li>All models start on CPU by default</li> <li>When a model’s forward pass is called, it’s moved to the execution device</li> <li>If there’s insufficient memory, other models on the device are moved back to CPU</li> <li>The system tries to offload the smallest combination of models that frees enough memory</li> <li>Models stay on the execution device until another model needs memory and forces them off</li>",Qt,W,me,Xt,We,Sn="Get components by a list of IDs.",Kt,Z,de,en,Ze,jn="Get components by a list of names, optionally filtered by collection.",tn,q,ce,nn,qe,Vn="Get component IDs by a list of names, optionally filtered by collection.",on,G,fe,rn,Ge,kn="Get comprehensive information about a component.",sn,E,ue,an,ze,Un="Get a single component by either:",ln,Ae,Pn=`<li>searching name (pattern matching), collection, or load_id.</li> <li>passing in a component_id
Raises an error if multiple components match or none are found.</li>`,pn,z,ge,mn,Fe,Jn="Remove a component from the ComponentsManager.",dn,A,he,cn,He,Bn="Remove a component from a collection.",fn,F,_e,un,Ye,Rn="Search components by name with simple pattern matching. Optionally filter by collection or load_id.",st,ve,at,xe,be,it,$e,lt,Xe,pt;return T=new Ke({props:{title:"Components and configs",local:"components-and-configs",headingTag:"h1"}}),N=new Ke({props:{title:"ComponentSpec",local:"diffusers.ComponentSpec",headingTag:"h2"}}),Q=new y({props:{name:"class diffusers.ComponentSpec",anchor:"diffusers.ComponentSpec",parameters:[{name:"name",val:": typing.Optional[str] = None"},{name:"type_hint",val:": typing.Optional[typing.Type] = None"},{name:"description",val:": typing.Optional[str] = None"},{name:"config",val:": typing.Optional[diffusers.configuration_utils.FrozenDict] = None"},{name:"repo",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"subfolder",val:": typing.Optional[str] = ''"},{name:"variant",val:": typing.Optional[str] = None"},{name:"revision",val:": typing.Optional[str] = None"},{name:"default_creation_method",val:": typing.Literal['from_config', 'from_pretrained'] = 'from_pretrained'"}],parametersDescription:[{anchor:"diffusers.ComponentSpec.name",description:"<strong>name</strong> &#x2014; Name of the component",name:"name"},{anchor:"diffusers.ComponentSpec.type_hint",description:"<strong>type_hint</strong> &#x2014; Type of the component (e.g. UNet2DConditionModel)",name:"type_hint"},{anchor:"diffusers.ComponentSpec.description",description:"<strong>description</strong> &#x2014; Optional description of the component",name:"description"},{anchor:"diffusers.ComponentSpec.config",description:"<strong>config</strong> &#x2014; Optional config dict for <strong>init</strong> creation",name:"config"},{anchor:"diffusers.ComponentSpec.repo",description:"<strong>repo</strong> &#x2014; Optional repo path for from_pretrained creation",name:"repo"},{anchor:"diffusers.ComponentSpec.subfolder",description:"<strong>subfolder</strong> &#x2014; Optional subfolder in repo",name:"subfolder"},{anchor:"diffusers.ComponentSpec.variant",description:"<strong>variant</strong> &#x2014; Optional variant in repo",name:"variant"},{anchor:"diffusers.ComponentSpec.revision",description:"<strong>revision</strong> &#x2014; Optional revision in repo",name:"revision"},{anchor:"diffusers.ComponentSpec.default_creation_method",description:"<strong>default_creation_method</strong> &#x2014; Preferred creation method - &#x201C;from_config&#x201D; or &#x201C;from_pretrained&#x201D;",name:"default_creation_method"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L71"}}),X=new y({props:{name:"create",anchor:"diffusers.ComponentSpec.create",parameters:[{name:"config",val:": typing.Union[diffusers.configuration_utils.FrozenDict, typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L232"}}),K=new y({props:{name:"decode_load_id",anchor:"diffusers.ComponentSpec.decode_load_id",parameters:[{name:"load_id",val:": str"}],parametersDescription:[{anchor:"diffusers.ComponentSpec.decode_load_id.load_id",description:`<strong>load_id</strong> &#x2014; The load_id string to decode, format: &#x201C;repo|subfolder|variant|revision&#x201D;
where None values are represented as &#x201C;null&#x201D;`,name:"load_id"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L194",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dict mapping loading field names to their values. e.g. {
“repo”: “path/to/repo”, “subfolder”: “subfolder”, “variant”: “variant”, “revision”: “revision”
} If a segment value is “null”, it’s replaced with None. Returns None if load_id is “null” (indicating
component not created with <code>load</code> method).</p>
`}}),ee=new y({props:{name:"from_component",anchor:"diffusers.ComponentSpec.from_component",parameters:[{name:"name",val:": str"},{name:"component",val:": typing.Any"}],parametersDescription:[{anchor:"diffusers.ComponentSpec.from_component.name",description:"<strong>name</strong> &#x2014; Name of the component",name:"name"},{anchor:"diffusers.ComponentSpec.from_component.component",description:"<strong>component</strong> &#x2014; Component object to create spec from",name:"component"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L115",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>ComponentSpec object</p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><code>ValueError</code> — If component is not supported (e.g. nn.Module without load_id, non-ConfigMixin)</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),te=new y({props:{name:"load",anchor:"diffusers.ComponentSpec.load",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L260"}}),ne=new y({props:{name:"loading_fields",anchor:"diffusers.ComponentSpec.loading_fields",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L175"}}),oe=new Ke({props:{title:"ConfigSpec",local:"diffusers.modular_pipelines.ConfigSpec",headingTag:"h2"}}),re=new y({props:{name:"class diffusers.modular_pipelines.ConfigSpec",anchor:"diffusers.modular_pipelines.ConfigSpec",parameters:[{name:"name",val:": str"},{name:"default",val:": typing.Any"},{name:"description",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L298"}}),se=new Ke({props:{title:"ComponentsManager",local:"diffusers.ComponentsManager",headingTag:"h2"}}),ae=new y({props:{name:"class diffusers.ComponentsManager",anchor:"diffusers.ComponentsManager",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L278"}}),P=new Hn({props:{warning:!0,$$slots:{default:[Kn]},$$scope:{ctx:ye}}}),J=new Qn({props:{anchor:"diffusers.ComponentsManager.example",$$slots:{default:[eo]},$$scope:{ctx:ye}}}),ie=new y({props:{name:"add",anchor:"diffusers.ComponentsManager.add",parameters:[{name:"name",val:": str"},{name:"component",val:": typing.Any"},{name:"collection",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.add.name",description:"<strong>name</strong> (str) &#x2014; The name of the component",name:"name"},{anchor:"diffusers.ComponentsManager.add.component",description:"<strong>component</strong> (Any) &#x2014; The component to add",name:"component"},{anchor:"diffusers.ComponentsManager.add.collection",description:"<strong>collection</strong> (Optional[str]) &#x2014; The collection to add the component to",name:"collection"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L375",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The unique component ID, which is generated as “{name}_{id(component)}” where
id(component) is Python’s built-in unique identifier for the object</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>str</p>
`}}),le=new y({props:{name:"disable_auto_cpu_offload",anchor:"diffusers.ComponentsManager.disable_auto_cpu_offload",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L726"}}),pe=new y({props:{name:"enable_auto_cpu_offload",anchor:"diffusers.ComponentsManager.enable_auto_cpu_offload",parameters:[{name:"device",val:": typing.Union[str, int, torch.device] = 'cuda'"},{name:"memory_reserve_margin",val:" = '3GB'"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.enable_auto_cpu_offload.device",description:"<strong>device</strong> (Union[str, int, torch.device]) &#x2014; The execution device where models are moved for forward passes",name:"device"},{anchor:"diffusers.ComponentsManager.enable_auto_cpu_offload.memory_reserve_margin",description:`<strong>memory_reserve_margin</strong> (str) &#x2014; The memory reserve margin to use, default is 3GB. This is the amount of
memory to keep free on the device to avoid running out of memory during model
execution (e.g., for intermediate activations, gradients, etc.)`,name:"memory_reserve_margin"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L681"}}),me=new y({props:{name:"get_components_by_ids",anchor:"diffusers.ComponentsManager.get_components_by_ids",parameters:[{name:"ids",val:": typing.List[str]"},{name:"return_dict_with_names",val:": typing.Optional[bool] = True"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.get_components_by_ids.ids",description:`<strong>ids</strong> (List[str]) &#x2014;
List of component IDs`,name:"ids"},{anchor:"diffusers.ComponentsManager.get_components_by_ids.return_dict_with_names",description:`<strong>return_dict_with_names</strong> (Optional[bool]) &#x2014;
Whether to return a dictionary with component names as keys:`,name:"return_dict_with_names"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L1020",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of components.</p>
<ul>
<li>If return_dict_with_names=True, keys are component names.</li>
<li>If return_dict_with_names=False, keys are component IDs.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dict[str, Any]</p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><code>ValueError</code> — If duplicate component names are found in the search results when return_dict_with_names=True</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),de=new y({props:{name:"get_components_by_names",anchor:"diffusers.ComponentsManager.get_components_by_names",parameters:[{name:"names",val:": typing.List[str]"},{name:"collection",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.get_components_by_names.names",description:"<strong>names</strong> (List[str]) &#x2014; List of component names",name:"names"},{anchor:"diffusers.ComponentsManager.get_components_by_names.collection",description:"<strong>collection</strong> (Optional[str]) &#x2014; Optional collection to filter by",name:"collection"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L1053",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of components with component names as keys</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dict[str, Any]</p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><code>ValueError</code> — If duplicate component names are found in the search results</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),ce=new y({props:{name:"get_ids",anchor:"diffusers.ComponentsManager.get_ids",parameters:[{name:"names",val:": typing.Union[str, typing.List[str]] = None"},{name:"collection",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.get_ids.names",description:"<strong>names</strong> (Union[str, List[str]]) &#x2014; List of component names",name:"names"},{anchor:"diffusers.ComponentsManager.get_ids.collection",description:"<strong>collection</strong> (Optional[str]) &#x2014; Optional collection to filter by",name:"collection"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L1002",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of component IDs</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List[str]</p>
`}}),fe=new y({props:{name:"get_model_info",anchor:"diffusers.ComponentsManager.get_model_info",parameters:[{name:"component_id",val:": str"},{name:"fields",val:": typing.Union[str, typing.List[str], NoneType] = None"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.get_model_info.component_id",description:"<strong>component_id</strong> (str) &#x2014; Name of the component to get info for",name:"component_id"},{anchor:"diffusers.ComponentsManager.get_model_info.fields",description:`<strong>fields</strong> (Optional[Union[str, List[str]]]) &#x2014;
Field(s) to return. Can be a string for single field or list of fields. If None, uses the
available_info_fields setting.`,name:"fields"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L743",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary containing requested component metadata. If fields is specified, returns only those fields.
Otherwise, returns all fields.</p>
`}}),ue=new y({props:{name:"get_one",anchor:"diffusers.ComponentsManager.get_one",parameters:[{name:"component_id",val:": typing.Optional[str] = None"},{name:"name",val:": typing.Optional[str] = None"},{name:"collection",val:": typing.Optional[str] = None"},{name:"load_id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.get_one.component_id",description:"<strong>component_id</strong> (Optional[str]) &#x2014; Optional component ID to get",name:"component_id"},{anchor:"diffusers.ComponentsManager.get_one.name",description:"<strong>name</strong> (Optional[str]) &#x2014; Component name or pattern",name:"name"},{anchor:"diffusers.ComponentsManager.get_one.collection",description:"<strong>collection</strong> (Optional[str]) &#x2014; Optional collection to filter by",name:"collection"},{anchor:"diffusers.ComponentsManager.get_one.load_id",description:"<strong>load_id</strong> (Optional[str]) &#x2014; Optional load_id to filter by",name:"load_id"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L957",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A single component</p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><code>ValueError</code> — If no components match or multiple components match</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ValueError</code></p>
`}}),ge=new y({props:{name:"remove",anchor:"diffusers.ComponentsManager.remove",parameters:[{name:"component_id",val:": str = None"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.remove.component_id",description:"<strong>component_id</strong> (str) &#x2014; The ID of the component to remove",name:"component_id"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L464"}}),he=new y({props:{name:"remove_from_collection",anchor:"diffusers.ComponentsManager.remove_from_collection",parameters:[{name:"component_id",val:": str"},{name:"collection",val:": str"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L446"}}),_e=new y({props:{name:"search_components",anchor:"diffusers.ComponentsManager.search_components",parameters:[{name:"names",val:": typing.Optional[str] = None"},{name:"collection",val:": typing.Optional[str] = None"},{name:"load_id",val:": typing.Optional[str] = None"},{name:"return_dict_with_names",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.ComponentsManager.search_components.names",description:`<strong>names</strong> &#x2014; Component name(s) or pattern(s)
Patterns:<ul>
<li>&#x201C;unet&#x201D; : match any component with base name &#x201C;unet&#x201D; (e.g., unet_123abc)</li>
<li>&#x201C;!unet&#x201D; : everything except components with base name &#x201C;unet&#x201D;</li>
<li>&#x201C;unet*&#x201D; : anything with base name starting with &#x201C;unet&#x201D;</li>
<li>&#x201C;!unet*&#x201D; : anything with base name NOT starting with &#x201C;unet&#x201D;</li>
<li>&#x201D;<em>unet</em>&#x201D; : anything with base name containing &#x201C;unet&#x201D;</li>
<li>&#x201C;!<em>unet</em>&#x201D; : anything with base name NOT containing &#x201C;unet&#x201D;</li>
<li>&#x201C;refiner|vae|unet&#x201D; : anything with base name exactly matching &#x201C;refiner&#x201D;, &#x201C;vae&#x201D;, or &#x201C;unet&#x201D;</li>
<li>&#x201C;!refiner|vae|unet&#x201D; : anything with base name NOT exactly matching &#x201C;refiner&#x201D;, &#x201C;vae&#x201D;, or &#x201C;unet&#x201D;</li>
<li>&#x201C;unet<em>|vae</em>&#x201D; : anything with base name starting with &#x201C;unet&#x201D; OR starting with &#x201C;vae&#x201D;</li>
</ul>`,name:"names"},{anchor:"diffusers.ComponentsManager.search_components.collection",description:"<strong>collection</strong> &#x2014; Optional collection to filter by",name:"collection"},{anchor:"diffusers.ComponentsManager.search_components.load_id",description:"<strong>load_id</strong> &#x2014; Optional load_id to filter by",name:"load_id"},{anchor:"diffusers.ComponentsManager.search_components.return_dict_with_names",description:`<strong>return_dict_with_names</strong> &#x2014;
If True, returns a dictionary with component names as keys, throw an error if
multiple components with the same name are found If False, returns a dictionary
with component IDs as keys`,name:"return_dict_with_names"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/components_manager.py#L495",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary mapping component names to components if return_dict_with_names=True, or a dictionary mapping
component IDs to components if return_dict_with_names=False</p>
`}}),ve=new Ke({props:{title:"InsertableDict",local:"diffusers.modular_pipelines.InsertableDict",headingTag:"h2"}}),be=new y({props:{name:"class diffusers.modular_pipelines.InsertableDict",anchor:"diffusers.modular_pipelines.InsertableDict",parameters:"",source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline_utils.py#L33"}}),$e=new Xn({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/modular_diffusers/pipeline_components.md"}}),{c(){_=r("meta"),O=n(),D=r("p"),M=n(),m(T.$$.fragment),w=n(),m(N.$$.fragment),et=n(),v=r("div"),m(Q.$$.fragment),yt=n(),we=r("p"),we.textContent=gn,wt=n(),De=r("p"),De.textContent=hn,Dt=n(),Me=r("ol"),Me.innerHTML=_n,Mt=n(),j=r("div"),m(X.$$.fragment),Tt=n(),Te=r("p"),Te.textContent=vn,It=n(),V=r("div"),m(K.$$.fragment),Lt=n(),Ie=r("p"),Ie.textContent=xn,Nt=n(),I=r("div"),m(ee.$$.fragment),Ot=n(),Le=r("p"),Le.textContent=bn,Et=n(),Ne=r("p"),Ne.textContent=$n,St=n(),Oe=r("ul"),Oe.innerHTML=Cn,jt=n(),k=r("div"),m(te.$$.fragment),Vt=n(),Ee=r("p"),Ee.textContent=yn,kt=n(),U=r("div"),m(ne.$$.fragment),Ut=n(),Se=r("p"),Se.textContent=wn,tt=n(),m(oe.$$.fragment),nt=n(),S=r("div"),m(re.$$.fragment),Pt=n(),je=r("p"),je.textContent=Dn,ot=n(),m(se.$$.fragment),rt=n(),i=r("div"),m(ae.$$.fragment),Jt=n(),Ve=r("p"),Ve.textContent=Mn,Bt=n(),ke=r("p"),ke.innerHTML=Tn,Rt=n(),m(P.$$.fragment),Wt=n(),m(J.$$.fragment),Zt=n(),B=r("div"),m(ie.$$.fragment),qt=n(),Ue=r("p"),Ue.textContent=In,Gt=n(),R=r("div"),m(le.$$.fragment),zt=n(),Pe=r("p"),Pe.textContent=Ln,At=n(),L=r("div"),m(pe.$$.fragment),Ft=n(),Je=r("p"),Je.textContent=Nn,Ht=n(),Be=r("p"),Be.textContent=On,Yt=n(),Re=r("ol"),Re.innerHTML=En,Qt=n(),W=r("div"),m(me.$$.fragment),Xt=n(),We=r("p"),We.textContent=Sn,Kt=n(),Z=r("div"),m(de.$$.fragment),en=n(),Ze=r("p"),Ze.textContent=jn,tn=n(),q=r("div"),m(ce.$$.fragment),nn=n(),qe=r("p"),qe.textContent=Vn,on=n(),G=r("div"),m(fe.$$.fragment),rn=n(),Ge=r("p"),Ge.textContent=kn,sn=n(),E=r("div"),m(ue.$$.fragment),an=n(),ze=r("p"),ze.textContent=Un,ln=n(),Ae=r("ul"),Ae.innerHTML=Pn,pn=n(),z=r("div"),m(ge.$$.fragment),mn=n(),Fe=r("p"),Fe.textContent=Jn,dn=n(),A=r("div"),m(he.$$.fragment),cn=n(),He=r("p"),He.textContent=Bn,fn=n(),F=r("div"),m(_e.$$.fragment),un=n(),Ye=r("p"),Ye.textContent=Rn,st=n(),m(ve.$$.fragment),at=n(),xe=r("div"),m(be.$$.fragment),it=n(),m($e.$$.fragment),lt=n(),Xe=r("p"),this.h()},l(e){const l=Fn("svelte-u9bgzb",document.head);_=s(l,"META",{name:!0,content:!0}),l.forEach(a),O=o(e),D=s(e,"P",{}),x(D).forEach(a),M=o(e),d(T.$$.fragment,e),w=o(e),d(N.$$.fragment,e),et=o(e),v=s(e,"DIV",{class:!0});var $=x(v);d(Q.$$.fragment,$),yt=o($),we=s($,"P",{"data-svelte-h":!0}),h(we)!=="svelte-rg7py0"&&(we.textContent=gn),wt=o($),De=s($,"P",{"data-svelte-h":!0}),h(De)!=="svelte-1fjrzl6"&&(De.textContent=hn),Dt=o($),Me=s($,"OL",{"data-svelte-h":!0}),h(Me)!=="svelte-t74lz6"&&(Me.innerHTML=_n),Mt=o($),j=s($,"DIV",{class:!0});var Ce=x(j);d(X.$$.fragment,Ce),Tt=o(Ce),Te=s(Ce,"P",{"data-svelte-h":!0}),h(Te)!=="svelte-1skqxe4"&&(Te.textContent=vn),Ce.forEach(a),It=o($),V=s($,"DIV",{class:!0});var mt=x(V);d(K.$$.fragment,mt),Lt=o(mt),Ie=s(mt,"P",{"data-svelte-h":!0}),h(Ie)!=="svelte-yd5k4j"&&(Ie.textContent=xn),mt.forEach(a),Nt=o($),I=s($,"DIV",{class:!0});var H=x(I);d(ee.$$.fragment,H),Ot=o(H),Le=s(H,"P",{"data-svelte-h":!0}),h(Le)!=="svelte-1io88ln"&&(Le.textContent=bn),Et=o(H),Ne=s(H,"P",{"data-svelte-h":!0}),h(Ne)!=="svelte-1b3e5l8"&&(Ne.textContent=$n),St=o(H),Oe=s(H,"UL",{"data-svelte-h":!0}),h(Oe)!=="svelte-4gx39s"&&(Oe.innerHTML=Cn),H.forEach(a),jt=o($),k=s($,"DIV",{class:!0});var dt=x(k);d(te.$$.fragment,dt),Vt=o(dt),Ee=s(dt,"P",{"data-svelte-h":!0}),h(Ee)!=="svelte-1a0mgic"&&(Ee.textContent=yn),dt.forEach(a),kt=o($),U=s($,"DIV",{class:!0});var ct=x(U);d(ne.$$.fragment,ct),Ut=o(ct),Se=s(ct,"P",{"data-svelte-h":!0}),h(Se)!=="svelte-1d19e9d"&&(Se.textContent=wn),ct.forEach(a),$.forEach(a),tt=o(e),d(oe.$$.fragment,e),nt=o(e),S=s(e,"DIV",{class:!0});var ft=x(S);d(re.$$.fragment,ft),Pt=o(ft),je=s(ft,"P",{"data-svelte-h":!0}),h(je)!=="svelte-tkt13y"&&(je.textContent=Dn),ft.forEach(a),ot=o(e),d(se.$$.fragment,e),rt=o(e),i=s(e,"DIV",{class:!0});var p=x(i);d(ae.$$.fragment,p),Jt=o(p),Ve=s(p,"P",{"data-svelte-h":!0}),h(Ve)!=="svelte-12zga2o"&&(Ve.textContent=Mn),Bt=o(p),ke=s(p,"P",{"data-svelte-h":!0}),h(ke)!=="svelte-3yysai"&&(ke.innerHTML=Tn),Rt=o(p),d(P.$$.fragment,p),Wt=o(p),d(J.$$.fragment,p),Zt=o(p),B=s(p,"DIV",{class:!0});var ut=x(B);d(ie.$$.fragment,ut),qt=o(ut),Ue=s(ut,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-1efcbti"&&(Ue.textContent=In),ut.forEach(a),Gt=o(p),R=s(p,"DIV",{class:!0});var gt=x(R);d(le.$$.fragment,gt),zt=o(gt),Pe=s(gt,"P",{"data-svelte-h":!0}),h(Pe)!=="svelte-13yhxq2"&&(Pe.textContent=Ln),gt.forEach(a),At=o(p),L=s(p,"DIV",{class:!0});var Y=x(L);d(pe.$$.fragment,Y),Ft=o(Y),Je=s(Y,"P",{"data-svelte-h":!0}),h(Je)!=="svelte-16h8j23"&&(Je.textContent=Nn),Ht=o(Y),Be=s(Y,"P",{"data-svelte-h":!0}),h(Be)!=="svelte-2s8rs4"&&(Be.textContent=On),Yt=o(Y),Re=s(Y,"OL",{"data-svelte-h":!0}),h(Re)!=="svelte-ju3amt"&&(Re.innerHTML=En),Y.forEach(a),Qt=o(p),W=s(p,"DIV",{class:!0});var ht=x(W);d(me.$$.fragment,ht),Xt=o(ht),We=s(ht,"P",{"data-svelte-h":!0}),h(We)!=="svelte-l3gs77"&&(We.textContent=Sn),ht.forEach(a),Kt=o(p),Z=s(p,"DIV",{class:!0});var _t=x(Z);d(de.$$.fragment,_t),en=o(_t),Ze=s(_t,"P",{"data-svelte-h":!0}),h(Ze)!=="svelte-f2egka"&&(Ze.textContent=jn),_t.forEach(a),tn=o(p),q=s(p,"DIV",{class:!0});var vt=x(q);d(ce.$$.fragment,vt),nn=o(vt),qe=s(vt,"P",{"data-svelte-h":!0}),h(qe)!=="svelte-wy2xsr"&&(qe.textContent=Vn),vt.forEach(a),on=o(p),G=s(p,"DIV",{class:!0});var xt=x(G);d(fe.$$.fragment,xt),rn=o(xt),Ge=s(xt,"P",{"data-svelte-h":!0}),h(Ge)!=="svelte-180fv61"&&(Ge.textContent=kn),xt.forEach(a),sn=o(p),E=s(p,"DIV",{class:!0});var Qe=x(E);d(ue.$$.fragment,Qe),an=o(Qe),ze=s(Qe,"P",{"data-svelte-h":!0}),h(ze)!=="svelte-1spaopm"&&(ze.textContent=Un),ln=o(Qe),Ae=s(Qe,"UL",{"data-svelte-h":!0}),h(Ae)!=="svelte-1pkakir"&&(Ae.innerHTML=Pn),Qe.forEach(a),pn=o(p),z=s(p,"DIV",{class:!0});var bt=x(z);d(ge.$$.fragment,bt),mn=o(bt),Fe=s(bt,"P",{"data-svelte-h":!0}),h(Fe)!=="svelte-57h0qa"&&(Fe.textContent=Jn),bt.forEach(a),dn=o(p),A=s(p,"DIV",{class:!0});var $t=x(A);d(he.$$.fragment,$t),cn=o($t),He=s($t,"P",{"data-svelte-h":!0}),h(He)!=="svelte-x54sx9"&&(He.textContent=Bn),$t.forEach(a),fn=o(p),F=s(p,"DIV",{class:!0});var Ct=x(F);d(_e.$$.fragment,Ct),un=o(Ct),Ye=s(Ct,"P",{"data-svelte-h":!0}),h(Ye)!=="svelte-6gf3km"&&(Ye.textContent=Rn),Ct.forEach(a),p.forEach(a),st=o(e),d(ve.$$.fragment,e),at=o(e),xe=s(e,"DIV",{class:!0});var Wn=x(xe);d(be.$$.fragment,Wn),Wn.forEach(a),it=o(e),d($e.$$.fragment,e),lt=o(e),Xe=s(e,"P",{}),x(Xe).forEach(a),this.h()},h(){b(_,"name","hf:doc:metadata"),b(_,"content",no),b(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(i,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){t(document.head,_),C(e,O,l),C(e,D,l),C(e,M,l),c(T,e,l),C(e,w,l),c(N,e,l),C(e,et,l),C(e,v,l),c(Q,v,null),t(v,yt),t(v,we),t(v,wt),t(v,De),t(v,Dt),t(v,Me),t(v,Mt),t(v,j),c(X,j,null),t(j,Tt),t(j,Te),t(v,It),t(v,V),c(K,V,null),t(V,Lt),t(V,Ie),t(v,Nt),t(v,I),c(ee,I,null),t(I,Ot),t(I,Le),t(I,Et),t(I,Ne),t(I,St),t(I,Oe),t(v,jt),t(v,k),c(te,k,null),t(k,Vt),t(k,Ee),t(v,kt),t(v,U),c(ne,U,null),t(U,Ut),t(U,Se),C(e,tt,l),c(oe,e,l),C(e,nt,l),C(e,S,l),c(re,S,null),t(S,Pt),t(S,je),C(e,ot,l),c(se,e,l),C(e,rt,l),C(e,i,l),c(ae,i,null),t(i,Jt),t(i,Ve),t(i,Bt),t(i,ke),t(i,Rt),c(P,i,null),t(i,Wt),c(J,i,null),t(i,Zt),t(i,B),c(ie,B,null),t(B,qt),t(B,Ue),t(i,Gt),t(i,R),c(le,R,null),t(R,zt),t(R,Pe),t(i,At),t(i,L),c(pe,L,null),t(L,Ft),t(L,Je),t(L,Ht),t(L,Be),t(L,Yt),t(L,Re),t(i,Qt),t(i,W),c(me,W,null),t(W,Xt),t(W,We),t(i,Kt),t(i,Z),c(de,Z,null),t(Z,en),t(Z,Ze),t(i,tn),t(i,q),c(ce,q,null),t(q,nn),t(q,qe),t(i,on),t(i,G),c(fe,G,null),t(G,rn),t(G,Ge),t(i,sn),t(i,E),c(ue,E,null),t(E,an),t(E,ze),t(E,ln),t(E,Ae),t(i,pn),t(i,z),c(ge,z,null),t(z,mn),t(z,Fe),t(i,dn),t(i,A),c(he,A,null),t(A,cn),t(A,He),t(i,fn),t(i,F),c(_e,F,null),t(F,un),t(F,Ye),C(e,st,l),c(ve,e,l),C(e,at,l),C(e,xe,l),c(be,xe,null),C(e,it,l),c($e,e,l),C(e,lt,l),C(e,Xe,l),pt=!0},p(e,[l]){const $={};l&2&&($.$$scope={dirty:l,ctx:e}),P.$set($);const Ce={};l&2&&(Ce.$$scope={dirty:l,ctx:e}),J.$set(Ce)},i(e){pt||(f(T.$$.fragment,e),f(N.$$.fragment,e),f(Q.$$.fragment,e),f(X.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(ne.$$.fragment,e),f(oe.$$.fragment,e),f(re.$$.fragment,e),f(se.$$.fragment,e),f(ae.$$.fragment,e),f(P.$$.fragment,e),f(J.$$.fragment,e),f(ie.$$.fragment,e),f(le.$$.fragment,e),f(pe.$$.fragment,e),f(me.$$.fragment,e),f(de.$$.fragment,e),f(ce.$$.fragment,e),f(fe.$$.fragment,e),f(ue.$$.fragment,e),f(ge.$$.fragment,e),f(he.$$.fragment,e),f(_e.$$.fragment,e),f(ve.$$.fragment,e),f(be.$$.fragment,e),f($e.$$.fragment,e),pt=!0)},o(e){u(T.$$.fragment,e),u(N.$$.fragment,e),u(Q.$$.fragment,e),u(X.$$.fragment,e),u(K.$$.fragment,e),u(ee.$$.fragment,e),u(te.$$.fragment,e),u(ne.$$.fragment,e),u(oe.$$.fragment,e),u(re.$$.fragment,e),u(se.$$.fragment,e),u(ae.$$.fragment,e),u(P.$$.fragment,e),u(J.$$.fragment,e),u(ie.$$.fragment,e),u(le.$$.fragment,e),u(pe.$$.fragment,e),u(me.$$.fragment,e),u(de.$$.fragment,e),u(ce.$$.fragment,e),u(fe.$$.fragment,e),u(ue.$$.fragment,e),u(ge.$$.fragment,e),u(he.$$.fragment,e),u(_e.$$.fragment,e),u(ve.$$.fragment,e),u(be.$$.fragment,e),u($e.$$.fragment,e),pt=!1},d(e){e&&(a(O),a(D),a(M),a(w),a(et),a(v),a(tt),a(nt),a(S),a(ot),a(rt),a(i),a(st),a(at),a(xe),a(it),a(lt),a(Xe)),a(_),g(T,e),g(N,e),g(Q),g(X),g(K),g(ee),g(te),g(ne),g(oe,e),g(re),g(se,e),g(ae),g(P),g(J),g(ie),g(le),g(pe),g(me),g(de),g(ce),g(fe),g(ue),g(ge),g(he),g(_e),g(ve,e),g(be),g($e,e)}}}const no='{"title":"Components and configs","local":"components-and-configs","sections":[{"title":"ComponentSpec","local":"diffusers.ComponentSpec","sections":[],"depth":2},{"title":"ConfigSpec","local":"diffusers.modular_pipelines.ConfigSpec","sections":[],"depth":2},{"title":"ComponentsManager","local":"diffusers.ComponentsManager","sections":[],"depth":2},{"title":"InsertableDict","local":"diffusers.modular_pipelines.InsertableDict","sections":[],"depth":2}],"depth":1}';function oo(ye){return Gn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class co extends zn{constructor(_){super(),An(this,_,oo,to,qn,{})}}export{co as component};
