import{s as Y,n as Z,o as ee}from"../chunks/scheduler.53228c21.js";import{S as oe,i as te,e as c,s as r,c as P,h as se,a as p,d as t,b as i,f as j,g as y,j as B,k as G,l as I,m as s,n as x,t as w,o as b,p as L}from"../chunks/index.100fac89.js";import{C as re}from"../chunks/CopyLLMTxtMenu.494046bd.js";import{D as W}from"../chunks/Docstring.9bbf7d33.js";import{H as X,E as ie}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.8999c127.js";function ne(F){let n,D,T,C,l,N,m,E,f,J="The <code>VideoProcessor</code> provides a unified API for video pipelines to prepare inputs for VAE encoding and post-processing outputs once they’re decoded. The class inherits <code>VaeImageProcessor</code> so it includes transformations such as resizing, normalization, and conversion between PIL Image, PyTorch, and NumPy arrays.",z,h,M,d,u,R,_,K="Preprocesses input video(s).",H,a,g,U,$,Q="Converts a video tensor to a list of frames for export.",O,v,S,V,q;return l=new re({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),m=new X({props:{title:"Video Processor",local:"video-processor",headingTag:"h1"}}),h=new X({props:{title:"VideoProcessor",local:"diffusers.video_processor.VideoProcessor.preprocess_video",headingTag:"h2"}}),u=new W({props:{name:"diffusers.video_processor.VideoProcessor.preprocess_video",anchor:"diffusers.video_processor.VideoProcessor.preprocess_video",parameters:[{name:"video",val:""},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.video_processor.VideoProcessor.preprocess_video.video",description:`<strong>video</strong> (<code>List[PIL.Image]</code>, <code>List[List[PIL.Image]]</code>, <code>torch.Tensor</code>, <code>np.array</code>, <code>List[torch.Tensor]</code>, <code>List[np.array]</code>) &#x2014;
The input video. It can be one of the following:
<ul>
<li>List of the PIL images.</li>
<li>List of list of PIL images.</li>
<li>4D Torch tensors (expected shape for each tensor <code>(num_frames, num_channels, height, width)</code>).</li>
<li>4D NumPy arrays (expected shape for each array <code>(num_frames, height, width, num_channels)</code>).</li>
<li>List of 4D Torch tensors (expected shape for each tensor <code>(num_frames, num_channels, height, width)</code>).</li>
<li>List of 4D NumPy arrays (expected shape for each array <code>(num_frames, height, width, num_channels)</code>).</li>
<li>5D NumPy arrays: expected shape for each array <code>(batch_size, num_frames, height, width, num_channels)</code>.</li>
<li>5D Torch tensors: expected shape for each array <code>(batch_size, num_frames, num_channels, height, width)</code>.</li>
</ul>`,name:"video"},{anchor:"diffusers.video_processor.VideoProcessor.preprocess_video.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The height in preprocessed frames of the video. If <code>None</code>, will use the <code>get_default_height_width()</code> to
get default height.`,name:"height"},{anchor:"diffusers.video_processor.VideoProcessor.preprocess_video.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em><code>, defaults to </code>None<code>) -- The width in preprocessed frames of the video. If </code>None<code>, will use get_default_height_width()</code> to get
the default width.`,name:"width"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/video_processor.py#L29"}}),g=new W({props:{name:"diffusers.video_processor.VideoProcessor.postprocess_video",anchor:"diffusers.video_processor.VideoProcessor.postprocess_video",parameters:[{name:"video",val:": Tensor"},{name:"output_type",val:": str = 'np'"}],parametersDescription:[{anchor:"diffusers.video_processor.VideoProcessor.postprocess_video.video",description:"<strong>video</strong> (<code>torch.Tensor</code>) &#x2014; The video as a tensor.",name:"video"},{anchor:"diffusers.video_processor.VideoProcessor.postprocess_video.output_type",description:"<strong>output_type</strong> (<code>str</code>, defaults to <code>&quot;np&quot;</code>) &#x2014; Output type of the postprocessed <code>video</code> tensor.",name:"output_type"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/video_processor.py#L90"}}),v=new ie({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/video_processor.md"}}),{c(){n=c("meta"),D=r(),T=c("p"),C=r(),P(l.$$.fragment),N=r(),P(m.$$.fragment),E=r(),f=c("p"),f.innerHTML=J,z=r(),P(h.$$.fragment),M=r(),d=c("div"),P(u.$$.fragment),R=r(),_=c("p"),_.textContent=K,H=r(),a=c("div"),P(g.$$.fragment),U=r(),$=c("p"),$.textContent=Q,O=r(),P(v.$$.fragment),S=r(),V=c("p"),this.h()},l(e){const o=se("svelte-u9bgzb",document.head);n=p(o,"META",{name:!0,content:!0}),o.forEach(t),D=i(e),T=p(e,"P",{}),j(T).forEach(t),C=i(e),y(l.$$.fragment,e),N=i(e),y(m.$$.fragment,e),E=i(e),f=p(e,"P",{"data-svelte-h":!0}),B(f)!=="svelte-64r56a"&&(f.innerHTML=J),z=i(e),y(h.$$.fragment,e),M=i(e),d=p(e,"DIV",{class:!0});var A=j(d);y(u.$$.fragment,A),R=i(A),_=p(A,"P",{"data-svelte-h":!0}),B(_)!=="svelte-8z7kxl"&&(_.textContent=K),A.forEach(t),H=i(e),a=p(e,"DIV",{class:!0});var k=j(a);y(g.$$.fragment,k),U=i(k),$=p(k,"P",{"data-svelte-h":!0}),B($)!=="svelte-36vyht"&&($.textContent=Q),k.forEach(t),O=i(e),y(v.$$.fragment,e),S=i(e),V=p(e,"P",{}),j(V).forEach(t),this.h()},h(){G(n,"name","hf:doc:metadata"),G(n,"content",de),G(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(a,"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){I(document.head,n),s(e,D,o),s(e,T,o),s(e,C,o),x(l,e,o),s(e,N,o),x(m,e,o),s(e,E,o),s(e,f,o),s(e,z,o),x(h,e,o),s(e,M,o),s(e,d,o),x(u,d,null),I(d,R),I(d,_),s(e,H,o),s(e,a,o),x(g,a,null),I(a,U),I(a,$),s(e,O,o),x(v,e,o),s(e,S,o),s(e,V,o),q=!0},p:Z,i(e){q||(w(l.$$.fragment,e),w(m.$$.fragment,e),w(h.$$.fragment,e),w(u.$$.fragment,e),w(g.$$.fragment,e),w(v.$$.fragment,e),q=!0)},o(e){b(l.$$.fragment,e),b(m.$$.fragment,e),b(h.$$.fragment,e),b(u.$$.fragment,e),b(g.$$.fragment,e),b(v.$$.fragment,e),q=!1},d(e){e&&(t(D),t(T),t(C),t(N),t(E),t(f),t(z),t(M),t(d),t(H),t(a),t(O),t(S),t(V)),t(n),L(l,e),L(m,e),L(h,e),L(u),L(g),L(v,e)}}}const de='{"title":"Video Processor","local":"video-processor","sections":[{"title":"VideoProcessor","local":"diffusers.video_processor.VideoProcessor.preprocess_video","sections":[],"depth":2}],"depth":1}';function ae(F){return ee(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class he extends oe{constructor(n){super(),te(this,n,ae,ne,Y,{})}}export{he as component};
