import{s as Ct,n as Mt,o as qt}from"../chunks/scheduler.53228c21.js";import{S as Tt,i as wt,e as l,s as i,c as u,h as St,a as r,d as s,b as n,f as P,g as d,j as c,k as h,l as t,m as p,n as m,t as f,o as g,p as b}from"../chunks/index.100fac89.js";import{C as Dt}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{D as B}from"../chunks/Docstring.db856a1e.js";import{H as _e,E as Et}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function At(at){let L,he,ge,ke,E,$e,A,ve,H,Pe,a,O,Ie,te,pt=`Base class for all Pipeline Blocks: PipelineBlock, AutoPipelineBlocks, SequentialPipelineBlocks,
LoopSequentialPipelineBlocks`,Ve,ie,ct='<a href="/docs/diffusers/main/en/api/modular_diffusers/pipeline_blocks#diffusers.ModularPipelineBlocks">ModularPipelineBlocks</a> provides method to load and save the definition of pipeline blocks.',Ne,I,ut="<p>&gt; This is an experimental feature and is likely to change in the future.</p>",Ue,C,V,je,ne,dt=`Combines multiple lists of InputParam objects from different blocks. For duplicate inputs, updates only if
current default value is None and new default value is not None. Warns if multiple non-None default values
exist for the same input.`,Ke,M,N,Qe,se,mt=`Combines multiple lists of OutputParam objects from different blocks. For duplicate outputs, keeps the first
occurrence of each output name.`,ze,q,U,Fe,le,ft="Get all inputs and intermediates in one dictionary",We,T,j,Ge,re,gt="create a ModularPipeline, optionally accept modular_repo to load from hub.",xe,K,ye,k,Q,Re,oe,bt=`A Pipeline Blocks that combines multiple pipeline block classes into one. When called, it will call each block in
sequence.`,Je,ae,_t=`This class inherits from <a href="/docs/diffusers/main/en/api/modular_diffusers/pipeline_blocks#diffusers.ModularPipelineBlocks">ModularPipelineBlocks</a>. Check the superclass documentation for the generic methods the
library implements for all the pipeline blocks (such as loading or saving etc.)`,Xe,z,ht="<p>&gt; This is an experimental feature and is likely to change in the future.</p>",Ye,w,F,Ze,pe,kt="Creates a SequentialPipelineBlocks instance from a dictionary of blocks.",Be,W,Le,$,G,et,ce,$t=`A Pipeline blocks that combines multiple pipeline block classes into a For Loop. When called, it will call each
block in sequence.`,tt,ue,vt=`This class inherits from <a href="/docs/diffusers/main/en/api/modular_diffusers/pipeline_blocks#diffusers.ModularPipelineBlocks">ModularPipelineBlocks</a>. Check the superclass documentation for the generic methods the
library implements for all the pipeline blocks (such as loading or saving etc.)`,it,R,Pt="<p>&gt; This is an experimental feature and is likely to change in the future.</p>",nt,S,J,st,de,xt="Creates a LoopSequentialPipelineBlocks instance from a dictionary of blocks.",Ce,X,Me,v,Y,lt,me,yt="A Pipeline Blocks that automatically selects a block to run based on the inputs.",rt,fe,Bt=`This class inherits from <a href="/docs/diffusers/main/en/api/modular_diffusers/pipeline_blocks#diffusers.ModularPipelineBlocks">ModularPipelineBlocks</a>. Check the superclass documentation for the generic methods the
library implements for all the pipeline blocks (such as loading or saving etc.)`,ot,Z,Lt="<p>&gt; This is an experimental feature and is likely to change in the future.</p>",qe,ee,Te,be,we;return E=new Dt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),A=new _e({props:{title:"Pipeline blocks",local:"pipeline-blocks",headingTag:"h1"}}),H=new _e({props:{title:"ModularPipelineBlocks",local:"diffusers.ModularPipelineBlocks",headingTag:"h2"}}),O=new B({props:{name:"class diffusers.ModularPipelineBlocks",anchor:"diffusers.ModularPipelineBlocks",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L223"}}),V=new B({props:{name:"combine_inputs",anchor:"diffusers.ModularPipelineBlocks.combine_inputs",parameters:[{name:"*named_input_lists",val:": typing.List[typing.Tuple[str, typing.List[diffusers.modular_pipelines.modular_pipeline_utils.InputParam]]]"}],parametersDescription:[{anchor:"diffusers.ModularPipelineBlocks.combine_inputs.named_input_lists",description:"<strong>named_input_lists</strong> &#x2014; List of tuples containing (block_name, input_param_list) pairs",name:"named_input_lists"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L428",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Combined list of unique InputParam objects</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List[InputParam]</p>
`}}),N=new B({props:{name:"combine_outputs",anchor:"diffusers.ModularPipelineBlocks.combine_outputs",parameters:[{name:"*named_output_lists",val:": typing.List[typing.Tuple[str, typing.List[diffusers.modular_pipelines.modular_pipeline_utils.OutputParam]]]"}],parametersDescription:[{anchor:"diffusers.ModularPipelineBlocks.combine_outputs.named_output_lists",description:"<strong>named_output_lists</strong> &#x2014; List of tuples containing (block_name, output_param_list) pairs",name:"named_output_lists"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L471",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Combined list of unique OutputParam objects</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List[OutputParam]</p>
`}}),U=new B({props:{name:"get_block_state",anchor:"diffusers.ModularPipelineBlocks.get_block_state",parameters:[{name:"state",val:": PipelineState"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L371"}}),j=new B({props:{name:"init_pipeline",anchor:"diffusers.ModularPipelineBlocks.init_pipeline",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"components_manager",val:": typing.Optional[diffusers.modular_pipelines.components_manager.ComponentsManager] = None"},{name:"collection",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L350"}}),K=new _e({props:{title:"SequentialPipelineBlocks",local:"diffusers.modular_pipelines.SequentialPipelineBlocks",headingTag:"h2"}}),Q=new B({props:{name:"class diffusers.modular_pipelines.SequentialPipelineBlocks",anchor:"diffusers.modular_pipelines.SequentialPipelineBlocks",parameters:[],parametersDescription:[{anchor:"diffusers.modular_pipelines.SequentialPipelineBlocks.block_classes",description:"<strong>block_classes</strong> &#x2014; List of block classes to be used",name:"block_classes"},{anchor:"diffusers.modular_pipelines.SequentialPipelineBlocks.block_names",description:"<strong>block_names</strong> &#x2014; List of prefixes for each block",name:"block_names"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L775"}}),F=new B({props:{name:"from_blocks_dict",anchor:"diffusers.modular_pipelines.SequentialPipelineBlocks.from_blocks_dict",parameters:[{name:"blocks_dict",val:": typing.Dict[str, typing.Any]"},{name:"description",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.modular_pipelines.SequentialPipelineBlocks.from_blocks_dict.blocks_dict",description:"<strong>blocks_dict</strong> &#x2014; Dictionary mapping block names to block classes or instances",name:"blocks_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L819",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A new SequentialPipelineBlocks instance</p>
`}}),W=new _e({props:{title:"LoopSequentialPipelineBlocks",local:"diffusers.modular_pipelines.LoopSequentialPipelineBlocks",headingTag:"h2"}}),G=new B({props:{name:"class diffusers.modular_pipelines.LoopSequentialPipelineBlocks",anchor:"diffusers.modular_pipelines.LoopSequentialPipelineBlocks",parameters:[],parametersDescription:[{anchor:"diffusers.modular_pipelines.LoopSequentialPipelineBlocks.block_classes",description:"<strong>block_classes</strong> &#x2014; List of block classes to be used",name:"block_classes"},{anchor:"diffusers.modular_pipelines.LoopSequentialPipelineBlocks.block_names",description:"<strong>block_names</strong> &#x2014; List of prefixes for each block",name:"block_names"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L1130"}}),J=new B({props:{name:"from_blocks_dict",anchor:"diffusers.modular_pipelines.LoopSequentialPipelineBlocks.from_blocks_dict",parameters:[{name:"blocks_dict",val:": typing.Dict[str, typing.Any]"}],parametersDescription:[{anchor:"diffusers.modular_pipelines.LoopSequentialPipelineBlocks.from_blocks_dict.blocks_dict",description:"<strong>blocks_dict</strong> &#x2014; Dictionary mapping block names to block instances",name:"blocks_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L1282",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A new LoopSequentialPipelineBlocks instance</p>
`}}),X=new _e({props:{title:"AutoPipelineBlocks",local:"diffusers.modular_pipelines.AutoPipelineBlocks",headingTag:"h2"}}),Y=new B({props:{name:"class diffusers.modular_pipelines.AutoPipelineBlocks",anchor:"diffusers.modular_pipelines.AutoPipelineBlocks",parameters:[],parametersDescription:[{anchor:"diffusers.modular_pipelines.AutoPipelineBlocks.block_classes",description:"<strong>block_classes</strong> &#x2014; List of block classes to be used",name:"block_classes"},{anchor:"diffusers.modular_pipelines.AutoPipelineBlocks.block_names",description:"<strong>block_names</strong> &#x2014; List of prefixes for each block",name:"block_names"},{anchor:"diffusers.modular_pipelines.AutoPipelineBlocks.block_trigger_inputs",description:"<strong>block_trigger_inputs</strong> &#x2014; List of input names that trigger specific blocks, with None for default",name:"block_trigger_inputs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L518"}}),ee=new Et({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/modular_diffusers/pipeline_blocks.md"}}),{c(){L=l("meta"),he=i(),ge=l("p"),ke=i(),u(E.$$.fragment),$e=i(),u(A.$$.fragment),ve=i(),u(H.$$.fragment),Pe=i(),a=l("div"),u(O.$$.fragment),Ie=i(),te=l("p"),te.textContent=pt,Ve=i(),ie=l("p"),ie.innerHTML=ct,Ne=i(),I=l("blockquote"),I.innerHTML=ut,Ue=i(),C=l("div"),u(V.$$.fragment),je=i(),ne=l("p"),ne.textContent=dt,Ke=i(),M=l("div"),u(N.$$.fragment),Qe=i(),se=l("p"),se.textContent=mt,ze=i(),q=l("div"),u(U.$$.fragment),Fe=i(),le=l("p"),le.textContent=ft,We=i(),T=l("div"),u(j.$$.fragment),Ge=i(),re=l("p"),re.textContent=gt,xe=i(),u(K.$$.fragment),ye=i(),k=l("div"),u(Q.$$.fragment),Re=i(),oe=l("p"),oe.textContent=bt,Je=i(),ae=l("p"),ae.innerHTML=_t,Xe=i(),z=l("blockquote"),z.innerHTML=ht,Ye=i(),w=l("div"),u(F.$$.fragment),Ze=i(),pe=l("p"),pe.textContent=kt,Be=i(),u(W.$$.fragment),Le=i(),$=l("div"),u(G.$$.fragment),et=i(),ce=l("p"),ce.textContent=$t,tt=i(),ue=l("p"),ue.innerHTML=vt,it=i(),R=l("blockquote"),R.innerHTML=Pt,nt=i(),S=l("div"),u(J.$$.fragment),st=i(),de=l("p"),de.textContent=xt,Ce=i(),u(X.$$.fragment),Me=i(),v=l("div"),u(Y.$$.fragment),lt=i(),me=l("p"),me.textContent=yt,rt=i(),fe=l("p"),fe.innerHTML=Bt,ot=i(),Z=l("blockquote"),Z.innerHTML=Lt,qe=i(),u(ee.$$.fragment),Te=i(),be=l("p"),this.h()},l(e){const o=St("svelte-u9bgzb",document.head);L=r(o,"META",{name:!0,content:!0}),o.forEach(s),he=n(e),ge=r(e,"P",{}),P(ge).forEach(s),ke=n(e),d(E.$$.fragment,e),$e=n(e),d(A.$$.fragment,e),ve=n(e),d(H.$$.fragment,e),Pe=n(e),a=r(e,"DIV",{class:!0});var _=P(a);d(O.$$.fragment,_),Ie=n(_),te=r(_,"P",{"data-svelte-h":!0}),c(te)!=="svelte-1ybinb5"&&(te.textContent=pt),Ve=n(_),ie=r(_,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-19gwvnw"&&(ie.innerHTML=ct),Ne=n(_),I=r(_,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(I)!=="svelte-1o9sbyc"&&(I.innerHTML=ut),Ue=n(_),C=r(_,"DIV",{class:!0});var Se=P(C);d(V.$$.fragment,Se),je=n(Se),ne=r(Se,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-dsbw8b"&&(ne.textContent=dt),Se.forEach(s),Ke=n(_),M=r(_,"DIV",{class:!0});var De=P(M);d(N.$$.fragment,De),Qe=n(De),se=r(De,"P",{"data-svelte-h":!0}),c(se)!=="svelte-1vgldo9"&&(se.textContent=mt),De.forEach(s),ze=n(_),q=r(_,"DIV",{class:!0});var Ee=P(q);d(U.$$.fragment,Ee),Fe=n(Ee),le=r(Ee,"P",{"data-svelte-h":!0}),c(le)!=="svelte-ns4rx6"&&(le.textContent=ft),Ee.forEach(s),We=n(_),T=r(_,"DIV",{class:!0});var Ae=P(T);d(j.$$.fragment,Ae),Ge=n(Ae),re=r(Ae,"P",{"data-svelte-h":!0}),c(re)!=="svelte-15wihnx"&&(re.textContent=gt),Ae.forEach(s),_.forEach(s),xe=n(e),d(K.$$.fragment,e),ye=n(e),k=r(e,"DIV",{class:!0});var x=P(k);d(Q.$$.fragment,x),Re=n(x),oe=r(x,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-h3uxr5"&&(oe.textContent=bt),Je=n(x),ae=r(x,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-10smrt2"&&(ae.innerHTML=_t),Xe=n(x),z=r(x,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(z)!=="svelte-1o9sbyc"&&(z.innerHTML=ht),Ye=n(x),w=r(x,"DIV",{class:!0});var He=P(w);d(F.$$.fragment,He),Ze=n(He),pe=r(He,"P",{"data-svelte-h":!0}),c(pe)!=="svelte-xcg3si"&&(pe.textContent=kt),He.forEach(s),x.forEach(s),Be=n(e),d(W.$$.fragment,e),Le=n(e),$=r(e,"DIV",{class:!0});var y=P($);d(G.$$.fragment,y),et=n(y),ce=r(y,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-2g3rr3"&&(ce.textContent=$t),tt=n(y),ue=r(y,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-10smrt2"&&(ue.innerHTML=vt),it=n(y),R=r(y,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(R)!=="svelte-1o9sbyc"&&(R.innerHTML=Pt),nt=n(y),S=r(y,"DIV",{class:!0});var Oe=P(S);d(J.$$.fragment,Oe),st=n(Oe),de=r(Oe,"P",{"data-svelte-h":!0}),c(de)!=="svelte-136wcu4"&&(de.textContent=xt),Oe.forEach(s),y.forEach(s),Ce=n(e),d(X.$$.fragment,e),Me=n(e),v=r(e,"DIV",{class:!0});var D=P(v);d(Y.$$.fragment,D),lt=n(D),me=r(D,"P",{"data-svelte-h":!0}),c(me)!=="svelte-59lz4"&&(me.textContent=yt),rt=n(D),fe=r(D,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-10smrt2"&&(fe.innerHTML=Bt),ot=n(D),Z=r(D,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(Z)!=="svelte-1o9sbyc"&&(Z.innerHTML=Lt),D.forEach(s),qe=n(e),d(ee.$$.fragment,e),Te=n(e),be=r(e,"P",{}),P(be).forEach(s),this.h()},h(){h(L,"name","hf:doc:metadata"),h(L,"content",Ht),h(I,"class","warning"),h(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(a,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(z,"class","warning"),h(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(R,"class","warning"),h(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Z,"class","warning"),h(v,"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,o){t(document.head,L),p(e,he,o),p(e,ge,o),p(e,ke,o),m(E,e,o),p(e,$e,o),m(A,e,o),p(e,ve,o),m(H,e,o),p(e,Pe,o),p(e,a,o),m(O,a,null),t(a,Ie),t(a,te),t(a,Ve),t(a,ie),t(a,Ne),t(a,I),t(a,Ue),t(a,C),m(V,C,null),t(C,je),t(C,ne),t(a,Ke),t(a,M),m(N,M,null),t(M,Qe),t(M,se),t(a,ze),t(a,q),m(U,q,null),t(q,Fe),t(q,le),t(a,We),t(a,T),m(j,T,null),t(T,Ge),t(T,re),p(e,xe,o),m(K,e,o),p(e,ye,o),p(e,k,o),m(Q,k,null),t(k,Re),t(k,oe),t(k,Je),t(k,ae),t(k,Xe),t(k,z),t(k,Ye),t(k,w),m(F,w,null),t(w,Ze),t(w,pe),p(e,Be,o),m(W,e,o),p(e,Le,o),p(e,$,o),m(G,$,null),t($,et),t($,ce),t($,tt),t($,ue),t($,it),t($,R),t($,nt),t($,S),m(J,S,null),t(S,st),t(S,de),p(e,Ce,o),m(X,e,o),p(e,Me,o),p(e,v,o),m(Y,v,null),t(v,lt),t(v,me),t(v,rt),t(v,fe),t(v,ot),t(v,Z),p(e,qe,o),m(ee,e,o),p(e,Te,o),p(e,be,o),we=!0},p:Mt,i(e){we||(f(E.$$.fragment,e),f(A.$$.fragment,e),f(H.$$.fragment,e),f(O.$$.fragment,e),f(V.$$.fragment,e),f(N.$$.fragment,e),f(U.$$.fragment,e),f(j.$$.fragment,e),f(K.$$.fragment,e),f(Q.$$.fragment,e),f(F.$$.fragment,e),f(W.$$.fragment,e),f(G.$$.fragment,e),f(J.$$.fragment,e),f(X.$$.fragment,e),f(Y.$$.fragment,e),f(ee.$$.fragment,e),we=!0)},o(e){g(E.$$.fragment,e),g(A.$$.fragment,e),g(H.$$.fragment,e),g(O.$$.fragment,e),g(V.$$.fragment,e),g(N.$$.fragment,e),g(U.$$.fragment,e),g(j.$$.fragment,e),g(K.$$.fragment,e),g(Q.$$.fragment,e),g(F.$$.fragment,e),g(W.$$.fragment,e),g(G.$$.fragment,e),g(J.$$.fragment,e),g(X.$$.fragment,e),g(Y.$$.fragment,e),g(ee.$$.fragment,e),we=!1},d(e){e&&(s(he),s(ge),s(ke),s($e),s(ve),s(Pe),s(a),s(xe),s(ye),s(k),s(Be),s(Le),s($),s(Ce),s(Me),s(v),s(qe),s(Te),s(be)),s(L),b(E,e),b(A,e),b(H,e),b(O),b(V),b(N),b(U),b(j),b(K,e),b(Q),b(F),b(W,e),b(G),b(J),b(X,e),b(Y),b(ee,e)}}}const Ht='{"title":"Pipeline blocks","local":"pipeline-blocks","sections":[{"title":"ModularPipelineBlocks","local":"diffusers.ModularPipelineBlocks","sections":[],"depth":2},{"title":"SequentialPipelineBlocks","local":"diffusers.modular_pipelines.SequentialPipelineBlocks","sections":[],"depth":2},{"title":"LoopSequentialPipelineBlocks","local":"diffusers.modular_pipelines.LoopSequentialPipelineBlocks","sections":[],"depth":2},{"title":"AutoPipelineBlocks","local":"diffusers.modular_pipelines.AutoPipelineBlocks","sections":[],"depth":2}],"depth":1}';function Ot(at){return qt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kt extends Tt{constructor(L){super(),wt(this,L,Ot,At,Ct,{})}}export{Kt as component};
