Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"MiniMax-H3","local":"minimax-h3","sections":[{"title":"Checkpoint 레이아웃","local":"checkpoint-layout","sections":[],"depth":2},{"title":"두 개의 스케줄러","local":"two-schedulers","sections":[],"depth":2},{"title":"생성 제약","local":"generation-constraints","sections":[],"depth":2},{"title":"메모리","local":"memory","sections":[],"depth":2},{"title":"텍스트와 키프레임","local":"text-and-keyframes","sections":[],"depth":2},{"title":"Omni-references","local":"omni-references","sections":[{"title":"참고용 생성","local":"a-generation-as-a-reference","sections":[],"depth":3}],"depth":2},{"title":"MiniMaxH3ModularPipeline","local":"diffusers.MiniMaxH3ModularPipeline","sections":[],"depth":2},{"title":"MiniMaxH3Blocks","local":"diffusers.MiniMaxH3Blocks","sections":[],"depth":2},{"title":"MiniMaxH3ImageReference","local":"diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference","sections":[],"depth":2},{"title":"MiniMaxH3VideoReference","local":"diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference","sections":[],"depth":2},{"title":"MiniMaxH3AudioReference","local":"diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference","sections":[],"depth":2}],"depth":1}"/> | |
| <link href="/docs/diffusers/main/en/_app/immutable/entry/start.D3LnKZ4R.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/BF9UNEM9.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/DPnyVmXs.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/entry/app.C0rBoMxR.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/DSGUT_OW.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/C045MWWx.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/DnVIJfC5.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/nodes/0.DTZsP_3B.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/IaDvMxLQ.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/nodes/213.YQK23m03.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/bKdwVYpU.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/D0iXbNom.js" rel="modulepreload"> | |
| <!--1oh9kud--><meta name="hf:doc:metadata" content="{"title":"MiniMax-H3","local":"minimax-h3","sections":[{"title":"Checkpoint layout","local":"checkpoint-layout","sections":[],"depth":2},{"title":"Two schedulers","local":"two-schedulers","sections":[],"depth":2},{"title":"Generation constraints","local":"generation-constraints","sections":[],"depth":2},{"title":"Memory","local":"memory","sections":[],"depth":2},{"title":"Text and keyframes","local":"text-and-keyframes","sections":[],"depth":2},{"title":"Omni-references","local":"omni-references","sections":[{"title":"A generation as a reference","local":"a-generation-as-a-reference","sections":[],"depth":3}],"depth":2},{"title":"MiniMaxH3ModularPipeline","local":"diffusers.MiniMaxH3ModularPipeline","sections":[],"depth":2},{"title":"MiniMaxH3Blocks","local":"diffusers.MiniMaxH3Blocks","sections":[],"depth":2},{"title":"MiniMaxH3ImageReference","local":"diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference","sections":[],"depth":2},{"title":"MiniMaxH3VideoReference","local":"diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference","sections":[],"depth":2},{"title":"MiniMaxH3AudioReference","local":"diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference","sections":[],"depth":2}],"depth":1}"/><!----> | |
| <link href="/docs/diffusers/main/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: inline-end; margin-inline-start: 10px; display: inline-flex; position: relative; z-index: 10;"><div dir="ltr" class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----></span> <span dir="auto">Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg><!----></button></div> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="minimax-h3" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#minimax-h3"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->MiniMax-H3<!----></span></h1><!--]--><!----> <div class="flex flex-wrap space-x-1"><a href="https://huggingface.co/docs/diffusers/main/en/tutorials/using_peft_for_inference" target="_blank" rel="noopener"><img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/></a></div> <p>MiniMax-H3는 비디오와 그 사운드를 함께 생성합니다. 단일 transformer가 텍스트 조건부, 조건부 미디어, 그리고 대상 비디오 및 오디오 latents를 포함하는 하나의 packed sequence를 denoise합니다. 별도의 vocoder나 사후 오디오 처리 단계가 없습니다. 비디오와 오디오는 동일한 denoising loop에서 출력됩니다.</p> <p>원본 MiniMax-H3 체크포인트는 <a href="https://huggingface.co/MiniMaxAI" rel="nofollow">MiniMaxAI</a> 조직에서 찾을 수 있습니다.</p> <p>MiniMax-H3는 <a href="./anima">Anima</a>와 동일한 방식으로 <a href="../../modular_diffusers/overview">Modular Diffusers</a> 블록으로만 통합됩니다. 즉, 블록과 해당 <a href="/docs/diffusers/main/ko/api/pipelines/minimax_h3#diffusers.MiniMaxH3ModularPipeline">MiniMaxH3ModularPipeline</a>이 통합의 전부이며, <code>DiffusionPipeline</code> 부분은 존재하지 않습니다.</p> <!--[1--><h2 class="relative group"><a id="checkpoint-layout" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#checkpoint-layout"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Checkpoint 레이아웃<!----></span></h2><!--]--><!----> <p>MiniMax-H3는 transformer를 제외한 모든 구성 요소를 공유하는 두 개의 체크포인트 파티션으로 출시되었으므로, diffusers 변환은 이 둘을 모두 <strong>하나의 저장소</strong>에 배치합니다:</p> <table><thead><tr><th>서브폴더</th><th>워크플로</th></tr></thead><tbody><tr><td><code>transformer/</code></td><td><code>t2va</code> (텍스트만), <code>fl2va</code> (첫 번째 및/또는 마지막 keyframe)</td></tr><tr><td><code>transformer_ref/</code></td><td><code>ref2va</code> (이미지, 비디오 및 오디오 참조의 순서화된 혼합)</td></tr></tbody></table> <p>Transformer를 제외한 모든 구성 요소, 즉 비디오 VAE, 오디오 VAE, Qwen3-VL conditioner, 해당 tokenizer와 processor, 그리고 두 개의 scheduler는 공유되며 한 번만 저장됩니다.</p> <p>conditioner는 <code>Qwen3VLForConditionalGeneration</code>이며, MiniMax-H3는 마지막 레이어가 아닌 50번째 decoder 레이어 이후의 <em>unnormalized</em> hidden state를 읽습니다. 따라서 전체 공개 checkpoint가 사용되지만, 그 language-model head는 사용되지 않습니다.</p> <p>세 가지 작업 모두 <a href="/docs/diffusers/main/ko/api/pipelines/minimax_h3#diffusers.MiniMaxH3Blocks">MiniMaxH3Blocks</a>의 워크플로우이며, 저장소에는 각 구성 요소를 자체 로딩 사양과 함께 명시하는 <code>modular_model_index.json</code> 하나를 포함합니다. 단일 작업을 서빙하려면 해당 워크플로우를 <code>from_pretrained</code>에 전달하세요. 그러면 해당 워크플로우의 블록만 유지되므로, 파이프라인의 시그니처(<code>pipe.doc</code>)는 정확히 해당 작업의 입력을 문서화하고, 해당 작업의 구성 요소만 선언되며, <code>load_components</code>는 정확히 해당 하위 폴더만 가져옵니다. <code>t2va</code> / <code>fl2va</code> 파이프라인은 <code>transformer_ref/</code>에 절대 접근하지 않으며, <code>ref2va</code> 파이프라인은 <code>transformer/</code>에 절대 접근하지 않습니다.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ModularPipeline | |
| pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, workflow=<span class="hljs-string">"ref2va"</span>) | |
| pipe.load_components(dtype=torch.bfloat16)<!----></pre></div><!----> <blockquote class="tip"><p><code>pipe.doc</code>은 현재 파이프라인이 어떤 입력을 받아 어떤 출력을 반환하는지, 즉 기본값이 포함된 모든 입력, 기대하는 구성 요소, 그리고 생성하는 출력을 보여줍니다. 하나의 워크플로로 축소되어 해당 작업을 정확히 설명하므로, 요청을 보내기 전에 필요한 사항을 파악하는 가장 빠른 방법입니다.</p></blockquote> <p>대신 모든 워크플로를 하나의 파이프라인에서 사용하려면 <code>workflow</code> 인수를 생략하세요. 그러면 파이프라인은 호출 시 전달된 입력에 따라 워크플로를 선택합니다.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!---->pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>)<!----></pre></div><!----> <p><em>로딩</em>은 여전히 워크플로우 하나씩 진행될 수 있습니다. 이 호출은 <code>transformer/</code>와 모든 공유 컴포넌트를 가져오며, 이는 <code>t2va</code>와 <code>fl2va</code> 모두에 사용됩니다:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!---->pipe.load_components(workflow=<span class="hljs-string">"t2va"</span>, dtype=torch.bfloat16)<!----></pre></div><!----> <p><code>workflow=</code> 없이 <code>load_components()</code>를 호출하면 <strong>두 개의</strong> 61.7GB transformer 파티션을 모두 가져오며, 이를 통해 추가 로딩 호출 없이 하나의 파이프라인이 세 가지 워크플로를 모두 처리할 수 있습니다. <a href="/docs/diffusers/main/ko/api/modular_diffusers/pipeline_components#diffusers.ComponentsManager">ComponentsManager</a>와 자동 오프로딩을 함께 사용하면, 가중치는 호스트 RAM에 머물러 있고 매니저가 각 단계에 필요한 것만 가속기로 이동시킵니다. 따라서 <code>ref2va</code> 디노이저가 디바이스를 필요로 할 때 전략은 충분한 공간을 확보하기 위해 필요한 만큼 오프로딩합니다. 레시피는 <a href="#memory">Memory</a>를 참고하세요.</p> <!--[1--><h2 class="relative group"><a id="two-schedulers" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#two-schedulers"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->두 개의 스케줄러<!----></span></h2><!--]--><!----> <p>Video와 audio latents는 각 스텝마다 하나의 transformer 호출 내에서 서로 다른 두 개의 스케줄을 따라 진행됩니다. 이 때문에 블록은 두 개의 <a href="/docs/diffusers/main/ko/api/schedulers/minimax_h3#diffusers.MiniMaxH3Scheduler">MiniMaxH3Scheduler</a> 인스턴스를 기대합니다: video latents용 <code>scheduler</code>(발행된 체크포인트에서 <code>shift=12.0</code>)과 audio latents용 <code>audio_scheduler</code>(<code>shift=3.0</code>).</p> <p>두 transformer 파티션 모두 guidance-distilled이므로 모든 워크플로에 해당합니다. guidance가 가중치에 내장되어 있어 guider, <code>negative_prompt</code>, <code>guidance_scale</code>이 없으며, 모든 단계에서 정확히 한 번의 forward pass만 실행됩니다.</p> <!--[1--><h2 class="relative group"><a id="generation-constraints" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#generation-constraints"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->생성 제약<!----></span></h2><!--]--><!----> <ul><li><strong>24 fps, 5~15초.</strong> <code>num_frames</code>은 비디오 VAE가 디코딩할 수 있는 다음 <code>17 * n + 5</code> 값으로 반올림되며, 생성된 길이는 해당 범위 내에 있어야 합니다.</li> <li><strong>768픽셀의 짧은 변.</strong> <code>height</code>와 <code>width</code>의 기본값은 첫 번째 키프레임의 종횡비(없을 경우 16:9)에 해당하는 MiniMax-H3 자체 캔버스이며, 32의 배수여야 합니다.</li> <li><strong>하나의 생성기, 세 번의 추출.</strong> 요청은 먼저 키프레임 또는 참조 조건 노이즈를 추출한 다음, 비디오 노이즈, 그리고 오디오 노이즈를 순서대로 전달받은 <code>generator</code>에서 추출합니다. 따라서 동일한 생성기 상태에서 두 번 실행하면 동일한 비디오와 사운드가 반환됩니다. <code>latents</code> 또는 <code>audio_latents</code>를 전달하면 해당 추출을 대체합니다.</li> <li><strong><code>num_inference_steps</code> counts sigma grid points</strong>, the terminal <code>0</code> included, so it drives one model evaluation less.</li></ul> <!--[1--><h2 class="relative group"><a id="memory" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#memory"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->메모리<!----></span></h2><!--]--><!----> <p>Transformer만 bfloat16에서 61.7 GB이고 Qwen3-VL conditioner가 62.1 GB이므로, 로딩 방식은 하드웨어에 따라 달라집니다. 모든 설정에서 가장 큰 속도 레버는 더 작은 캔버스입니다: <code>height</code>와 <code>width</code>는 32의 배수만 충족하면 되며, 학습된 1344x768보다 960x544가 스텝당 약 2.3배 빠릅니다.</p> <p>80 GB 카드 하나에서 <a href="/docs/diffusers/main/ko/api/modular_diffusers/pipeline_components#diffusers.ComponentsManager">ComponentsManager</a>에 구성 요소를 등록하고, 가속기 위/아래로 이동하도록 설정합니다:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentsManager, ModularPipeline | |
| manager = ComponentsManager() | |
| pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, components_manager=manager) | |
| pipe.load_components(workflow=<span class="hljs-string">"t2va"</span>, dtype=torch.bfloat16) | |
| manager.enable_auto_cpu_offload(device=<span class="hljs-string">"cuda"</span>, memory_reserve_margin=<span class="hljs-string">"12GB"</span>) <span class="hljs-comment"># or "mps", "xpu", "cpu"</span> | |
| pipe.transformer.set_attention_backend(<span class="hljs-string">"_flash_3_hub"</span>) <span class="hljs-comment"># Hopper, roughly 3x faster; kernels fetched from the Hub</span><!----></pre></div><!----> <p>소비자용 카드(24~32 GB)에서는 두 개의 대형 구성 요소를 로드할 때 int8로 양자화하고, transformer의 블록을 CPU RAM에서 스트리밍합니다. 아래 모든 내용은 지원되는 로더만 사용하고 패치는 필요 없으며, bfloat16 체크포인트에서 바로 작동합니다:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> MiniMaxH3Transformer3DModel, ModularPipeline, TorchAoConfig | |
| <span class="hljs-keyword">from</span> diffusers.hooks <span class="hljs-keyword">import</span> apply_group_offloading | |
| <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Qwen3VLForConditionalGeneration | |
| <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TorchAoConfig <span class="hljs-keyword">as</span> TransformersTorchAoConfig | |
| <span class="hljs-keyword">from</span> torchao.quantization <span class="hljs-keyword">import</span> Int8WeightOnlyConfig | |
| pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>) | |
| pipe.update_components( | |
| transformer=MiniMaxH3Transformer3DModel.from_pretrained( | |
| <span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, subfolder=<span class="hljs-string">"transformer"</span>, dtype=torch.bfloat16, | |
| quantization_config=TorchAoConfig( | |
| Int8WeightOnlyConfig(version=<span class="hljs-number">2</span>), | |
| modules_to_not_convert=[ | |
| <span class="hljs-string">"proj_in"</span>, <span class="hljs-string">"audio_proj_in"</span>, <span class="hljs-string">"context_embedder"</span>, <span class="hljs-string">"time_embedder"</span>, <span class="hljs-string">"time_proj"</span>, | |
| <span class="hljs-string">"token_refiner"</span>, <span class="hljs-string">"norm_out"</span>, <span class="hljs-string">"proj_out"</span>, <span class="hljs-string">"audio_proj_out"</span>, | |
| ], | |
| ), | |
| low_cpu_mem_usage=<span class="hljs-literal">False</span>, | |
| ), | |
| text_encoder=Qwen3VLForConditionalGeneration.from_pretrained( | |
| <span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, subfolder=<span class="hljs-string">"text_encoder"</span>, dtype=torch.bfloat16, | |
| quantization_config=TransformersTorchAoConfig( | |
| Int8WeightOnlyConfig(version=<span class="hljs-number">2</span>), | |
| modules_to_not_convert=[<span class="hljs-string">"model.visual"</span>, <span class="hljs-string">"model.language_model.embed_tokens"</span>, <span class="hljs-string">"model.language_model.norm"</span>, <span class="hljs-string">"lm_head"</span>], | |
| ), | |
| ), | |
| ) | |
| pipe.load_components(workflow=<span class="hljs-string">"t2va"</span>, dtype=torch.bfloat16) | |
| <span class="hljs-comment"># version=2 int8 tensors are pinnable, which streamed offload needs, and freezing removes the one autograd</span> | |
| <span class="hljs-comment"># path the quantized tensors cannot serve.</span> | |
| pipe.transformer.requires_grad_(<span class="hljs-literal">False</span>) | |
| pipe.text_encoder.requires_grad_(<span class="hljs-literal">False</span>) | |
| offload = <span class="hljs-built_in">dict</span>(onload_device=torch.device(<span class="hljs-string">"cuda"</span>), offload_device=torch.device(<span class="hljs-string">"cpu"</span>), use_stream=<span class="hljs-literal">True</span>) | |
| pipe.transformer.enable_group_offload(offload_type=<span class="hljs-string">"block_level"</span>, num_blocks_per_group=<span class="hljs-number">1</span>, **offload) | |
| apply_group_offloading(pipe.text_encoder.model, offload_type=<span class="hljs-string">"leaf_level"</span>, **offload) | |
| pipe.vae.to(<span class="hljs-string">"cuda"</span>) <span class="hljs-comment"># or "mps", "xpu", "cpu"</span> | |
| pipe.audio_vae.to(<span class="hljs-string">"cuda"</span>)<!----></pre></div><!----> <p>12~16 GB 환경에서는 비디오 VAE 그룹도 오프로드(<code>offload_type="leaf_level"</code>, 스트림 없음)하고 960x544와 같은 작은 캔버스를 사용하면 동일한 레시피가 작동합니다. 가중치가 호스트 RAM에 상주하는 것을 예상하세요. int8 기준 약 75 GB의 RAM이 필요합니다.</p> <p>카드가 두 장이면 오프로딩할 필요가 없습니다. 파이프라인을 둘로 나누고 각 절반을 각각 다른 디바이스에 배치하세요.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentsManager, ModularPipeline | |
| workflow = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>).blocks.get_workflow(<span class="hljs-string">"t2va"</span>) | |
| text_manager = ComponentsManager() | |
| text_manager.enable_auto_cpu_offload(device=<span class="hljs-string">"cuda:1"</span>) | |
| conditioner = workflow.sub_blocks.pop(<span class="hljs-string">"text_encoder"</span>).init_pipeline( | |
| <span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, components_manager=text_manager | |
| ) | |
| conditioner.load_components(dtype=torch.bfloat16) | |
| manager = ComponentsManager() | |
| manager.enable_auto_cpu_offload(device=<span class="hljs-string">"cuda:0"</span>) | |
| rest = workflow.init_pipeline(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, components_manager=manager) | |
| rest.load_components(dtype=torch.bfloat16) | |
| prompt = <span class="hljs-string">"A red fox trotting through a snowy pine forest, snow crunching underfoot"</span> | |
| state = conditioner(prompt=prompt) | |
| results = rest( | |
| state=state, | |
| num_frames=<span class="hljs-number">124</span>, | |
| generator=torch.Generator().manual_seed(<span class="hljs-number">42</span>), | |
| output=[<span class="hljs-string">"videos"</span>, <span class="hljs-string">"audio"</span>, <span class="hljs-string">"sampling_rate"</span>], | |
| )<!----></pre></div><!----> <p>80 GB 카드 2장으로 이 방식으로 완전한 bfloat16를 실행할 수 있습니다. 각 절반이 자체 카드에 적합하므로, 한 번 레지던트가 되면 호스트 메모리로 다시 에비트되지 않습니다. 48 GB 카드 2장도 위와 동일한 방식으로 두 구성 요소 모두에 int8 로딩을 적용하여 동일한 결과를 얻을 수 있습니다.</p> <!--[1--><h2 class="relative group"><a id="text-and-keyframes" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#text-and-keyframes"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->텍스트와 키프레임<!----></span></h2><!--]--><!----> <p><a href="/docs/diffusers/main/ko/api/pipelines/minimax_h3#diffusers.MiniMaxH3Blocks">MiniMaxH3Blocks</a>는 텍스트에서 비디오 및 오디오 생성과 키프레임 조건화를 지원합니다. 키프레임은 비디오가 시작하는 프레임(<code>image</code>), 끝나는 프레임(<code>last_image</code>), 또는 둘 다를 지정할 수 있습니다.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentsManager, ModularPipeline | |
| <span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image | |
| <span class="hljs-keyword">from</span> diffusers.utils.export_utils <span class="hljs-keyword">import</span> encode_video | |
| <span class="hljs-comment"># 61.7GB of transformer and 62.1GB of conditioner do not sit on one accelerator, so the components are</span> | |
| <span class="hljs-comment"># registered in a manager that moves each one on and off as the blocks reach it. See [Memory](#memory).</span> | |
| manager = ComponentsManager() | |
| manager.enable_auto_cpu_offload(device=<span class="hljs-string">"cuda"</span>) <span class="hljs-comment"># or "mps", "xpu", "cpu"</span> | |
| pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, components_manager=manager) | |
| pipe.load_components(workflow=<span class="hljs-string">"fl2va"</span>, dtype=torch.bfloat16) | |
| prompt = <span class="hljs-string">"A red fox trotting through a snowy pine forest, snow crunching underfoot"</span> | |
| <span class="hljs-comment"># `output=` returns exactly the named outputs instead of the whole pipeline state.</span> | |
| outputs = [<span class="hljs-string">"videos"</span>, <span class="hljs-string">"audio"</span>, <span class="hljs-string">"sampling_rate"</span>] | |
| <span class="hljs-comment"># Text to video + audio.</span> | |
| results = pipe(prompt=prompt, num_frames=<span class="hljs-number">124</span>, generator=torch.Generator().manual_seed(<span class="hljs-number">42</span>), output=outputs) | |
| <span class="hljs-comment"># First frame (and optionally last frame) to video + audio. The canvas follows the first keyframe.</span> | |
| image = load_image( | |
| <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astronaut.jpg"</span> | |
| ) | |
| results = pipe(prompt=prompt, image=image, num_frames=<span class="hljs-number">124</span>, generator=torch.Generator().manual_seed(<span class="hljs-number">42</span>), output=outputs) | |
| encode_video( | |
| results[<span class="hljs-string">"videos"</span>][<span class="hljs-number">0</span>], | |
| fps=<span class="hljs-number">24</span>, | |
| output_path=<span class="hljs-string">"minimax_h3_fl2va.mp4"</span>, | |
| audio=results[<span class="hljs-string">"audio"</span>][<span class="hljs-number">0</span>], | |
| audio_sample_rate=results[<span class="hljs-string">"sampling_rate"</span>], | |
| )<!----></pre></div><!----> <p>비디오와 오디오는 함께 생성되며, <code>sampling_rate</code>를 가진 사운드트랙과 함께 <code>videos</code> 및 <code>audio</code>라는 별개의 출력으로 호출에서 반환됩니다. 이를 하나의 파일로 muxing하는 작업은 호출자에게 맡겨지며, 예를 들어 <a href="/docs/diffusers/main/ko/api/utilities#diffusers.utils.encode_video">encode_video()</a>를 사용할 수 있습니다.</p> <!--[1--><h2 class="relative group"><a id="omni-references" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#omni-references"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Omni-references<!----></span></h2><!--]--><!----> <p><code>ref2va</code> 워크플로우는 정렬된 참조 목록을 조건으로 사용합니다. 최대 9개의 이미지, 3개의 비디오, 3개의 오디오 클립, 총 12개까지 가능합니다. 순서는 의미론적입니다. 프롬프트 제시에서 참조를 라벨링(<code>"<Picture 1>"</code>, <code>"<Audio 1>"</code>, <code>"<Video 1>"</code>)하고 공유 오디오/비디오 로터리 시계를 진행시키므로, 동일한 참조를 다른 순서로 재배치하면 다른 요청이 됩니다.</p> <p>keyframes와 달리, 참조는 생성된 기하학을 고정하지 않습니다. 참조는 자체 해상도로 인코딩되며, 대상 캔버스는 기본적으로 MiniMax-H3의 16:9 비율을 사용합니다.</p> <p>모달리티마다 참조 클래스가 하나씩 있으며, 각 클래스는 메모리에 있는 미디어와 해당 미디어가 가지는 비율을 보유합니다:</p> <table><thead><tr><th>참고</th><th>media</th><th>rate가 선언하는</th></tr></thead><tbody><tr><td><a href="/docs/diffusers/main/ko/api/pipelines/minimax_h3#diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference">MiniMaxH3ImageReference</a></td><td><code>image</code></td><td>—</td></tr><tr><td><a href="/docs/diffusers/main/ko/api/pipelines/minimax_h3#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference">MiniMaxH3VideoReference</a></td><td><code>frames</code>, 그리고 자체 사운드트랙을 위한 <code>audio</code></td><td><code>fps</code>는 기본값이 MiniMax-H3의 24.0이며, <code>sample_rate</code></td></tr><tr><td><a href="/docs/diffusers/main/ko/api/pipelines/minimax_h3#diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference">MiniMaxH3AudioReference</a></td><td><code>audio</code></td><td><code>sample_rate</code>, 기본값은 오디오 VAE 자체의</td></tr></tbody></table> <p>rates는 모든 것이 리샘플링되는 기준입니다. 프레임은 MiniMax-H3 자체의 24 fps로, 웨이브폼은 오디오 VAE의 샘플 레이트로 리샘플링되며, 이 과정에서 프레임 전체를 삭제하거나 복제하는 방식이 사용됩니다. MiniMax-H3 자체의 레이트로 생성된 미디어는 그대로 통과하므로, 다른 레이트로 생성된 데이터만 이를 명시해야 합니다.</p> <p>Reference는 두 가지 방식 중 하나로 생성됩니다. 클래스의 <code>from_file</code> classmethod를 사용하여 미디어 파일에서 디코딩하거나, 요청이 이미 메모리에 보유하고 있는 미디어에서 직접 구성하는 것입니다. 이전 세대가 피드백으로 입력되는 방식이 바로 이 두 번째 방식입니다(자세한 내용은 <a href="#a-generation-as-a-reference">세대를 reference로</a> 참조).</p> <p>블록은 미디어 파일을 절대 열지 않습니다. 경로 디코딩은 라이브러리 전체와 마찬가지로 호출자의 책임입니다. 각 참조 클래스는 <code>from_file</code> 클래스 메서드를 통해 이를 수행하며, 이 메서드는 경로 또는 URL(비디오와 오디오는 <a href="https://github.com/PyAV-Org/PyAV" rel="nofollow">PyAV</a>를 통해)을 받아 컨테이너가 보고하는 비율을 가진 참조를 반환합니다. 비디오는 프레임 레이트와 사운드를 함께 가져옵니다. 프레임 레이트를 제거하는 <a href="/docs/diffusers/main/ko/api/utilities#diffusers.utils.load_video">load_video()</a>보다 <code>from_file</code>를 사용하는 것이 좋습니다. 실제 레이트가 손실된 프레임으로 구성된 참조는 잘못된 속도로 조건화되며, 어떤 예외도 발생하지 않습니다.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentsManager, ModularPipeline | |
| <span class="hljs-keyword">from</span> diffusers.modular_pipelines.minimax_h3 <span class="hljs-keyword">import</span> ( | |
| MiniMaxH3AudioReference, | |
| MiniMaxH3ImageReference, | |
| MiniMaxH3VideoReference, | |
| ) | |
| <span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_video | |
| <span class="hljs-keyword">from</span> diffusers.utils.export_utils <span class="hljs-keyword">import</span> encode_video | |
| <span class="hljs-comment"># `ref2va` is a workflow of the one MiniMax-H3 pipeline; selecting it loads only the `transformer_ref/`</span> | |
| <span class="hljs-comment"># checkpoint partition, and the manager moves each component on and off the accelerator in turn.</span> | |
| manager = ComponentsManager() | |
| manager.enable_auto_cpu_offload(device=<span class="hljs-string">"cuda"</span>) <span class="hljs-comment"># or "mps", "xpu", "cpu"</span> | |
| pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, workflow=<span class="hljs-string">"ref2va"</span>, components_manager=manager) | |
| pipe.load_components(dtype=torch.bfloat16) | |
| subject = MiniMaxH3ImageReference.from_file( | |
| <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astronaut.jpg"</span> | |
| ) | |
| <span class="hljs-comment"># Decoding a file brings its rates along: the video its own frame rate and its soundtrack, the clip its sample rate.</span> | |
| results = pipe( | |
| prompt=<span class="hljs-string">"The character speaks in time with the reference recording, natural lip movement"</span>, | |
| references=[ | |
| subject, | |
| MiniMaxH3VideoReference.from_file( | |
| <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/hiker.mp4"</span> | |
| ), | |
| MiniMaxH3AudioReference.from_file(<span class="hljs-string">"voice.wav"</span>), | |
| ], | |
| num_frames=<span class="hljs-number">124</span>, | |
| output=[<span class="hljs-string">"videos"</span>, <span class="hljs-string">"audio"</span>, <span class="hljs-string">"sampling_rate"</span>], | |
| ) | |
| <span class="hljs-comment"># Frames a request already holds declare the rate they carry — `load_video` does not preserve it.</span> | |
| motion = load_video(<span class="hljs-string">"motion_ref.mp4"</span>) | |
| results = pipe( | |
| prompt=<span class="hljs-string">"The subject walks toward camera, matching the reference video's shot rhythm"</span>, | |
| references=[subject, MiniMaxH3VideoReference(frames=motion, fps=<span class="hljs-number">30.0</span>)], | |
| num_frames=<span class="hljs-number">124</span>, | |
| output=[<span class="hljs-string">"videos"</span>, <span class="hljs-string">"audio"</span>, <span class="hljs-string">"sampling_rate"</span>], | |
| ) | |
| encode_video( | |
| results[<span class="hljs-string">"videos"</span>][<span class="hljs-number">0</span>], | |
| fps=<span class="hljs-number">24</span>, | |
| output_path=<span class="hljs-string">"minimax_h3_ref2va.mp4"</span>, | |
| audio=results[<span class="hljs-string">"audio"</span>][<span class="hljs-number">0</span>], | |
| audio_sample_rate=results[<span class="hljs-string">"sampling_rate"</span>], | |
| )<!----></pre></div><!----> <p><code>num_frames</code>은 <code>ref2va</code>에 필수적입니다. 참조 사운드트랙과 정확히 동일한 길이의 영상을 생성하려면 클립에서 계산해야 합니다 — <code>round(samples / sample_rate * 24)</code> — 그리고 이 값은 영상 VAE가 디코딩할 수 있는 다음 <code>17 * n + 5</code>로 반올림됩니다. 최종 생성되는 길이는 MiniMax-H3가 생성하는 5초에서 15초 사이여야 합니다.</p> <!--[2--><h3 class="relative group"><a id="a-generation-as-a-reference" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#a-generation-as-a-reference"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->참고용 생성<!----></span></h3><!--]--><!----> <p>워크플로가 하나의 파이프라인을 공유하므로, <code>t2va</code> 생성 결과는 <code>ref2va</code> 참조로 바로 다시 사용할 수 있으며, 인메모리 생성자는 정확히 이러한 전달을 위해 설계되었습니다. 생성된 미디어는 이미 MiniMax-H3 자체의 비율(프레임은 24 fps, 사운드트랙은 오디오 VAE의 샘플 레이트)에 맞춰져 있어 참조에 레이트 인자가 필요하지 않으며, 손실 압축 컨테이너를 통해 재인코딩되는 과정도 없습니다:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ComponentsManager, ModularPipeline | |
| <span class="hljs-keyword">from</span> diffusers.modular_pipelines.minimax_h3 <span class="hljs-keyword">import</span> MiniMaxH3VideoReference | |
| manager = ComponentsManager() | |
| manager.enable_auto_cpu_offload(device=<span class="hljs-string">"cuda"</span>) <span class="hljs-comment"># or "mps", "xpu", "cpu"</span> | |
| <span class="hljs-comment"># The full pipeline holds every workflow and picks one per call from the inputs. Loading without a</span> | |
| <span class="hljs-comment"># `workflow=` brings both transformer partitions in one call, so the `ref2va` request that follows the</span> | |
| <span class="hljs-comment"># `t2va` generation needs no further loading.</span> | |
| pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, components_manager=manager) | |
| pipe.load_components(dtype=torch.bfloat16) | |
| results = pipe( | |
| prompt=<span class="hljs-string">"An astronaut hiking through the mountains, humming a tune"</span>, | |
| num_frames=<span class="hljs-number">124</span>, | |
| output=[<span class="hljs-string">"videos"</span>, <span class="hljs-string">"audio"</span>, <span class="hljs-string">"sampling_rate"</span>], | |
| ) | |
| reference = MiniMaxH3VideoReference( | |
| frames=results[<span class="hljs-string">"videos"</span>][<span class="hljs-number">0</span>], | |
| audio=results[<span class="hljs-string">"audio"</span>][<span class="hljs-number">0</span>], | |
| sample_rate=results[<span class="hljs-string">"sampling_rate"</span>], | |
| ) | |
| results = pipe( | |
| prompt=<span class="hljs-string">"The same astronaut now walks along a beach at sunset, humming the same tune"</span>, | |
| references=[reference], | |
| num_frames=<span class="hljs-number">124</span>, | |
| output=[<span class="hljs-string">"videos"</span>, <span class="hljs-string">"audio"</span>, <span class="hljs-string">"sampling_rate"</span>], | |
| )<!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="diffusers.MiniMaxH3ModularPipeline" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.MiniMaxH3ModularPipeline"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->MiniMaxH3ModularPipeline<!----></span></h2><!--]--><!----> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.MiniMaxH3ModularPipeline"><!----><h3 class="!m-0"><span class="flex-1 break-all md:text-lg bg-gradient-to-r px-2.5 py-1.5 rounded-xl from-indigo-50/70 to-white dark:from-gray-900 dark:to-gray-950 dark:text-indigo-300 text-indigo-700"><svg class="mr-1.5 text-indigo-500 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width=".8em" height=".8em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg><span class="font-light">class</span> <span class="font-medium">diffusers.</span><span class="font-semibold">MiniMaxH3ModularPipeline</span></span></h3><!----> <a id="diffusers.MiniMaxH3ModularPipeline" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.MiniMaxH3ModularPipeline"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/modular_pipeline.py#L150" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">blocks<span class="opacity-60">: diffusers.modular_pipelines.modular_pipeline.ModularPipelineBlocks | None = None</span></span></span><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">pretrained_model_name_or_path<span class="opacity-60">: str | os.PathLike | None = None</span></span></span><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">components_manager<span class="opacity-60">: diffusers.modular_pipelines.components_manager.ComponentsManager | None = None</span></span></span><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">collection<span class="opacity-60">: str | None = None</span></span></span><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">workflow<span class="opacity-60">: str | None = None</span></span></span><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">modular_config_dict<span class="opacity-60">: dict[str, typing.Any] | None = None</span></span></span><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">config_dict<span class="opacity-60">: dict[str, typing.Any] | None = None</span></span></span><span class="comma cursor-default"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">**kwargs<span class="opacity-60"></span></span></span><!--]--> <span>)</span> <!--[-1--><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div></div><!----> <p>MiniMax-H3를 활용한 비디오 + 오디오 결합 생성을 위한 ModularPipeline: <code>transformer/</code> 체크포인트 파티션에 대한 <code>t2va</code>(텍스트 전용) 및 <code>fl2va</code>(첫 번째 및/또는 마지막 키프레임) 워크플로, 그리고 <code>transformer_ref/</code>에 대한 <code>ref2va</code>(오미-리퍼런스) 워크플로입니다. 하나의 저장소에 두 파티션이 모두 포함되어 있으며, 워크플로를 선택하면 해당</p> <div class="relative group rounded-md"><a id="diffusers.MiniMaxH3ModularPipeline.example" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.MiniMaxH3ModularPipeline.example"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <p>own:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!---->pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>, workflow=<span class="hljs-string">"ref2va"</span>)<!----></pre></div><!----><!----></div><!----> <p>MiniMax-H3은 텍스트 조건부, 키프레임 조건부 잠재 변수, 오디오 잠재 변수, 비디오 잠재 변수를 모두 포함하는 <strong>하나의 패킹된 시퀀스</strong>를 디노이즈합니다. 이 때문에 블록들은 모달리티별 텐서 대신 행 레이아웃을 전달하며, 파이프라인은 단일 트랜스포머 호출 내에서 단계가 진행되는 두 개의 스케줄러(<code>shift = 12.0</code>는 비디오용, <code>shift = 3.0</code>는 오디오용)를 포함합니다.</p> <p>체크포인트는 guidance-distilled입니다. guidance가 가중치에 이미 반영되어 있으므로 guider, <code>negative_prompt</code>, <code>guidance_scale</code>이 없으며, 모든 단계에서 정확히 한 번의 forward pass만 실행됩니다.</p> <p>MiniMax-H3는 모듈식만 지원합니다. 이 파이프라인과 그 블록들이 통합의 전부이며, <code>DiffusionPipeline</code>의 일부는 존재하지 않습니다. 이 모듈은 모든 블록이 참조하는 모델 정보를 담고 있습니다. config에서 파생된 기하학적 구조는 프로퍼티로, 캔버스와 프레임 수 계산은 함수로 제공되며, 조건부 설정, 인코딩 및 노이즈 계약은 블록 자체에 정의되어 있습니다.</p> <div class="relative group rounded-md"><a id="diffusers.MiniMaxH3ModularPipeline.example-2" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.MiniMaxH3ModularPipeline.example-2"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> 복사됨</div><!----></button><!----></div> <pre class="language-py "><!----><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ModularPipeline | |
| pipe = ModularPipeline.from_pretrained(<span class="hljs-string">"MiniMaxAI/MiniMax-H3"</span>) | |
| pipe.load_components(dtype=torch.bfloat16)<!----></pre></div><!----></div><!----></div> <!--[1--><h2 class="relative group"><a id="diffusers.MiniMaxH3Blocks" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.MiniMaxH3Blocks"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->MiniMaxH3Blocks<!----></span></h2><!--]--><!----> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.MiniMaxH3Blocks"><!----><h3 class="!m-0"><span class="flex-1 break-all md:text-lg bg-gradient-to-r px-2.5 py-1.5 rounded-xl from-indigo-50/70 to-white dark:from-gray-900 dark:to-gray-950 dark:text-indigo-300 text-indigo-700"><svg class="mr-1.5 text-indigo-500 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width=".8em" height=".8em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg><span class="font-light">클래스</span> <span class="font-medium">diffusers.</span><span class="font-semibold">MiniMaxH3Blocks</span></span></h3><!----> <a id="diffusers.MiniMaxH3Blocks" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.MiniMaxH3Blocks"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/modular_blocks_minimax_h3.py#L659" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><!--]--> <span>)</span> <!--[-1--><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div></div><!----> <p>MiniMax-H3를 활용한 영상 + 오디오 결합 생성을 위한 Auto Modular 파이프라인 블록: <code>references</code> 및 keyframe 입력에 따라 선택되는 <code>t2va</code> (텍스트 전용), <code>fl2va</code> (첫 번째 및/또는 마지막 keyframe), <code>ref2va</code> (omni-reference) 워크플로우입니다. <code>workflow=</code>가 없으면 구성 요소를 로드할 때 <strong>두 개의</strong> 61.7GB transformer 파티션이 모두 로드되므로, 작업에 필요한 것만 로드하려면 하나를 전달하세요.</p> <p>지원되는 워크플로:</p> <ul><li><code>t2va</code>: <code>prompt</code> 필수</li> <li><code>fl2va</code>: <code>prompt</code>, <code>image</code> 또는 <code>prompt</code>, <code>last_image</code>가 필요합니다</li> <li><code>ref2va</code>: <code>prompt</code>, <code>references</code> 필수</li></ul> <p>구성 요소: | |
| image_processor (<code>VaeImageProcessor</code>) text_encoder (<code>Qwen3VLForConditionalGeneration</code>) tokenizer | |
| (<code>Qwen2Tokenizer</code>) processor (<code>Qwen3VLProcessor</code>) vae (<code>AutoencoderKLMiniMaxH3</code>) audio_vae | |
| (<code>AutoencoderKLMiniMaxH3Audio</code>) scheduler (<code>MiniMaxH3Scheduler</code>) audio_scheduler (<code>MiniMaxH3Scheduler</code>) | |
| transformer_ref (<code>MiniMaxH3Transformer3DModel</code>) transformer (<code>MiniMaxH3Transformer3DModel</code>) video_processor | |
| (<code>VideoProcessor</code>)</p> <p>Configs: | |
| canvas_short_edge (기본값: 768) canvas_max_pixels (기본값: 1032192) reference_image_short_edge (기본값: | |
| 2048)</p> <p>Inputs: | |
| references (<code>list</code>, <em>선택 사항</em>): | |
| 조건으로 사용할 참조 자료입니다. <strong>모델이 읽어야 할 순서대로</strong> 제공해야 합니다. 순서는 프롬프트 제시 시 라벨을 지정하고 공유 회전 시계(rotary clock)에 배치하는 방식이므로, 순서가 다르면 다른 요청이 됩니다. 각 모달리티마다 하나의 dataclass를 사용하며, 모두 메모리 내 미디어를 포함합니다. <code>MiniMaxH3ImageReference</code>(최대 9개), 자체 <code>fps</code>를 가진 <code>MiniMaxH3VideoReference</code>(최대 3개, <code>audio</code> 사운드트랙도 조건으로 사용됨), 또는 자체 <code>sample_rate</code>를 가진 <code>MiniMaxH3AudioReference</code>(최대 3개) — 총 12개까지의 참조 자료를 사용할 수 있으며, 오디오 참조 자료만 단독으로 사용할 수는 없습니다. 이러한 블록은 미디어 파일을 열지 않습니다: 각 클래스의 <code>from_file</code> 클래스 메서드를 사용하여 디코딩하면 레이트가 함께 가져와집니다. | |
| height (<code>int</code>, <em>선택 사항</em>): | |
| 생성된 비디오의 픽셀 단위 높이로, 32의 배수여야 합니다. | |
| width (<code>int</code>, <em>선택 사항</em>): | |
| 생성된 비디오의 픽셀 단위 너비로, 32의 배수여야 합니다. | |
| num_frames (<code>int</code>, <em>선택 사항</em>): | |
| 고정된 24 fps에서 생성할 프레임 수입니다. 비디오 VAE가 디코딩할 수 있는 다음 <code>17 * n + 5</code> 값으로 올림됩니다. 결과 지속 시간은 5초에서 15초 사이여야 합니다. 참조 사운드트랙과 동일한 길이의 비디오를 생성하려면 <code>round(samples / sample_rate * 24)</code>를 전달하세요. | |
| image (<code>Image</code>, <em>선택 사항</em>): | |
| 비디오가 시작하는 키프레임입니다. <em>신장</em>되어 대상 캔버스에 배치되며, 기본적으로 자체 종횡비에서 파생된 캔버스가 사용됩니다. | |
| last_image (<code>Image</code>, <em>선택 사항</em>): | |
| 비디오가 끝나는 키프레임입니다. 단독으로 전달하여 <em>특정 프레임까지</em> 생성할 수 있습니다. <code>image</code>와 함께 전달되면 두 개 중 후속 요소가 되어 캔버스에 커버 크롭됩니다. | |
| prompt (<code>str</code>): | |
| 생성을 안내하는 프롬프트로, 단일 문자열입니다. | |
| normalized_references (<code>list</code>, <em>선택 사항</em>): | |
| 설정 단계에서 정규화된 참조 자료로, 패킹 순서대로 나열됩니다. | |
| keyframes (<code>list</code>, <em>선택 사항</em>): | |
| 대상 캔버스에 배치된 키프레임으로, 패킹 순서대로 나열됩니다. | |
| condition_latents (<code>list</code>, <em>선택 사항</em>): | |
| 인코딩된 비디오 조건 latents로, 패킹 순서대로 이미지 및 비디오 참조 자료마다 하나씩 있습니다. 그 형상은 모든 참조 블록의 기하학적 구조가 유래하는 곳입니다. | |
| audio_condition_latents (<code>list</code>, <em>선택 사항</em>): | |
| 인코딩된 오디오 조건 행(row)으로, 패킹 순서대로 오디오를 포함하는 참조 자료마다 하나씩 있습니다. | |
| generator (<code>Generator</code>, <em>선택 사항</em>): | |
| 요청의 생성기입니다. 조건 노이즈가 먼저 추출되며, 조건마다 한 번씩 추출된 후 생성된 행의 노이즈가 추출됩니다. | |
| latents (<code>Tensor</code>): | |
| <code>(1, 24, num_latent_frames, latent_height, latent_width)</code> 형상의 사전 생성된 비디오 노이즈로, 추출 대신 사용됩니다. | |
| audio_latents (<code>Tensor</code>): | |
| <code>(2, 32, num_audio_latents)</code> 형상의 사전 생성된 오디오 노이즈입니다. | |
| num_inference_steps (<code>int</code>, <em>선택 사항</em>, 기본값 50): | |
| 디노이징 단계 수입니다. | |
| *<em>denoiser_input_fields (<code>None</code>,</em>선택 사항<em>): | |
| 트랜스포머가 이름으로 읽는 패킹된 시퀀스의 구조적 설명입니다: <code>token_tags</code>, <code>position_ids</code> 및 세 개의 행 인덱스 텐서. | |
| attention_kwargs (<code>dict</code>,</em>선택 사항<em>): | |
| 어텐션 프로세서용 추가 kwargs입니다. | |
| keyframe_anchors (<code>tuple</code>,</em>선택 사항<em>, 기본값 ()): | |
| 패킹 순서대로 각 키프레임이 비디오의 어느 끝에 앵커링되는지 지정합니다. | |
| output_type (<code>str</code>,</em>선택 사항*, 기본값 pil): | |
| 출력 형식: ‘pil’, ‘np’ 또는 ‘pt’.</p> <p>Outputs: | |
| videos (<code>list</code>): | |
| 생성된 비디오. | |
| audio (<code>Tensor</code>): | |
| 생성된 사운드트랙, 모양은 <code>(1, 2, num_samples)</code>입니다. | |
| sampling_rate (<code>int</code>): | |
| 생성된 사운드트랙의 Hz 단위 샘플링 레이트.</p></div> <!--[1--><h2 class="relative group"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->MiniMaxH3ImageReference<!----></span></h2><!--]--><!----> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference"><!----><h3 class="!m-0"><span class="flex-1 break-all md:text-lg bg-gradient-to-r px-2.5 py-1.5 rounded-xl from-indigo-50/70 to-white dark:from-gray-900 dark:to-gray-950 dark:text-indigo-300 text-indigo-700"><svg class="mr-1.5 text-indigo-500 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width=".8em" height=".8em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg><span class="font-light">class</span> <span class="font-medium">diffusers.modular_pipelines.minimax_h3.</span><span class="font-semibold">MiniMaxH3ImageReference</span></span></h3><!----> <a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/references.py#L82" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">image<span class="opacity-60">: typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor]</span></span></span><!--]--> <span>)</span> <!--[-1--><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[0--><p class="flex items-center font-semibold !mt-2 !mb-2 text-gray-800">매개변수 <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700 ml-3"></span></p> <ul class="px-2"><!--[--><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference.image" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference.image"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>image</strong> (<code>PIL.Image.Image</code>, <code>np.ndarray</code> 또는 <code>torch.Tensor</code>) — | |
| 참조 이미지: 이미지, <code>(height, width, 3)</code> 배열 또는 <code>(3, height, width)</code> 텐서이며, <code>uint8</code> 형식 또는 <code>[0, 1]</code> 범위의 부동소수점 값입니다. 생성된 기하 구조에 절대 구속되지 않으며, 요청이 생성하는 캔버스와 무관하게 자체의 짧은 변 기준으로 인코딩됩니다(발행된 체크포인트의 경우 2048).<!----></span></span></li><!--]--></ul><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div></div><!----> <p>주제, 스타일 또는 장면 참조: 요청당 최대 9개.</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"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference.from_file"><!----><h4 class="!m-0"><span class="flex-1 rounded-xl py-0.5 break-all bg-gradient-to-r from-blue-50/60 to-white dark:from-gray-900 dark:to-gray-950 text-blue-700 dark:text-blue-300 font-medium px-2"><svg width="1em" height="1em" viewBox="0 0 32 33" class="mr-1 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg"><path d="M5.80566 18.3545C4.90766 17.4565 4.90766 16.0005 5.80566 15.1025L14.3768 6.53142C15.2748 5.63342 16.7307 5.63342 17.6287 6.53142L26.1999 15.1025C27.0979 16.0005 27.0979 17.4565 26.1999 18.3545L17.6287 26.9256C16.7307 27.8236 15.2748 27.8236 14.3768 26.9256L5.80566 18.3545Z" fill="currentColor" fill-opacity="0.25"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.4801 13.9619C16.4801 12.9761 16.7467 12.5436 16.9443 12.3296C17.1764 12.078 17.5731 11.8517 18.2275 11.707C18.8821 11.5623 19.638 11.5342 20.4038 11.5582C20.7804 11.57 21.1341 11.5932 21.4719 11.6156L21.5263 11.6193C21.8195 11.6389 22.1626 11.6618 22.4429 11.6618V7.40825C22.3209 7.40825 22.1219 7.39596 21.7544 7.37149C21.4202 7.34925 20.9976 7.32115 20.5371 7.30672C19.6286 7.27824 18.4672 7.29779 17.3093 7.55377C16.1512 7.8098 14.8404 8.33724 13.8181 9.4452C12.7612 10.5907 12.2266 12.1236 12.2266 13.9619V15.0127H10.6836V19.2662H12.2266V26.6332H16.4801V19.2662H20.3394V15.0127H16.4801V13.9619Z" fill="currentColor"/></svg>from_file</span></h4><!----> <a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference.from_file" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference.from_file"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/references.py#L98" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">media<span class="opacity-60"></span></span></span><!--]--> <span>)</span> <!--[-1--><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[0--><p class="flex items-center font-semibold !mt-2 !mb-2 text-gray-800">매개변수 <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700 ml-3"></span></p> <ul class="px-2"><!--[--><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference.from_file.media" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3ImageReference.from_file.media"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>media</strong> (<code>str</code> 또는 <code>os.PathLike</code>) — 이미지의 경로 또는 URL.<!----></span></span></li><!--]--></ul><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div></div><!----> <p><code>MiniMaxH3ImageReference</code>에 <a href="/docs/diffusers/main/ko/api/utilities#diffusers.utils.load_image">load_image()</a>를 통해 이미지 파일을 로드합니다.</p></div></div> <!--[1--><h2 class="relative group"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->MiniMaxH3VideoReference<!----></span></h2><!--]--><!----> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference"><!----><h3 class="!m-0"><span class="flex-1 break-all md:text-lg bg-gradient-to-r px-2.5 py-1.5 rounded-xl from-indigo-50/70 to-white dark:from-gray-900 dark:to-gray-950 dark:text-indigo-300 text-indigo-700"><svg class="mr-1.5 text-indigo-500 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width=".8em" height=".8em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg><span class="font-light">class</span> <span class="font-medium">diffusers.modular_pipelines.minimax_h3.</span><span class="font-semibold">MiniMaxH3VideoReference</span></span></h3><!----> <a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/references.py#L110" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">frames<span class="opacity-60">: typing.Union[list[PIL.Image.Image], numpy.ndarray, torch.Tensor]</span></span></span><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">fps<span class="opacity-60">: float | None = None</span></span></span><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">audio<span class="opacity-60">: typing.Optional[torch.Tensor] = None</span></span></span><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">sample_rate<span class="opacity-60">: int | None = None</span></span></span><!--]--> <span>)</span> <!--[-1--><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[0--><p class="flex items-center font-semibold !mt-2 !mb-2 text-gray-800">매개변수 <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700 ml-3"></span></p> <ul class="px-2"><!--[--><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.frames" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.frames"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>frames</strong> (<code>list[PIL.Image.Image]</code>, <code>np.ndarray</code> 또는 <code>torch.Tensor</code>) — | |
| 참조 프레임: 이미지 목록, <code>(num_frames, height, width, 3)</code> 배열 또는 <code>(num_frames, 3, height, width)</code> 텐서, <code>uint8</code> 또는 <code>[0, 1]</code> 범위의 부동 소수점.<!----></span></span></li><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.fps" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.fps"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>fps</strong> (<code>float</code>, <em>선택 사항</em>, 기본값 24.0) — | |
| <code>frames</code>가 가지는 프레임 레이트입니다. 이 값이 레퍼런스의 비전 블록을 컨디셔너의 2 fps 그리드에 배치하는 기준이 됩니다. MiniMax-H3의 자체 클록은 24 fps이므로, 다른 레이트의 프레임은 전체 프레임을 삭제하고 복제하여 24 fps로 리샘플링됩니다. 따라서 프레임이 파일에서 가져온 경우 이 필드를 올바르게 설정하는 것이 중요합니다.<!----></span></span></li><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.audio" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.audio"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>audio</strong> (<code>torch.Tensor</code>, shape <code>(channels, num_samples)</code>, <em>선택 사항</em>) — | |
| 이 비디오의 사운드트랙으로, 모노 또는 스테레오입니다. 참조 대상 자체의 사운드트랙으로 조건화되며, 참조 대상이 아닌 다른 사운드트랙으로 조건화되지 않습니다. 이 인수를 생략하면 참조 대상은 움직임만으로 조건화됩니다.<!----></span></span></li><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.sample_rate" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.sample_rate"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>sample_rate</strong> (<code>int</code>, <em>선택 사항</em>) — | |
| <code>audio</code>가 샘플을 처리하는 비율입니다. 이 값을 지정하지 않으면 오디오 VAE 자체의 비율을 사용하며, 이 경우 샘플은 그대로 유지됩니다. 다른 비율을 지정하면 해당 비율로 리샘플링됩니다.<!----></span></span></li><!--]--></ul><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div></div><!----> <p>모션 및 카메라 참조: 요청당 최대 3개까지 가능하며, 각 참조는 자체 사운드트랙과 함께 조건부로 사용됩니다.</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"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.from_file"><!----><h4 class="!m-0"><span class="flex-1 rounded-xl py-0.5 break-all bg-gradient-to-r from-blue-50/60 to-white dark:from-gray-900 dark:to-gray-950 text-blue-700 dark:text-blue-300 font-medium px-2"><svg width="1em" height="1em" viewBox="0 0 32 33" class="mr-1 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg"><path d="M5.80566 18.3545C4.90766 17.4565 4.90766 16.0005 5.80566 15.1025L14.3768 6.53142C15.2748 5.63342 16.7307 5.63342 17.6287 6.53142L26.1999 15.1025C27.0979 16.0005 27.0979 17.4565 26.1999 18.3545L17.6287 26.9256C16.7307 27.8236 15.2748 27.8236 14.3768 26.9256L5.80566 18.3545Z" fill="currentColor" fill-opacity="0.25"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.4801 13.9619C16.4801 12.9761 16.7467 12.5436 16.9443 12.3296C17.1764 12.078 17.5731 11.8517 18.2275 11.707C18.8821 11.5623 19.638 11.5342 20.4038 11.5582C20.7804 11.57 21.1341 11.5932 21.4719 11.6156L21.5263 11.6193C21.8195 11.6389 22.1626 11.6618 22.4429 11.6618V7.40825C22.3209 7.40825 22.1219 7.39596 21.7544 7.37149C21.4202 7.34925 20.9976 7.32115 20.5371 7.30672C19.6286 7.27824 18.4672 7.29779 17.3093 7.55377C16.1512 7.8098 14.8404 8.33724 13.8181 9.4452C12.7612 10.5907 12.2266 12.1236 12.2266 13.9619V15.0127H10.6836V19.2662H12.2266V26.6332H16.4801V19.2662H20.3394V15.0127H16.4801V13.9619Z" fill="currentColor"/></svg>from_file</span></h4><!----> <a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.from_file" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.from_file"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/references.py#L146" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">media<span class="opacity-60"></span></span></span><!--]--> <span>)</span> <!--[0--><span class="font-bold">→</span> <span class="rounded hover:bg-gray-400 cursor-pointer"><!----><span><code>MiniMaxH3VideoReference</code></span><!----></span><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[0--><p class="flex items-center font-semibold !mt-2 !mb-2 text-gray-800">매개변수 <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700 ml-3"></span></p> <ul class="px-2"><!--[--><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.from_file.media" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.from_file.media"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>media</strong> (<code>str</code> 또는 <code>os.PathLike</code>) — 비디오의 경로 또는 URL.<!----></span></span></li><!--]--></ul><!--]--> <!--[-1--><!--]--> <!--[0--><div id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3VideoReference.from_file.returns" class="flex items-center font-semibold space-x-3 text-base !mt-0 !mb-0 text-gray-800 rounded "><p class="text-base"><!---->반환값<!----></p> <!--[0--><!----> | |
| <p><code>MiniMaxH3VideoReference</code></p> | |
| <!----><!--]--> <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700"></span></div> <div class="text-base"><!----> | |
| <p><code>(num_frames, height, width, 3)</code> <code>uint8</code> 프레임은 컨테이너가 보고하는 프레임 레이트를 가지며, 오디오 스트림이 있는 경우 해당 사운드트랙과 그 사운드트랙의 자체 샘플 레이트를 포함합니다.</p> | |
| <!----></div><!--]--> <!--[-1--><!--]--></div></div><!----> <p><code>MiniMaxH3VideoReference</code>로 비디오 파일을 디코딩합니다. 이때 해당 비디오가 가진 해상도, 프레임 레이트, 사운드트랙을 그대로 유지합니다.</p> <p>속도는 참조(reference)에 기록됩니다. 이는 <a href="/docs/diffusers/main/ko/api/utilities#diffusers.utils.load_video">load_video()</a> 대신 이 방식으로 디코딩하는 이유입니다. MiniMax-H3는 참조를 자체 24 fps로 리샘플링하므로, 입력 과정에서 손실된 프레임 레이트는 잘못된 속도로 조건부 설정된 요청이 되며, 이를 알리는 어떠한 경고도 없습니다. 메타데이터가 잘못된 컨테이너는 반환된 참조에서 <code>fps</code> 또는 <code>sample_rate</code>를 오버라이드하여 수정할 수 있습니다.</p> <p><a href="https://github.com/PyAV-Org/PyAV" rel="nofollow">PyAV</a>가 필요합니다.</p></div></div> <!--[1--><h2 class="relative group"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->MiniMaxH3AudioReference<!----></span></h2><!--]--><!----> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference"><!----><h3 class="!m-0"><span class="flex-1 break-all md:text-lg bg-gradient-to-r px-2.5 py-1.5 rounded-xl from-indigo-50/70 to-white dark:from-gray-900 dark:to-gray-950 dark:text-indigo-300 text-indigo-700"><svg class="mr-1.5 text-indigo-500 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width=".8em" height=".8em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg><span class="font-light">class</span> <span class="font-medium">diffusers.modular_pipelines.minimax_h3.</span><span class="font-semibold">MiniMaxH3AudioReference</span></span></h3><!----> <a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/references.py#L172" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">audio<span class="opacity-60">: Tensor</span></span></span><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">sample_rate<span class="opacity-60">: int | None = None</span></span></span><!--]--> <span>)</span> <!--[-1--><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[0--><p class="flex items-center font-semibold !mt-2 !mb-2 text-gray-800">매개변수 <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700 ml-3"></span></p> <ul class="px-2"><!--[--><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.audio" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.audio"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>audio</strong> (<code>torch.Tensor</code>, shape <code>(channels, num_samples)</code>) — | |
| 모노 또는 스테레오 기준 웨이브폼입니다.<!----></span></span></li><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.sample_rate" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.sample_rate"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>sample_rate</strong> (<code>int</code>, <em>선택 사항</em>) — | |
| <code>audio</code>가 샘플을 처리하는 비율입니다. 이 값을 지정하지 않으면 오디오 VAE 자체의 비율을 사용하며, 이 경우 샘플은 그대로 유지됩니다. 다른 비율을 지정하면 해당 비율로 리샘플링됩니다.<!----></span></span></li><!--]--></ul><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--> <!--[-1--><!--]--></div></div><!----> <p>음성 또는 음악 참조: 요청당 최대 3개이며 단독으로 사용할 수 없습니다. 오디오 참조는 반드시 이미지 또는 비디오 참조와 함께 사용해야 합니다. conditioner에는 전달되지 않으며 오디오 VAE에 의해만 인코딩됩니다.</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"><div><span class="group flex space-x-1.5 items-center text-gray-800 bg-gradient-to-r rounded-tr-lg -mt-4 -ml-4 pt-3 px-2.5" id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.from_file"><!----><h4 class="!m-0"><span class="flex-1 rounded-xl py-0.5 break-all bg-gradient-to-r from-blue-50/60 to-white dark:from-gray-900 dark:to-gray-950 text-blue-700 dark:text-blue-300 font-medium px-2"><svg width="1em" height="1em" viewBox="0 0 32 33" class="mr-1 inline-block -mt-0.5" xmlns="http://www.w3.org/2000/svg"><path d="M5.80566 18.3545C4.90766 17.4565 4.90766 16.0005 5.80566 15.1025L14.3768 6.53142C15.2748 5.63342 16.7307 5.63342 17.6287 6.53142L26.1999 15.1025C27.0979 16.0005 27.0979 17.4565 26.1999 18.3545L17.6287 26.9256C16.7307 27.8236 15.2748 27.8236 14.3768 26.9256L5.80566 18.3545Z" fill="currentColor" fill-opacity="0.25"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.4801 13.9619C16.4801 12.9761 16.7467 12.5436 16.9443 12.3296C17.1764 12.078 17.5731 11.8517 18.2275 11.707C18.8821 11.5623 19.638 11.5342 20.4038 11.5582C20.7804 11.57 21.1341 11.5932 21.4719 11.6156L21.5263 11.6193C21.8195 11.6389 22.1626 11.6618 22.4429 11.6618V7.40825C22.3209 7.40825 22.1219 7.39596 21.7544 7.37149C21.4202 7.34925 20.9976 7.32115 20.5371 7.30672C19.6286 7.27824 18.4672 7.29779 17.3093 7.55377C16.1512 7.8098 14.8404 8.33724 13.8181 9.4452C12.7612 10.5907 12.2266 12.1236 12.2266 13.9619V15.0127H10.6836V19.2662H12.2266V26.6332H16.4801V19.2662H20.3394V15.0127H16.4801V13.9619Z" fill="currentColor"/></svg>from_file</span></h4><!----> <a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.from_file" class="header-link invisible with-hover:group-hover:visible pr-2" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.from_file"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></a> <!--[0--><a class="!ml-auto !text-gray-400 !no-underline text-sm flex items-center" href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/minimax_h3/references.py#L191" target="_blank"><span><</span> <span class="hidden md:block mx-0.5 hover:!underline">source</span> <span>></span></a><!--]--></span> <!--[0--><p class="font-mono text-xs md:text-sm !leading-relaxed !my-6"><span>(</span> <!--[--><span class="comma cursor-pointer"><span class="rounded hover:bg-black hover:text-white dark:hover:bg-white dark:hover:text-black">media<span class="opacity-60"></span></span></span><!--]--> <span>)</span> <!--[0--><span class="font-bold">→</span> <span class="rounded hover:bg-gray-400 cursor-pointer"><!----><span><code>MiniMaxH3AudioReference</code></span><!----></span><!--]--></p><!--]--> <div class="!mb-10 relative docstring-details "><!--[-1--><!--]--> <!--[0--><p class="flex items-center font-semibold !mt-2 !mb-2 text-gray-800">매개변수 <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700 ml-3"></span></p> <ul class="px-2"><!--[--><li class="text-base !pl-4 my-3 rounded "><span class="group flex space-x-1.5 items-start"><a id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.from_file.media" class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.from_file.media"><span><svg class="text-smd" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!----><strong>media</strong> (<code>str</code> 또는 <code>os.PathLike</code>) — 오디오의 경로 또는 URL, 또는 사운드트랙이 추출될 비디오의 경로 또는 URL.<!----></span></span></li><!--]--></ul><!--]--> <!--[-1--><!--]--> <!--[0--><div id="diffusers.modular_pipelines.minimax_h3.MiniMaxH3AudioReference.from_file.returns" class="flex items-center font-semibold space-x-3 text-base !mt-0 !mb-0 text-gray-800 rounded "><p class="text-base"><!---->반환값<!----></p> <!--[0--><!----> | |
| <p><code>MiniMaxH3AudioReference</code></p> | |
| <!----><!--]--> <span class="flex-auto border-t-2 border-gray-100 dark:border-gray-700"></span></div> <div class="text-base"><!----> | |
| <p>컨테이너가 보고하는 샘플 레이트의 <code>(channels, num_samples)</code> float32 웨이브폼</p> | |
| <!----></div><!--]--> <!--[-1--><!--]--></div></div><!----> <p><code>MiniMaxH3AudioReference</code>로 오디오 파일을 해당 파일이 포함하는 샘플 레이트로 디코딩합니다.</p> <p><a href="https://github.com/PyAV-Org/PyAV" rel="nofollow">PyAV</a>가 필요합니다.</p></div></div> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/minimax_h3.md" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg><!----> <span><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]--> | |
| <script> | |
| { | |
| __sveltekit_g37pnb = { | |
| base: "/docs/diffusers/main/en", | |
| assets: "/docs/diffusers/main/en" | |
| }; | |
| const element = document.currentScript.parentElement; | |
| Promise.all([ | |
| import("/docs/diffusers/main/en/_app/immutable/entry/start.D3LnKZ4R.js"), | |
| import("/docs/diffusers/main/en/_app/immutable/entry/app.C0rBoMxR.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 213], | |
| data: [null,null], | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 127 kB
- Xet hash:
- d9ec6ebf93e8352a99920d7d9b4d6f8c12418245a8e65deece369b76e78234f2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.