Buckets:

HuggingFaceDocBuilder's picture
download
raw
8.08 kB
import"../chunks/DsnmJJEf.js";import{i as z,h as I,C as K,H as m,D as t,E as O,s as R}from"../chunks/BtE7mKSK.js";import{p as U,o as j,s as e,f as F,a as P,b as J,c as r,d as L,n as a,r as i}from"../chunks/jDjavuwI.js";const Q='{"title":"Pipeline states","local":"pipeline-states","sections":[{"title":"PipelineState","local":"diffusers.modular_pipelines.PipelineState","sections":[],"depth":2},{"title":"BlockState","local":"diffusers.modular_pipelines.BlockState","sections":[],"depth":2}],"depth":1}';var V=L('<meta name="hf:doc:metadata"/>'),W=L(`<p></p> <!> <!> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p><code>PipelineState</code> stores the state of a pipeline. It is used to pass data between pipeline blocks.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Get one or multiple values from the pipeline state.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Get all values with matching kwargs_type.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>All values visible from the active scopes, innermost scope winning on name collisions.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Context manager for a loop-local scope: values set with <code>set_local</code> (e.g. the current timestep) resolve
blocks’ declared inputs while the scope is active and are discarded when it exits.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Add a value to the pipeline state.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Set a value in the innermost loop-local scope (requires an active scope).</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Convert PipelineState to a dictionary.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Container for block state data with attribute access and formatted representation.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Convert BlockState to a dictionary.</p></div></div> <!> <p></p>`,1);function $(T,A){U(A,!1),j(()=>{new URLSearchParams(window.location.search).get("fw")}),z();var f=W();I("15gtuvy",S=>{var w=V();R(w,"content",Q),P(S,w)});var g=e(F(f),2);K(g,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var v=e(g,2);m(v,{title:"Pipeline states",local:"pipeline-states",headingTag:"h1"});var _=e(v,2);m(_,{title:"PipelineState",local:"diffusers.modular_pipelines.PipelineState",headingTag:"h2"});var s=e(_,2),h=r(s);t(h,{name:"class diffusers.modular_pipelines.PipelineState",anchor:"diffusers.modular_pipelines.PipelineState",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L148",parameters:[{name:"values",val:": dict = <factory>"},{name:"kwargs_mapping",val:": dict = <factory>"},{name:"scopes",val:": list = <factory>"}]});var o=e(h,4),D=r(o);t(D,{name:"get",anchor:"diffusers.modular_pipelines.PipelineState.get",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L199",parameters:[{name:"keys",val:": str | list[str]"},{name:"default",val:": typing.Any = None"}],parametersDescription:[{anchor:"diffusers.modular_pipelines.PipelineState.get.keys",description:"<strong>keys</strong> (str | list[str]) &#x2014; Key or list of keys for the values",name:"keys"},{anchor:"diffusers.modular_pipelines.PipelineState.get.default",description:"<strong>default</strong> (Any) &#x2014; The default value to return if not found",name:"default"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>Single value if keys is str, dictionary of values if keys is list</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p>Any | dict[str, Any]</p>
`}),a(2),i(o);var n=e(o,2),B=r(n);t(B,{name:"get_by_kwargs",anchor:"diffusers.modular_pipelines.PipelineState.get_by_kwargs",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L214",parameters:[{name:"kwargs_type",val:": str"}],parametersDescription:[{anchor:"diffusers.modular_pipelines.PipelineState.get_by_kwargs.kwargs_type",description:"<strong>kwargs_type</strong> (str) &#x2014; The kwargs_type to filter by",name:"kwargs_type"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>Dictionary of values with matching kwargs_type</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p>dict[str, Any]</p>
`}),a(2),i(n);var l=e(n,2),C=r(l);t(C,{name:"local_values",anchor:"diffusers.modular_pipelines.PipelineState.local_values",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L175",parameters:[]}),a(2),i(l);var p=e(l,2),G=r(p);t(G,{name:"loop_scope",anchor:"diffusers.modular_pipelines.PipelineState.loop_scope",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L159",parameters:[]}),a(2),i(p);var d=e(p,2),M=r(d);t(M,{name:"set",anchor:"diffusers.modular_pipelines.PipelineState.set",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L182",parameters:[{name:"key",val:": str"},{name:"value",val:": typing.Any"},{name:"kwargs_type",val:": str = None"}],parametersDescription:[{anchor:"diffusers.modular_pipelines.PipelineState.set.key",description:"<strong>key</strong> (str) &#x2014; The key for the value",name:"key"},{anchor:"diffusers.modular_pipelines.PipelineState.set.value",description:"<strong>value</strong> (Any) &#x2014; The value to store",name:"value"},{anchor:"diffusers.modular_pipelines.PipelineState.set.kwargs_type",description:"<strong>kwargs_type</strong> (str) &#x2014; The kwargs_type with which the value is associated",name:"kwargs_type"}]}),a(2),i(d);var c=e(d,2),E=r(c);t(E,{name:"set_local",anchor:"diffusers.modular_pipelines.PipelineState.set_local",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L169",parameters:[{name:"key",val:": str"},{name:"value",val:": typing.Any"}]}),a(2),i(c);var b=e(c,2),H=r(b);t(H,{name:"to_dict",anchor:"diffusers.modular_pipelines.PipelineState.to_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L227",parameters:[]}),a(2),i(b),i(s);var y=e(s,2);m(y,{title:"BlockState",local:"diffusers.modular_pipelines.BlockState",headingTag:"h2"});var u=e(y,2),k=r(u);t(k,{name:"class diffusers.modular_pipelines.BlockState",anchor:"diffusers.modular_pipelines.BlockState",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L264",parameters:[{name:"**kwargs",val:""}]});var x=e(k,4),N=r(x);t(N,{name:"as_dict",anchor:"diffusers.modular_pipelines.BlockState.as_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14159/src/diffusers/modular_pipelines/modular_pipeline.py#L281",parameters:[],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>Dictionary containing all attributes of the BlockState</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p>dict[str, Any]</p>
`}),a(2),i(x),i(u);var q=e(u,2);O(q,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/modular_diffusers/pipeline_states.md"}),a(2),P(T,f),J()}export{$ as component};

Xet Storage Details

Size:
8.08 kB
·
Xet hash:
7a7c376ff424d9382f0fa71081ee7b0bea88e7f4306ffd7f9fe37e8a9fc40ad2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.