Buckets:
| import{s as Qe,o as Re,n as Ye}from"../chunks/scheduler.8c3d61f6.js";import{S as Ke,i as et,g as a,s as i,r as g,A as tt,h as l,f as n,c as s,j as P,u,x as y,k,y as t,a as d,v as h,d as _,t as b,w as v}from"../chunks/index.da70eac4.js";import{T as nt}from"../chunks/Tip.1d9b8c37.js";import{D as z}from"../chunks/Docstring.6b390b9a.js";import{C as ot}from"../chunks/CodeBlock.00a903b3.js";import{E as it}from"../chunks/ExampleCodeBlock.db12be95.js";import{H as Ve,E as st}from"../chunks/EditOnGithub.1e64e623.js";function rt(Y){let r,M='Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers.md">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading.md#reuse-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.';return{c(){r=a("p"),r.innerHTML=M},l(f){r=l(f,"P",{"data-svelte-h":!0}),y(r)!=="svelte-w7r39y"&&(r.innerHTML=M)},m(f,w){d(f,r,w)},p:Ye,d(f){f&&n(r)}}}function at(Y){let r,M="Examples:",f,w,$;return w=new ot({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTW9jaGlQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBleHBvcnRfdG9fdmlkZW8lMEElMEFwaXBlJTIwJTNEJTIwTW9jaGlQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyZ2VubW8lMkZtb2NoaS0xLXByZXZpZXclMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEFwaXBlLmVuYWJsZV92YWVfdGlsaW5nKCklMEFwcm9tcHQlMjAlM0QlMjAlMjJDbG9zZS11cCUyMG9mJTIwYSUyMGNoYW1lbGVvbidzJTIwZXllJTJDJTIwd2l0aCUyMGl0cyUyMHNjYWx5JTIwc2tpbiUyMGNoYW5naW5nJTIwY29sb3IuJTIwVWx0cmElMjBoaWdoJTIwcmVzb2x1dGlvbiUyMDRrLiUyMiUwQWZyYW1lcyUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDI4JTJDJTIwZ3VpZGFuY2Vfc2NhbGUlM0QzLjUpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8oZnJhbWVzJTJDJTIwJTIybW9jaGkubXA0JTIyKQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> MochiPipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video | |
| <span class="hljs-meta">>>> </span>pipe = MochiPipeline.from_pretrained(<span class="hljs-string">"genmo/mochi-1-preview"</span>, torch_dtype=torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe.enable_model_cpu_offload() | |
| <span class="hljs-meta">>>> </span>pipe.enable_vae_tiling() | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"Close-up of a chameleon's eye, with its scaly skin changing color. Ultra high resolution 4k."</span> | |
| <span class="hljs-meta">>>> </span>frames = pipe(prompt, num_inference_steps=<span class="hljs-number">28</span>, guidance_scale=<span class="hljs-number">3.5</span>).frames[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>export_to_video(frames, <span class="hljs-string">"mochi.mp4"</span>)`,wrap:!1}}),{c(){r=a("p"),r.textContent=M,f=i(),g(w.$$.fragment)},l(m){r=l(m,"P",{"data-svelte-h":!0}),y(r)!=="svelte-kvfsh7"&&(r.textContent=M),f=s(m),u(w.$$.fragment,m)},m(m,x){d(m,r,x),d(m,f,x),h(w,m,x),$=!0},p:Ye,i(m){$||(_(w.$$.fragment,m),$=!0)},o(m){b(w.$$.fragment,m),$=!1},d(m){m&&(n(r),n(f)),v(w,m)}}}function lt(Y){let r,M,f,w,$,m,x,Ze='<a href="https://huggingface.co/genmo/mochi-1-preview" rel="nofollow">Mochi 1 Preview</a> from Genmo.',ae,V,We="<em>Mochi 1 preview is an open state-of-the-art video generation model with high-fidelity motion and strong prompt adherence in preliminary evaluation. This model dramatically closes the gap between closed and open video generation systems. The model is released under a permissive Apache 2.0 license.</em>",le,L,pe,Z,ce,p,W,$e,Q,Oe="The mochi pipeline for text-to-video generation.",xe,R,Ue='Reference: <a href="https://github.com/genmoai/models" rel="nofollow">https://github.com/genmoai/models</a>',Me,T,O,Te,K,qe="Function invoked when calling the pipeline for generation.",Pe,E,ke,j,U,Ie,ee,Ae=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Ce,J,q,Le,te,He=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Ee,D,A,je,ne,Fe=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to | |
| compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Je,N,H,De,oe,Xe=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to | |
| compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow | |
| processing larger images.`,Ne,G,F,Ge,ie,Be="Encodes the prompt into text encoder hidden states.",de,X,me,I,B,ze,se,Se="Output class for Mochi pipelines.",fe,S,ge,re,ue;return $=new Ve({props:{title:"Mochi",local:"mochi",headingTag:"h1"}}),L=new nt({props:{$$slots:{default:[rt]},$$scope:{ctx:Y}}}),Z=new Ve({props:{title:"MochiPipeline",local:"diffusers.MochiPipeline",headingTag:"h2"}}),W=new z({props:{name:"class diffusers.MochiPipeline",anchor:"diffusers.MochiPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": T5EncoderModel"},{name:"tokenizer",val:": T5TokenizerFast"},{name:"transformer",val:": MochiTransformer3DModel"},{name:"force_zeros_for_empty_prompt",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.MochiPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/pr_10312/en/api/models/mochi_transformer3d#diffusers.MochiTransformer3DModel">MochiTransformer3DModel</a>) — | |
| Conditional Transformer architecture to denoise the encoded video latents.`,name:"transformer"},{anchor:"diffusers.MochiPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_10312/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) — | |
| A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.MochiPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_10312/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.MochiPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) — | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically | |
| the <a href="https://huggingface.co/google/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.MochiPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) — | |
| Tokenizer of class | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.MochiPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5TokenizerFast</code>) — | |
| Second Tokenizer of class | |
| <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer"}],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_mochi.py#L156"}}),O=new z({props:{name:"__call__",anchor:"diffusers.MochiPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_frames",val:": int = 19"},{name:"num_inference_steps",val:": int = 64"},{name:"timesteps",val:": typing.List[int] = None"},{name:"guidance_scale",val:": float = 4.5"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 256"}],parametersDescription:[{anchor:"diffusers.MochiPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>. | |
| instead.`,name:"prompt"},{anchor:"diffusers.MochiPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.default_height</code>) — | |
| The height in pixels of the generated image. This is set to 480 by default for the best results.`,name:"height"},{anchor:"diffusers.MochiPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.default_width</code>) — | |
| The width in pixels of the generated image. This is set to 848 by default for the best results.`,name:"width"},{anchor:"diffusers.MochiPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>19</code>) — | |
| The number of video frames to generate`,name:"num_frames"},{anchor:"diffusers.MochiPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) — | |
| The number of denoising steps. More denoising steps usually lead to a higher quality image at the | |
| expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.MochiPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) — | |
| Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument | |
| in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is | |
| passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.MochiPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>4.5</code>) — | |
| Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>. | |
| <code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen | |
| Paper</a>. Guidance scale is enabled by setting <code>guidance_scale > 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>, | |
| usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.MochiPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.MochiPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) — | |
| One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a> | |
| to make generation deterministic.`,name:"generator"},{anchor:"diffusers.MochiPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image | |
| generation. Can be used to tweak the same generation with different prompts. If not provided, a latents | |
| tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.MochiPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.MochiPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for text embeddings.`,name:"prompt_attention_mask"},{anchor:"diffusers.MochiPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be "". If not | |
| provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.MochiPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.MochiPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generate image. Choose between | |
| <a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.MochiPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.mochi.MochiPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.MochiPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.MochiPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function that calls at the end of each denoising steps during the inference. The function is called | |
| with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by | |
| <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.MochiPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) — | |
| The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list | |
| will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the | |
| <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.MochiPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code> defaults to <code>256</code>) — | |
| Maximum sequence length to use with the <code>prompt</code>.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_mochi.py#L487",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <code>~pipelines.mochi.MochiPipelineOutput</code> is returned, otherwise a <code>tuple</code> | |
| is returned where the first element is a list with the generated images.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~pipelines.mochi.MochiPipelineOutput</code> or <code>tuple</code></p> | |
| `}}),E=new it({props:{anchor:"diffusers.MochiPipeline.__call__.example",$$slots:{default:[at]},$$scope:{ctx:Y}}}),U=new z({props:{name:"disable_vae_slicing",anchor:"diffusers.MochiPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_mochi.py#L415"}}),q=new z({props:{name:"disable_vae_tiling",anchor:"diffusers.MochiPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_mochi.py#L430"}}),A=new z({props:{name:"enable_vae_slicing",anchor:"diffusers.MochiPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_mochi.py#L408"}}),H=new z({props:{name:"enable_vae_tiling",anchor:"diffusers.MochiPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_mochi.py#L422"}}),F=new z({props:{name:"encode_prompt",anchor:"diffusers.MochiPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 256"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.MochiPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.MochiPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is | |
| less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.MochiPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.MochiPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| Number of videos that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_videos_per_prompt"},{anchor:"diffusers.MochiPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.MochiPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt | |
| weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input | |
| argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.MochiPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>, <em>optional</em>): | |
| torch device`,name:"device"},{anchor:"diffusers.MochiPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> — (<code>torch.dtype</code>, <em>optional</em>): | |
| torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_mochi.py#L272"}}),X=new Ve({props:{title:"MochiPipelineOutput",local:"diffusers.pipelines.mochi.pipeline_output.MochiPipelineOutput",headingTag:"h2"}}),B=new z({props:{name:"class diffusers.pipelines.mochi.pipeline_output.MochiPipelineOutput",anchor:"diffusers.pipelines.mochi.pipeline_output.MochiPipelineOutput",parameters:[{name:"frames",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.mochi.pipeline_output.MochiPipelineOutput.frames",description:`<strong>frames</strong> (<code>torch.Tensor</code>, <code>np.ndarray</code>, or List[List[PIL.Image.Image]]) — | |
| List of video outputs - It can be a nested list of length <code>batch_size,</code> with each sub-list containing | |
| denoised PIL image sequences of length <code>num_frames.</code> It can also be a NumPy array or Torch tensor of shape | |
| <code>(batch_size, num_frames, channels, height, width)</code>.`,name:"frames"}],source:"https://github.com/huggingface/diffusers/blob/vr_10312/src/diffusers/pipelines/mochi/pipeline_output.py#L8"}}),S=new st({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/mochi.md"}}),{c(){r=a("meta"),M=i(),f=a("p"),w=i(),g($.$$.fragment),m=i(),x=a("p"),x.innerHTML=Ze,ae=i(),V=a("p"),V.innerHTML=We,le=i(),g(L.$$.fragment),pe=i(),g(Z.$$.fragment),ce=i(),p=a("div"),g(W.$$.fragment),$e=i(),Q=a("p"),Q.textContent=Oe,xe=i(),R=a("p"),R.innerHTML=Ue,Me=i(),T=a("div"),g(O.$$.fragment),Te=i(),K=a("p"),K.textContent=qe,Pe=i(),g(E.$$.fragment),ke=i(),j=a("div"),g(U.$$.fragment),Ie=i(),ee=a("p"),ee.innerHTML=Ae,Ce=i(),J=a("div"),g(q.$$.fragment),Le=i(),te=a("p"),te.innerHTML=He,Ee=i(),D=a("div"),g(A.$$.fragment),je=i(),ne=a("p"),ne.textContent=Fe,Je=i(),N=a("div"),g(H.$$.fragment),De=i(),oe=a("p"),oe.textContent=Xe,Ne=i(),G=a("div"),g(F.$$.fragment),Ge=i(),ie=a("p"),ie.textContent=Be,de=i(),g(X.$$.fragment),me=i(),I=a("div"),g(B.$$.fragment),ze=i(),se=a("p"),se.textContent=Se,fe=i(),g(S.$$.fragment),ge=i(),re=a("p"),this.h()},l(e){const o=tt("svelte-u9bgzb",document.head);r=l(o,"META",{name:!0,content:!0}),o.forEach(n),M=s(e),f=l(e,"P",{}),P(f).forEach(n),w=s(e),u($.$$.fragment,e),m=s(e),x=l(e,"P",{"data-svelte-h":!0}),y(x)!=="svelte-1w3beu"&&(x.innerHTML=Ze),ae=s(e),V=l(e,"P",{"data-svelte-h":!0}),y(V)!=="svelte-16aanyn"&&(V.innerHTML=We),le=s(e),u(L.$$.fragment,e),pe=s(e),u(Z.$$.fragment,e),ce=s(e),p=l(e,"DIV",{class:!0});var c=P(p);u(W.$$.fragment,c),$e=s(c),Q=l(c,"P",{"data-svelte-h":!0}),y(Q)!=="svelte-11luvqp"&&(Q.textContent=Oe),xe=s(c),R=l(c,"P",{"data-svelte-h":!0}),y(R)!=="svelte-1br2zew"&&(R.innerHTML=Ue),Me=s(c),T=l(c,"DIV",{class:!0});var C=P(T);u(O.$$.fragment,C),Te=s(C),K=l(C,"P",{"data-svelte-h":!0}),y(K)!=="svelte-v78lg8"&&(K.textContent=qe),Pe=s(C),u(E.$$.fragment,C),C.forEach(n),ke=s(c),j=l(c,"DIV",{class:!0});var he=P(j);u(U.$$.fragment,he),Ie=s(he),ee=l(he,"P",{"data-svelte-h":!0}),y(ee)!=="svelte-1s3c06i"&&(ee.innerHTML=Ae),he.forEach(n),Ce=s(c),J=l(c,"DIV",{class:!0});var _e=P(J);u(q.$$.fragment,_e),Le=s(_e),te=l(_e,"P",{"data-svelte-h":!0}),y(te)!=="svelte-pkn4ui"&&(te.innerHTML=He),_e.forEach(n),Ee=s(c),D=l(c,"DIV",{class:!0});var be=P(D);u(A.$$.fragment,be),je=s(be),ne=l(be,"P",{"data-svelte-h":!0}),y(ne)!=="svelte-14bnrb6"&&(ne.textContent=Fe),be.forEach(n),Je=s(c),N=l(c,"DIV",{class:!0});var ve=P(N);u(H.$$.fragment,ve),De=s(ve),oe=l(ve,"P",{"data-svelte-h":!0}),y(oe)!=="svelte-1xwrf7t"&&(oe.textContent=Xe),ve.forEach(n),Ne=s(c),G=l(c,"DIV",{class:!0});var we=P(G);u(F.$$.fragment,we),Ge=s(we),ie=l(we,"P",{"data-svelte-h":!0}),y(ie)!=="svelte-16q0ax1"&&(ie.textContent=Be),we.forEach(n),c.forEach(n),de=s(e),u(X.$$.fragment,e),me=s(e),I=l(e,"DIV",{class:!0});var ye=P(I);u(B.$$.fragment,ye),ze=s(ye),se=l(ye,"P",{"data-svelte-h":!0}),y(se)!=="svelte-srx61f"&&(se.textContent=Se),ye.forEach(n),fe=s(e),u(S.$$.fragment,e),ge=s(e),re=l(e,"P",{}),P(re).forEach(n),this.h()},h(){k(r,"name","hf:doc:metadata"),k(r,"content",pt),k(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(I,"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,r),d(e,M,o),d(e,f,o),d(e,w,o),h($,e,o),d(e,m,o),d(e,x,o),d(e,ae,o),d(e,V,o),d(e,le,o),h(L,e,o),d(e,pe,o),h(Z,e,o),d(e,ce,o),d(e,p,o),h(W,p,null),t(p,$e),t(p,Q),t(p,xe),t(p,R),t(p,Me),t(p,T),h(O,T,null),t(T,Te),t(T,K),t(T,Pe),h(E,T,null),t(p,ke),t(p,j),h(U,j,null),t(j,Ie),t(j,ee),t(p,Ce),t(p,J),h(q,J,null),t(J,Le),t(J,te),t(p,Ee),t(p,D),h(A,D,null),t(D,je),t(D,ne),t(p,Je),t(p,N),h(H,N,null),t(N,De),t(N,oe),t(p,Ne),t(p,G),h(F,G,null),t(G,Ge),t(G,ie),d(e,de,o),h(X,e,o),d(e,me,o),d(e,I,o),h(B,I,null),t(I,ze),t(I,se),d(e,fe,o),h(S,e,o),d(e,ge,o),d(e,re,o),ue=!0},p(e,[o]){const c={};o&2&&(c.$$scope={dirty:o,ctx:e}),L.$set(c);const C={};o&2&&(C.$$scope={dirty:o,ctx:e}),E.$set(C)},i(e){ue||(_($.$$.fragment,e),_(L.$$.fragment,e),_(Z.$$.fragment,e),_(W.$$.fragment,e),_(O.$$.fragment,e),_(E.$$.fragment,e),_(U.$$.fragment,e),_(q.$$.fragment,e),_(A.$$.fragment,e),_(H.$$.fragment,e),_(F.$$.fragment,e),_(X.$$.fragment,e),_(B.$$.fragment,e),_(S.$$.fragment,e),ue=!0)},o(e){b($.$$.fragment,e),b(L.$$.fragment,e),b(Z.$$.fragment,e),b(W.$$.fragment,e),b(O.$$.fragment,e),b(E.$$.fragment,e),b(U.$$.fragment,e),b(q.$$.fragment,e),b(A.$$.fragment,e),b(H.$$.fragment,e),b(F.$$.fragment,e),b(X.$$.fragment,e),b(B.$$.fragment,e),b(S.$$.fragment,e),ue=!1},d(e){e&&(n(M),n(f),n(w),n(m),n(x),n(ae),n(V),n(le),n(pe),n(ce),n(p),n(de),n(me),n(I),n(fe),n(ge),n(re)),n(r),v($,e),v(L,e),v(Z,e),v(W),v(O),v(E),v(U),v(q),v(A),v(H),v(F),v(X,e),v(B),v(S,e)}}}const pt='{"title":"Mochi","local":"mochi","sections":[{"title":"MochiPipeline","local":"diffusers.MochiPipeline","sections":[],"depth":2},{"title":"MochiPipelineOutput","local":"diffusers.pipelines.mochi.pipeline_output.MochiPipelineOutput","sections":[],"depth":2}],"depth":1}';function ct(Y){return Re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bt extends Ke{constructor(r){super(),et(this,r,ct,lt,Qe,{})}}export{bt as component}; | |
Xet Storage Details
- Size:
- 28.6 kB
- Xet hash:
- 2415f66ba1dcb3f44fbf25b42332b2813d3b40bd3c0c572c8d25c5b7ced95e8a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.