import{s as qn,o as Rn,n as Gn}from"../chunks/scheduler.8c3d61f6.js";import{S as An,i as Hn,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 Yn}from"../chunks/Tip.6f698f24.js";import{D as y}from"../chunks/Docstring.367be9ed.js";import{C as zn}from"../chunks/CodeBlock.a9c4becf.js";import{E as Qn}from"../chunks/ExampleCodeBlock.dd9ee828.js";import{H as Ke,E as Xn}from"../chunks/getInferenceSnippets.cb466318.js";function Kn(ye){let _,N="This is an experimental feature and is likely to change in the future.";return{c(){_=r("p"),_.textContent=N},l(D){_=s(D,"P",{"data-svelte-h":!0}),h(_)!=="svelte-ozwf5m"&&(_.textContent=N)},m(D,M){C(D,_,M)},p:Gn,d(D){D&&a(_)}}}function eo(ye){let _,N="Example:",D,M,T;return M=new zn({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvbXBvbmVudHNNYW5hZ2VyJTBBJTBBJTIzJTIwQ3JlYXRlJTIwYSUyMGNvbXBvbmVudHMlMjBtYW5hZ2VyJTBBY20lMjAlM0QlMjBDb21wb25lbnRzTWFuYWdlcigpJTBBJTBBJTIzJTIwQWRkJTIwY29tcG9uZW50cyUwQWNtLmFkZCglMjJ1bmV0JTIyJTJDJTIwdW5ldF9tb2RlbCUyQyUyMGNvbGxlY3Rpb24lM0QlMjJzZHhsJTIyKSUwQWNtLmFkZCglMjJ2YWUlMjIlMkMlMjB2YWVfbW9kZWwlMkMlMjBjb2xsZWN0aW9uJTNEJTIyc2R4bCUyMiklMEElMEElMjMlMjBFbmFibGUlMjBhdXRvJTIwb2ZmbG9hZGluZyUwQWNtLmVuYWJsZV9hdXRvX2NwdV9vZmZsb2FkKCklMEElMEElMjMlMjBSZXRyaWV2ZSUyMGNvbXBvbmVudHMlMEF1bmV0JTIwJTNEJTIwY20uZ2V0X29uZShuYW1lJTNEJTIydW5ldCUyMiUyQyUyMGNvbGxlY3Rpb24lM0QlMjJzZHhsJTIyKQ==",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()

<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=N,D=n(),m(M.$$.fragment)},l(w){_=s(w,"P",{"data-svelte-h":!0}),h(_)!=="svelte-11lpom8"&&(_.textContent=N),D=o(w),d(M.$$.fragment,w)},m(w,E){C(w,_,E),C(w,D,E),c(M,w,E),T=!0},p:Gn,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 _,N,D,M,T,w,E,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,V,X,Tt,Te,vn="Create component using from_config with config.",It,k,K,Lt,Ie,xn="Decode a load_id string back into a dictionary of loading fields and values.",Et,I,ee,Nt,Le,bn="Create a ComponentSpec from a Component.",Ot,Ee,$n="Currently supports:",St,Ne,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>",Vt,P,te,kt,Oe,yn="Load component using from_pretrained.",Pt,j,ne,jt,Se,wn="Return the names of all loading‐related fields (i.e. those whose field.metadata[“loading”] is True).",tt,oe,nt,S,re,Ut,Ve,Dn="Specification for a pipeline configuration parameter.",ot,se,rt,i,ae,Jt,ke,Mn="A central registry and management system for model components across multiple pipelines.",Bt,Pe,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.`,Wt,U,Zt,J,Gt,B,ie,qt,je,In="Add a component to the ComponentsManager.",Rt,W,le,At,Ue,Ln="Disable automatic CPU offloading for all components.",Ht,L,pe,Ft,Je,En="Enable automatic CPU offloading for all components.",Yt,Be,Nn="The algorithm works as follows:",zt,We,On="<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,Z,me,Xt,Ze,Sn="Get components by a list of IDs.",Kt,G,de,en,Ge,Vn="Get components by a list of names, optionally filtered by collection.",tn,q,ce,nn,qe,kn="Get component IDs by a list of names, optionally filtered by collection.",on,R,fe,rn,Re,Pn="Get comprehensive information about a component.",sn,O,ue,an,Ae,jn="Get a single component by either:",ln,He,Un=`<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,A,ge,mn,Fe,Jn="Remove a component from the ComponentsManager.",dn,H,he,cn,Ye,Bn="Remove a component from a collection.",fn,F,_e,un,ze,Wn="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"}}),E=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#L281"}}),U=new Yn({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#L378",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#L733"}}),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] = None"},{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#L686"}}),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#L1027",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#L1060",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#L1009",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#L750",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#L964",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#L467"}}),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#L449"}}),_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#L500",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"),N=n(),D=r("p"),M=n(),m(T.$$.fragment),w=n(),m(E.$$.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(),V=r("div"),m(X.$$.fragment),Tt=n(),Te=r("p"),Te.textContent=vn,It=n(),k=r("div"),m(K.$$.fragment),Lt=n(),Ie=r("p"),Ie.textContent=xn,Et=n(),I=r("div"),m(ee.$$.fragment),Nt=n(),Le=r("p"),Le.textContent=bn,Ot=n(),Ee=r("p"),Ee.textContent=$n,St=n(),Ne=r("ul"),Ne.innerHTML=Cn,Vt=n(),P=r("div"),m(te.$$.fragment),kt=n(),Oe=r("p"),Oe.textContent=yn,Pt=n(),j=r("div"),m(ne.$$.fragment),jt=n(),Se=r("p"),Se.textContent=wn,tt=n(),m(oe.$$.fragment),nt=n(),S=r("div"),m(re.$$.fragment),Ut=n(),Ve=r("p"),Ve.textContent=Dn,ot=n(),m(se.$$.fragment),rt=n(),i=r("div"),m(ae.$$.fragment),Jt=n(),ke=r("p"),ke.textContent=Mn,Bt=n(),Pe=r("p"),Pe.innerHTML=Tn,Wt=n(),m(U.$$.fragment),Zt=n(),m(J.$$.fragment),Gt=n(),B=r("div"),m(ie.$$.fragment),qt=n(),je=r("p"),je.textContent=In,Rt=n(),W=r("div"),m(le.$$.fragment),At=n(),Ue=r("p"),Ue.textContent=Ln,Ht=n(),L=r("div"),m(pe.$$.fragment),Ft=n(),Je=r("p"),Je.textContent=En,Yt=n(),Be=r("p"),Be.textContent=Nn,zt=n(),We=r("ol"),We.innerHTML=On,Qt=n(),Z=r("div"),m(me.$$.fragment),Xt=n(),Ze=r("p"),Ze.textContent=Sn,Kt=n(),G=r("div"),m(de.$$.fragment),en=n(),Ge=r("p"),Ge.textContent=Vn,tn=n(),q=r("div"),m(ce.$$.fragment),nn=n(),qe=r("p"),qe.textContent=kn,on=n(),R=r("div"),m(fe.$$.fragment),rn=n(),Re=r("p"),Re.textContent=Pn,sn=n(),O=r("div"),m(ue.$$.fragment),an=n(),Ae=r("p"),Ae.textContent=jn,ln=n(),He=r("ul"),He.innerHTML=Un,pn=n(),A=r("div"),m(ge.$$.fragment),mn=n(),Fe=r("p"),Fe.textContent=Jn,dn=n(),H=r("div"),m(he.$$.fragment),cn=n(),Ye=r("p"),Ye.textContent=Bn,fn=n(),F=r("div"),m(_e.$$.fragment),un=n(),ze=r("p"),ze.textContent=Wn,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),N=o(e),D=s(e,"P",{}),x(D).forEach(a),M=o(e),d(T.$$.fragment,e),w=o(e),d(E.$$.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($),V=s($,"DIV",{class:!0});var Ce=x(V);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($),k=s($,"DIV",{class:!0});var mt=x(k);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),Et=o($),I=s($,"DIV",{class:!0});var Y=x(I);d(ee.$$.fragment,Y),Nt=o(Y),Le=s(Y,"P",{"data-svelte-h":!0}),h(Le)!=="svelte-1io88ln"&&(Le.textContent=bn),Ot=o(Y),Ee=s(Y,"P",{"data-svelte-h":!0}),h(Ee)!=="svelte-1b3e5l8"&&(Ee.textContent=$n),St=o(Y),Ne=s(Y,"UL",{"data-svelte-h":!0}),h(Ne)!=="svelte-4gx39s"&&(Ne.innerHTML=Cn),Y.forEach(a),Vt=o($),P=s($,"DIV",{class:!0});var dt=x(P);d(te.$$.fragment,dt),kt=o(dt),Oe=s(dt,"P",{"data-svelte-h":!0}),h(Oe)!=="svelte-1a0mgic"&&(Oe.textContent=yn),dt.forEach(a),Pt=o($),j=s($,"DIV",{class:!0});var ct=x(j);d(ne.$$.fragment,ct),jt=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),Ut=o(ft),Ve=s(ft,"P",{"data-svelte-h":!0}),h(Ve)!=="svelte-tkt13y"&&(Ve.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),ke=s(p,"P",{"data-svelte-h":!0}),h(ke)!=="svelte-12zga2o"&&(ke.textContent=Mn),Bt=o(p),Pe=s(p,"P",{"data-svelte-h":!0}),h(Pe)!=="svelte-3yysai"&&(Pe.innerHTML=Tn),Wt=o(p),d(U.$$.fragment,p),Zt=o(p),d(J.$$.fragment,p),Gt=o(p),B=s(p,"DIV",{class:!0});var ut=x(B);d(ie.$$.fragment,ut),qt=o(ut),je=s(ut,"P",{"data-svelte-h":!0}),h(je)!=="svelte-1efcbti"&&(je.textContent=In),ut.forEach(a),Rt=o(p),W=s(p,"DIV",{class:!0});var gt=x(W);d(le.$$.fragment,gt),At=o(gt),Ue=s(gt,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-13yhxq2"&&(Ue.textContent=Ln),gt.forEach(a),Ht=o(p),L=s(p,"DIV",{class:!0});var z=x(L);d(pe.$$.fragment,z),Ft=o(z),Je=s(z,"P",{"data-svelte-h":!0}),h(Je)!=="svelte-16h8j23"&&(Je.textContent=En),Yt=o(z),Be=s(z,"P",{"data-svelte-h":!0}),h(Be)!=="svelte-2s8rs4"&&(Be.textContent=Nn),zt=o(z),We=s(z,"OL",{"data-svelte-h":!0}),h(We)!=="svelte-ju3amt"&&(We.innerHTML=On),z.forEach(a),Qt=o(p),Z=s(p,"DIV",{class:!0});var ht=x(Z);d(me.$$.fragment,ht),Xt=o(ht),Ze=s(ht,"P",{"data-svelte-h":!0}),h(Ze)!=="svelte-l3gs77"&&(Ze.textContent=Sn),ht.forEach(a),Kt=o(p),G=s(p,"DIV",{class:!0});var _t=x(G);d(de.$$.fragment,_t),en=o(_t),Ge=s(_t,"P",{"data-svelte-h":!0}),h(Ge)!=="svelte-f2egka"&&(Ge.textContent=Vn),_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=kn),vt.forEach(a),on=o(p),R=s(p,"DIV",{class:!0});var xt=x(R);d(fe.$$.fragment,xt),rn=o(xt),Re=s(xt,"P",{"data-svelte-h":!0}),h(Re)!=="svelte-180fv61"&&(Re.textContent=Pn),xt.forEach(a),sn=o(p),O=s(p,"DIV",{class:!0});var Qe=x(O);d(ue.$$.fragment,Qe),an=o(Qe),Ae=s(Qe,"P",{"data-svelte-h":!0}),h(Ae)!=="svelte-1spaopm"&&(Ae.textContent=jn),ln=o(Qe),He=s(Qe,"UL",{"data-svelte-h":!0}),h(He)!=="svelte-1pkakir"&&(He.innerHTML=Un),Qe.forEach(a),pn=o(p),A=s(p,"DIV",{class:!0});var bt=x(A);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),H=s(p,"DIV",{class:!0});var $t=x(H);d(he.$$.fragment,$t),cn=o($t),Ye=s($t,"P",{"data-svelte-h":!0}),h(Ye)!=="svelte-x54sx9"&&(Ye.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),ze=s(Ct,"P",{"data-svelte-h":!0}),h(ze)!=="svelte-6gf3km"&&(ze.textContent=Wn),Ct.forEach(a),p.forEach(a),st=o(e),d(ve.$$.fragment,e),at=o(e),xe=s(e,"DIV",{class:!0});var Zn=x(xe);d(be.$$.fragment,Zn),Zn.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(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(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(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(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(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(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(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(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(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(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(O,"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(H,"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,N,l),C(e,D,l),C(e,M,l),c(T,e,l),C(e,w,l),c(E,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,V),c(X,V,null),t(V,Tt),t(V,Te),t(v,It),t(v,k),c(K,k,null),t(k,Lt),t(k,Ie),t(v,Et),t(v,I),c(ee,I,null),t(I,Nt),t(I,Le),t(I,Ot),t(I,Ee),t(I,St),t(I,Ne),t(v,Vt),t(v,P),c(te,P,null),t(P,kt),t(P,Oe),t(v,Pt),t(v,j),c(ne,j,null),t(j,jt),t(j,Se),C(e,tt,l),c(oe,e,l),C(e,nt,l),C(e,S,l),c(re,S,null),t(S,Ut),t(S,Ve),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,ke),t(i,Bt),t(i,Pe),t(i,Wt),c(U,i,null),t(i,Zt),c(J,i,null),t(i,Gt),t(i,B),c(ie,B,null),t(B,qt),t(B,je),t(i,Rt),t(i,W),c(le,W,null),t(W,At),t(W,Ue),t(i,Ht),t(i,L),c(pe,L,null),t(L,Ft),t(L,Je),t(L,Yt),t(L,Be),t(L,zt),t(L,We),t(i,Qt),t(i,Z),c(me,Z,null),t(Z,Xt),t(Z,Ze),t(i,Kt),t(i,G),c(de,G,null),t(G,en),t(G,Ge),t(i,tn),t(i,q),c(ce,q,null),t(q,nn),t(q,qe),t(i,on),t(i,R),c(fe,R,null),t(R,rn),t(R,Re),t(i,sn),t(i,O),c(ue,O,null),t(O,an),t(O,Ae),t(O,ln),t(O,He),t(i,pn),t(i,A),c(ge,A,null),t(A,mn),t(A,Fe),t(i,dn),t(i,H),c(he,H,null),t(H,cn),t(H,Ye),t(i,fn),t(i,F),c(_e,F,null),t(F,un),t(F,ze),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}),U.$set($);const Ce={};l&2&&(Ce.$$scope={dirty:l,ctx:e}),J.$set(Ce)},i(e){pt||(f(T.$$.fragment,e),f(E.$$.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(U.$$.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(E.$$.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(U.$$.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(N),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(E,e),g(Q),g(X),g(K),g(ee),g(te),g(ne),g(oe,e),g(re),g(se,e),g(ae),g(U),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 Rn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class co extends An{constructor(_){super(),Hn(this,_,oo,to,qn,{})}}export{co as component};
