import{s as Rn,o as An,n as Fn}from"../chunks/scheduler.53228c21.js";import{S as Yn,i as zn,e as r,s as n,c as m,h as Qn,a as s,d as a,b as o,f as v,g as d,j as c,k as x,l as t,m as $,n as f,t as u,o as g,p as h}from"../chunks/index.100fac89.js";import{C as Xn}from"../chunks/CopyLLMTxtMenu.2cdbb51f.js";import{D as y}from"../chunks/Docstring.d46840f1.js";import{C as Kn}from"../chunks/CodeBlock.d30a6509.js";import{E as eo}from"../chunks/ExampleCodeBlock.220b4f6e.js";import{H as Xe,E as to}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.3fcbbc76.js";function no(Ke){let M,Y="Example:",E,w,D;return w=new Kn({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(){M=r("p"),M.textContent=Y,E=n(),m(w.$$.fragment)},l(C){M=s(C,"P",{"data-svelte-h":!0}),c(M)!=="svelte-11lpom8"&&(M.textContent=Y),E=o(C),d(w.$$.fragment,C)},m(C,L){$(C,M,L),$(C,E,L),f(w,C,L),D=!0},p:Fn,i(C){D||(u(w.$$.fragment,C),D=!0)},o(C){g(w.$$.fragment,C),D=!1},d(C){C&&(a(M),a(E)),h(w,C)}}}function oo(Ke){let M,Y,E,w,D,C,L,et,z,tt,_,Q,wt,Ce,_n="Specification for a pipeline component.",Dt,Me,xn="A component can be created in two ways:",Tt,we,vn="<li>From scratch using <strong>init</strong> with a config dict</li> <li>using <code>from_pretrained</code></li>",It,S,X,Lt,De,bn="Create component using from_config with config.",Et,V,K,Nt,Te,$n="Decode a load_id string back into a dictionary of loading fields and values.",Ot,T,ee,St,Ie,yn="Create a ComponentSpec from a Component.",Vt,Le,Cn="Currently supports:",kt,Ee,Mn="<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>",Pt,k,te,jt,Ne,wn="Load component using from_pretrained.",Ut,P,ne,Jt,Oe,Dn="Return the names of all loading‐related fields (i.e. those whose field.metadata[“loading”] is True).",nt,oe,ot,O,re,Bt,Se,Tn="Specification for a pipeline configuration parameter.",rt,se,st,i,ae,Wt,Ve,In="A central registry and management system for model components across multiple pipelines.",Zt,ke,Ln=`<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.`,qt,ie,En="<p>&gt; This is an experimental feature and is likely to change in the future.</p>",Gt,j,Ht,U,le,Rt,Pe,Nn="Add a component to the ComponentsManager.",At,J,pe,Ft,je,On="Disable automatic CPU offloading for all components.",Yt,I,me,zt,Ue,Sn="Enable automatic CPU offloading for all components.",Qt,Je,Vn="The algorithm works as follows:",Xt,Be,kn="<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>",Kt,B,de,en,We,Pn="Get components by a list of IDs.",tn,W,ce,nn,Ze,jn="Get components by a list of names, optionally filtered by collection.",on,Z,fe,rn,qe,Un="Get component IDs by a list of names, optionally filtered by collection.",sn,q,ue,an,Ge,Jn="Get comprehensive information about a component.",ln,N,ge,pn,He,Bn="Get a single component by either:",mn,Re,Wn=`<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>`,dn,G,he,cn,Ae,Zn="Remove a component from the ComponentsManager.",fn,H,_e,un,Fe,qn="Remove a component from a collection.",gn,R,xe,hn,Ye,Gn="Search components by name with simple pattern matching. Optionally filter by collection or load_id.",at,ve,it,be,$e,lt,ye,pt,Qe,mt;return D=new Xn({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),L=new Xe({props:{title:"Components and configs",local:"components-and-configs",headingTag:"h1"}}),z=new Xe({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 Xe({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 Xe({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"}}),j=new eo({props:{anchor:"diffusers.ComponentsManager.example",$$slots:{default:[no]},$$scope:{ctx:Ke}}}),le=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#L374",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>
`}}),pe=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#L729"}}),me=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#L682"}}),de=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#L1023",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>
`}}),ce=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#L1056",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>
`}}),fe=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#L1005",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>
`}}),ue=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#L746",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>
`}}),ge=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#L960",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>
`}}),he=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#L463"}}),_e=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#L445"}}),xe=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#L496",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 Xe({props:{title:"InsertableDict",local:"diffusers.modular_pipelines.InsertableDict",headingTag:"h2"}}),$e=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"}}),ye=new to({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/modular_diffusers/pipeline_components.md"}}),{c(){M=r("meta"),Y=n(),E=r("p"),w=n(),m(D.$$.fragment),C=n(),m(L.$$.fragment),et=n(),m(z.$$.fragment),tt=n(),_=r("div"),m(Q.$$.fragment),wt=n(),Ce=r("p"),Ce.textContent=_n,Dt=n(),Me=r("p"),Me.textContent=xn,Tt=n(),we=r("ol"),we.innerHTML=vn,It=n(),S=r("div"),m(X.$$.fragment),Lt=n(),De=r("p"),De.textContent=bn,Et=n(),V=r("div"),m(K.$$.fragment),Nt=n(),Te=r("p"),Te.textContent=$n,Ot=n(),T=r("div"),m(ee.$$.fragment),St=n(),Ie=r("p"),Ie.textContent=yn,Vt=n(),Le=r("p"),Le.textContent=Cn,kt=n(),Ee=r("ul"),Ee.innerHTML=Mn,Pt=n(),k=r("div"),m(te.$$.fragment),jt=n(),Ne=r("p"),Ne.textContent=wn,Ut=n(),P=r("div"),m(ne.$$.fragment),Jt=n(),Oe=r("p"),Oe.textContent=Dn,nt=n(),m(oe.$$.fragment),ot=n(),O=r("div"),m(re.$$.fragment),Bt=n(),Se=r("p"),Se.textContent=Tn,rt=n(),m(se.$$.fragment),st=n(),i=r("div"),m(ae.$$.fragment),Wt=n(),Ve=r("p"),Ve.textContent=In,Zt=n(),ke=r("p"),ke.innerHTML=Ln,qt=n(),ie=r("blockquote"),ie.innerHTML=En,Gt=n(),m(j.$$.fragment),Ht=n(),U=r("div"),m(le.$$.fragment),Rt=n(),Pe=r("p"),Pe.textContent=Nn,At=n(),J=r("div"),m(pe.$$.fragment),Ft=n(),je=r("p"),je.textContent=On,Yt=n(),I=r("div"),m(me.$$.fragment),zt=n(),Ue=r("p"),Ue.textContent=Sn,Qt=n(),Je=r("p"),Je.textContent=Vn,Xt=n(),Be=r("ol"),Be.innerHTML=kn,Kt=n(),B=r("div"),m(de.$$.fragment),en=n(),We=r("p"),We.textContent=Pn,tn=n(),W=r("div"),m(ce.$$.fragment),nn=n(),Ze=r("p"),Ze.textContent=jn,on=n(),Z=r("div"),m(fe.$$.fragment),rn=n(),qe=r("p"),qe.textContent=Un,sn=n(),q=r("div"),m(ue.$$.fragment),an=n(),Ge=r("p"),Ge.textContent=Jn,ln=n(),N=r("div"),m(ge.$$.fragment),pn=n(),He=r("p"),He.textContent=Bn,mn=n(),Re=r("ul"),Re.innerHTML=Wn,dn=n(),G=r("div"),m(he.$$.fragment),cn=n(),Ae=r("p"),Ae.textContent=Zn,fn=n(),H=r("div"),m(_e.$$.fragment),un=n(),Fe=r("p"),Fe.textContent=qn,gn=n(),R=r("div"),m(xe.$$.fragment),hn=n(),Ye=r("p"),Ye.textContent=Gn,at=n(),m(ve.$$.fragment),it=n(),be=r("div"),m($e.$$.fragment),lt=n(),m(ye.$$.fragment),pt=n(),Qe=r("p"),this.h()},l(e){const l=Qn("svelte-u9bgzb",document.head);M=s(l,"META",{name:!0,content:!0}),l.forEach(a),Y=o(e),E=s(e,"P",{}),v(E).forEach(a),w=o(e),d(D.$$.fragment,e),C=o(e),d(L.$$.fragment,e),et=o(e),d(z.$$.fragment,e),tt=o(e),_=s(e,"DIV",{class:!0});var b=v(_);d(Q.$$.fragment,b),wt=o(b),Ce=s(b,"P",{"data-svelte-h":!0}),c(Ce)!=="svelte-rg7py0"&&(Ce.textContent=_n),Dt=o(b),Me=s(b,"P",{"data-svelte-h":!0}),c(Me)!=="svelte-1fjrzl6"&&(Me.textContent=xn),Tt=o(b),we=s(b,"OL",{"data-svelte-h":!0}),c(we)!=="svelte-t74lz6"&&(we.innerHTML=vn),It=o(b),S=s(b,"DIV",{class:!0});var dt=v(S);d(X.$$.fragment,dt),Lt=o(dt),De=s(dt,"P",{"data-svelte-h":!0}),c(De)!=="svelte-1skqxe4"&&(De.textContent=bn),dt.forEach(a),Et=o(b),V=s(b,"DIV",{class:!0});var ct=v(V);d(K.$$.fragment,ct),Nt=o(ct),Te=s(ct,"P",{"data-svelte-h":!0}),c(Te)!=="svelte-yd5k4j"&&(Te.textContent=$n),ct.forEach(a),Ot=o(b),T=s(b,"DIV",{class:!0});var A=v(T);d(ee.$$.fragment,A),St=o(A),Ie=s(A,"P",{"data-svelte-h":!0}),c(Ie)!=="svelte-1io88ln"&&(Ie.textContent=yn),Vt=o(A),Le=s(A,"P",{"data-svelte-h":!0}),c(Le)!=="svelte-1b3e5l8"&&(Le.textContent=Cn),kt=o(A),Ee=s(A,"UL",{"data-svelte-h":!0}),c(Ee)!=="svelte-4gx39s"&&(Ee.innerHTML=Mn),A.forEach(a),Pt=o(b),k=s(b,"DIV",{class:!0});var ft=v(k);d(te.$$.fragment,ft),jt=o(ft),Ne=s(ft,"P",{"data-svelte-h":!0}),c(Ne)!=="svelte-1a0mgic"&&(Ne.textContent=wn),ft.forEach(a),Ut=o(b),P=s(b,"DIV",{class:!0});var ut=v(P);d(ne.$$.fragment,ut),Jt=o(ut),Oe=s(ut,"P",{"data-svelte-h":!0}),c(Oe)!=="svelte-1d19e9d"&&(Oe.textContent=Dn),ut.forEach(a),b.forEach(a),nt=o(e),d(oe.$$.fragment,e),ot=o(e),O=s(e,"DIV",{class:!0});var gt=v(O);d(re.$$.fragment,gt),Bt=o(gt),Se=s(gt,"P",{"data-svelte-h":!0}),c(Se)!=="svelte-tkt13y"&&(Se.textContent=Tn),gt.forEach(a),rt=o(e),d(se.$$.fragment,e),st=o(e),i=s(e,"DIV",{class:!0});var p=v(i);d(ae.$$.fragment,p),Wt=o(p),Ve=s(p,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-12zga2o"&&(Ve.textContent=In),Zt=o(p),ke=s(p,"P",{"data-svelte-h":!0}),c(ke)!=="svelte-3yysai"&&(ke.innerHTML=Ln),qt=o(p),ie=s(p,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(ie)!=="svelte-1o9sbyc"&&(ie.innerHTML=En),Gt=o(p),d(j.$$.fragment,p),Ht=o(p),U=s(p,"DIV",{class:!0});var ht=v(U);d(le.$$.fragment,ht),Rt=o(ht),Pe=s(ht,"P",{"data-svelte-h":!0}),c(Pe)!=="svelte-1efcbti"&&(Pe.textContent=Nn),ht.forEach(a),At=o(p),J=s(p,"DIV",{class:!0});var _t=v(J);d(pe.$$.fragment,_t),Ft=o(_t),je=s(_t,"P",{"data-svelte-h":!0}),c(je)!=="svelte-13yhxq2"&&(je.textContent=On),_t.forEach(a),Yt=o(p),I=s(p,"DIV",{class:!0});var F=v(I);d(me.$$.fragment,F),zt=o(F),Ue=s(F,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-16h8j23"&&(Ue.textContent=Sn),Qt=o(F),Je=s(F,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-2s8rs4"&&(Je.textContent=Vn),Xt=o(F),Be=s(F,"OL",{"data-svelte-h":!0}),c(Be)!=="svelte-ju3amt"&&(Be.innerHTML=kn),F.forEach(a),Kt=o(p),B=s(p,"DIV",{class:!0});var xt=v(B);d(de.$$.fragment,xt),en=o(xt),We=s(xt,"P",{"data-svelte-h":!0}),c(We)!=="svelte-l3gs77"&&(We.textContent=Pn),xt.forEach(a),tn=o(p),W=s(p,"DIV",{class:!0});var vt=v(W);d(ce.$$.fragment,vt),nn=o(vt),Ze=s(vt,"P",{"data-svelte-h":!0}),c(Ze)!=="svelte-f2egka"&&(Ze.textContent=jn),vt.forEach(a),on=o(p),Z=s(p,"DIV",{class:!0});var bt=v(Z);d(fe.$$.fragment,bt),rn=o(bt),qe=s(bt,"P",{"data-svelte-h":!0}),c(qe)!=="svelte-wy2xsr"&&(qe.textContent=Un),bt.forEach(a),sn=o(p),q=s(p,"DIV",{class:!0});var $t=v(q);d(ue.$$.fragment,$t),an=o($t),Ge=s($t,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-180fv61"&&(Ge.textContent=Jn),$t.forEach(a),ln=o(p),N=s(p,"DIV",{class:!0});var ze=v(N);d(ge.$$.fragment,ze),pn=o(ze),He=s(ze,"P",{"data-svelte-h":!0}),c(He)!=="svelte-1spaopm"&&(He.textContent=Bn),mn=o(ze),Re=s(ze,"UL",{"data-svelte-h":!0}),c(Re)!=="svelte-1pkakir"&&(Re.innerHTML=Wn),ze.forEach(a),dn=o(p),G=s(p,"DIV",{class:!0});var yt=v(G);d(he.$$.fragment,yt),cn=o(yt),Ae=s(yt,"P",{"data-svelte-h":!0}),c(Ae)!=="svelte-57h0qa"&&(Ae.textContent=Zn),yt.forEach(a),fn=o(p),H=s(p,"DIV",{class:!0});var Ct=v(H);d(_e.$$.fragment,Ct),un=o(Ct),Fe=s(Ct,"P",{"data-svelte-h":!0}),c(Fe)!=="svelte-x54sx9"&&(Fe.textContent=qn),Ct.forEach(a),gn=o(p),R=s(p,"DIV",{class:!0});var Mt=v(R);d(xe.$$.fragment,Mt),hn=o(Mt),Ye=s(Mt,"P",{"data-svelte-h":!0}),c(Ye)!=="svelte-6gf3km"&&(Ye.textContent=Gn),Mt.forEach(a),p.forEach(a),at=o(e),d(ve.$$.fragment,e),it=o(e),be=s(e,"DIV",{class:!0});var Hn=v(be);d($e.$$.fragment,Hn),Hn.forEach(a),lt=o(e),d(ye.$$.fragment,e),pt=o(e),Qe=s(e,"P",{}),v(Qe).forEach(a),this.h()},h(){x(M,"name","hf:doc:metadata"),x(M,"content",ro),x(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(ie,"class","warning"),x(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(i,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(be,"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,M),$(e,Y,l),$(e,E,l),$(e,w,l),f(D,e,l),$(e,C,l),f(L,e,l),$(e,et,l),f(z,e,l),$(e,tt,l),$(e,_,l),f(Q,_,null),t(_,wt),t(_,Ce),t(_,Dt),t(_,Me),t(_,Tt),t(_,we),t(_,It),t(_,S),f(X,S,null),t(S,Lt),t(S,De),t(_,Et),t(_,V),f(K,V,null),t(V,Nt),t(V,Te),t(_,Ot),t(_,T),f(ee,T,null),t(T,St),t(T,Ie),t(T,Vt),t(T,Le),t(T,kt),t(T,Ee),t(_,Pt),t(_,k),f(te,k,null),t(k,jt),t(k,Ne),t(_,Ut),t(_,P),f(ne,P,null),t(P,Jt),t(P,Oe),$(e,nt,l),f(oe,e,l),$(e,ot,l),$(e,O,l),f(re,O,null),t(O,Bt),t(O,Se),$(e,rt,l),f(se,e,l),$(e,st,l),$(e,i,l),f(ae,i,null),t(i,Wt),t(i,Ve),t(i,Zt),t(i,ke),t(i,qt),t(i,ie),t(i,Gt),f(j,i,null),t(i,Ht),t(i,U),f(le,U,null),t(U,Rt),t(U,Pe),t(i,At),t(i,J),f(pe,J,null),t(J,Ft),t(J,je),t(i,Yt),t(i,I),f(me,I,null),t(I,zt),t(I,Ue),t(I,Qt),t(I,Je),t(I,Xt),t(I,Be),t(i,Kt),t(i,B),f(de,B,null),t(B,en),t(B,We),t(i,tn),t(i,W),f(ce,W,null),t(W,nn),t(W,Ze),t(i,on),t(i,Z),f(fe,Z,null),t(Z,rn),t(Z,qe),t(i,sn),t(i,q),f(ue,q,null),t(q,an),t(q,Ge),t(i,ln),t(i,N),f(ge,N,null),t(N,pn),t(N,He),t(N,mn),t(N,Re),t(i,dn),t(i,G),f(he,G,null),t(G,cn),t(G,Ae),t(i,fn),t(i,H),f(_e,H,null),t(H,un),t(H,Fe),t(i,gn),t(i,R),f(xe,R,null),t(R,hn),t(R,Ye),$(e,at,l),f(ve,e,l),$(e,it,l),$(e,be,l),f($e,be,null),$(e,lt,l),f(ye,e,l),$(e,pt,l),$(e,Qe,l),mt=!0},p(e,[l]){const b={};l&2&&(b.$$scope={dirty:l,ctx:e}),j.$set(b)},i(e){mt||(u(D.$$.fragment,e),u(L.$$.fragment,e),u(z.$$.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(j.$$.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(xe.$$.fragment,e),u(ve.$$.fragment,e),u($e.$$.fragment,e),u(ye.$$.fragment,e),mt=!0)},o(e){g(D.$$.fragment,e),g(L.$$.fragment,e),g(z.$$.fragment,e),g(Q.$$.fragment,e),g(X.$$.fragment,e),g(K.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(ne.$$.fragment,e),g(oe.$$.fragment,e),g(re.$$.fragment,e),g(se.$$.fragment,e),g(ae.$$.fragment,e),g(j.$$.fragment,e),g(le.$$.fragment,e),g(pe.$$.fragment,e),g(me.$$.fragment,e),g(de.$$.fragment,e),g(ce.$$.fragment,e),g(fe.$$.fragment,e),g(ue.$$.fragment,e),g(ge.$$.fragment,e),g(he.$$.fragment,e),g(_e.$$.fragment,e),g(xe.$$.fragment,e),g(ve.$$.fragment,e),g($e.$$.fragment,e),g(ye.$$.fragment,e),mt=!1},d(e){e&&(a(Y),a(E),a(w),a(C),a(et),a(tt),a(_),a(nt),a(ot),a(O),a(rt),a(st),a(i),a(at),a(it),a(be),a(lt),a(pt),a(Qe)),a(M),h(D,e),h(L,e),h(z,e),h(Q),h(X),h(K),h(ee),h(te),h(ne),h(oe,e),h(re),h(se,e),h(ae),h(j),h(le),h(pe),h(me),h(de),h(ce),h(fe),h(ue),h(ge),h(he),h(_e),h(xe),h(ve,e),h($e),h(ye,e)}}}const ro='{"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 so(Ke){return An(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class uo extends Yn{constructor(M){super(),zn(this,M,so,oo,Rn,{})}}export{uo as component};
