Buckets:

mishig's picture
download
raw
46 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Mellonでのカスタムブロックの使用&quot;,&quot;local&quot;:&quot;using-custom-blocks-with-mellon&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}"/>
<link href="/docs/diffusers/main/en/_app/immutable/entry/start.0S0_iEoG.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/I9eooN77.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/Bupkjr9f.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/entry/app.CPdOxCbw.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/CyvZ3FS5.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/l0QnnOED.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.DteTvmQZ.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/CoSrdQax.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/nodes/323.Dfgiz8-i.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/DSPDl1gz.js" rel="modulepreload">
<!--1gvor5n--><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Using Custom Blocks with Mellon&quot;,&quot;local&quot;:&quot;using-custom-blocks-with-mellon&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}"/><!---->
<link href="/docs/diffusers/main/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><p></p> <!--[1--><h2 class="relative group"><a id="using-custom-blocks-with-mellon" 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="#using-custom-blocks-with-mellon"><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><!---->Mellonでのカスタムブロックの使用<!----></span></h2><!--]--><!----> <p><a href="https://github.com/cubiq/Mellon" rel="nofollow">Mellon</a>は、Modular Diffusersと統合されたビジュアルワークフローインターフェースであり、ノードベースのワークフロー向けに設計されています。</p> <blockquote class="warning"><p>Mellon は初期開発段階にあり、まだ本番環境での使用には対応していません。統合の仕組みを垣間見るものとしてお考えください。</p></blockquote> <p>カスタムブロックはMellonでそのまま動作します。リポジトリに<code>mellon_pipeline_config.json</code>を追加するだけです。この設定ファイルは、MellonにブロックのパラメータをUIコンポーネントとしてどのようにレンダリングするかを伝えます。</p> <p><a href="https://huggingface.co/diffusers/gemini-prompt-expander-mellon" rel="nofollow">Gemini Prompt Expander</a>ブロックを実際に使用した際の動作は以下の通りです。</p> <p><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/modular_demo_dynamic.gif" alt="Mellon custom block demo"/></p> <p>Mellon でモジュール化された diffusers カスタムブロックを使用するには:</p> <ol><li>ModularDiffusers セクションから<strong>Dynamic Block Node</strong>をドラッグします</li> <li><code>repo_id</code>(例: <code>diffusers/gemini-prompt-expander-mellon</code>)を入力してください</li> <li><strong>カスタムブロックの読み込み</strong>をクリックします</li> <li>ノードが変形し、ブロックの入力と出力を表示します</li></ol> <p>では、独自のブロック用にこの設定を作成する方法を順を追って見ていきましょう。</p> <!--[1--><h2 class="relative group"><a id="steps-to-create-a-mellon-config" 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="#steps-to-create-a-mellon-config"><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><!---->Mellon設定を作成する手順<!----></span></h2><!--]--><!----> <ol><li><strong>パラメータにMellonの型を指定する</strong> - 各<code>InputParam</code>/<code>OutputParam</code>には、MellonがどのUIコンポーネントを描画するかを伝える型が必要です(例: <code>"textbox"</code>、<code>"dropdown"</code>、<code>"image"</code>)。</li> <li><strong><code>mellon_pipeline_config.json</code> を生成する</strong> - ユーティリティを使用して設定テンプレートを生成し、Hub リポジトリにプッシュします。</li> <li><strong>(任意)設定を手動で調整する</strong> - 特定のニーズに合わせて生成された設定を微調整します。</li></ol> <!--[1--><h2 class="relative group"><a id="specify-mellon-types-for-parameters" 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="#specify-mellon-types-for-parameters"><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><!---->パラメータのMellon型を指定します<!----></span></h2><!--]--><!----> <p>Mellon の型は、UI における各パラメータのレンダリング方法を決定します。パラメータの型を指定しない場合、<code>"custom"</code> がデフォルトとして使用され、単純な接続ドットとしてレンダリングされます。この設定は、生成された config でいつでも後から調整できます。</p> <table><thead><tr><th>型</th><th>入力/出力</th><th>説明</th></tr></thead><tbody><tr><td><code>image</code></td><td>両方</td><td>画像 (PIL Image)</td></tr><tr><td><code>video</code></td><td>両方</td><td>動画</td></tr><tr><td><code>text</code></td><td>両方</td><td>テキスト表示</td></tr><tr><td><code>textbox</code></td><td>入力</td><td>テキスト入力</td></tr><tr><td><code>dropdown</code></td><td>入力</td><td>ドロップダウン選択メニュー</td></tr><tr><td><code>slider</code></td><td>入力</td><td>数値用のスライダー</td></tr><tr><td><code>number</code></td><td>入力</td><td>数値入力</td></tr><tr><td><code>checkbox</code></td><td>入力</td><td>ブール値トグル</td></tr></tbody></table> <p>より多くの設定が必要なパラメータ(オプション付きのドロップダウンや、最小値/最大値を持つスライダーなど)には、文字列の代わりに <code>MellonParam</code> インスタンスを直接渡します。以下のクラスメソッドのいずれかを使用するか、<code>MellonParam(name, label, type, ...)</code> を用いて完全にカスタマイズされたものを作成できます。</p> <table><thead><tr><th>メソッド</th><th>説明</th></tr></thead><tbody><tr><td><code>MellonParam.Input.image(name)</code></td><td>画像入力</td></tr><tr><td><code>MellonParam.Input.textbox(name, default)</code></td><td>テキストエリアとしてのテキスト入力</td></tr><tr><td><code>MellonParam.Input.dropdown(name, options, default)</code></td><td>ドロップダウン選択</td></tr><tr><td><code>MellonParam.Input.slider(name, default, min, max, step)</code></td><td>数値用のスライダー</td></tr><tr><td><code>MellonParam.Input.number(name, default, min, max, step)</code></td><td>数値入力(スライダーなし)</td></tr><tr><td><code>MellonParam.Input.seed(name, default)</code></td><td>ランダム化ボタン付きのシード入力</td></tr><tr><td><code>MellonParam.Input.checkbox(name, default)</code></td><td>Boolean チェックボックス</td></tr><tr><td><code>MellonParam.Input.model(name)</code></td><td>diffusers コンポーネントのモデル入力</td></tr><tr><td><code>MellonParam.Output.image(name)</code></td><td>画像出力</td></tr><tr><td><code>MellonParam.Output.video(name)</code></td><td>動画出力</td></tr><tr><td><code>MellonParam.Output.text(name)</code></td><td>テキスト出力</td></tr><tr><td><code>MellonParam.Output.model(name)</code></td><td>diffusers コンポーネントのモデル出力</td></tr></tbody></table> <p>Mellon の型を指定するには、以下の方法のいずれかを選択してください。</p> <!--[2--><h3 class="relative group"><a id="using-metadata-in-block-definitions" 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="#using-metadata-in-block-definitions"><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>metadata={"mellon": "&lt;type>"}</code> を <code>InputParam</code> および <code>OutputParam</code> の定義に直接追加してください。Hub 上の既存のカスタムブロックを編集する場合は、ローカルにダウンロードする方法については <a href="./custom_blocks#editing-custom-blocks">カスタムブロックの編集</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-python "><!----><span class="hljs-keyword">class</span> <span class="hljs-title class_">GeminiPromptExpander</span>(<span class="hljs-title class_ inherited__">ModularPipelineBlocks</span>):
<span class="hljs-meta"> @property</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">inputs</span>(<span class="hljs-params">self</span>) -&gt; <span class="hljs-type">List</span>[InputParam]:
<span class="hljs-keyword">return</span> [
InputParam(
<span class="hljs-string">&quot;prompt&quot;</span>,
type_hint=<span class="hljs-built_in">str</span>,
required=<span class="hljs-literal">True</span>,
description=<span class="hljs-string">&quot;Prompt to use&quot;</span>,
metadata={<span class="hljs-string">&quot;mellon&quot;</span>: <span class="hljs-string">&quot;textbox&quot;</span>}, <span class="hljs-comment"># Text input</span>
)
]
<span class="hljs-meta"> @property</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">intermediate_outputs</span>(<span class="hljs-params">self</span>) -&gt; <span class="hljs-type">List</span>[OutputParam]:
<span class="hljs-keyword">return</span> [
OutputParam(
<span class="hljs-string">&quot;prompt&quot;</span>,
type_hint=<span class="hljs-built_in">str</span>,
description=<span class="hljs-string">&quot;Expanded prompt by the LLM&quot;</span>,
metadata={<span class="hljs-string">&quot;mellon&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>}, <span class="hljs-comment"># Text output</span>
),
OutputParam(
<span class="hljs-string">&quot;old_prompt&quot;</span>,
type_hint=<span class="hljs-built_in">str</span>,
description=<span class="hljs-string">&quot;Old prompt provided by the user&quot;</span>,
&lt;CopyLLMTxtMenu containerStyle=<span class="hljs-string">&quot;float: inline-end; margin-inline-start: 10px; display: inline-flex; position: relative; z-index: 10;&quot;</span>&gt;&lt;/CopyLLMTxtMenu&gt;
<span class="hljs-comment"># No metadata - we don&#x27;t want to render this in UI</span>
)
]<!----></pre></div><!----> <p>UI設定を完全に制御するには、<code>MellonParam</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-python "><!----><span class="hljs-keyword">from</span> diffusers.modular_pipelines.mellon_node_utils <span class="hljs-keyword">import</span> MellonParam
InputParam(
<span class="hljs-string">&quot;mode&quot;</span>,
type_hint=<span class="hljs-built_in">str</span>,
default=<span class="hljs-string">&quot;balanced&quot;</span>,
metadata={<span class="hljs-string">&quot;mellon&quot;</span>: MellonParam.Input.dropdown(<span class="hljs-string">&quot;mode&quot;</span>, options=[<span class="hljs-string">&quot;fast&quot;</span>, <span class="hljs-string">&quot;balanced&quot;</span>, <span class="hljs-string">&quot;quality&quot;</span>])},
)<!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="using-inputtypes-and-outputtypes-when-generating-config" 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="#using-inputtypes-and-outputtypes-when-generating-config"><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><!---->Generating Config を生成する際の input_types と output_types の使用<!----></span></h3><!--]--><!----> <p>既存のパイプラインを使用している場合、またはブロック定義を整理整頓しておきたい場合は、<code>input_types/output_types</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-python "><!----><span class="hljs-keyword">from</span> diffusers.modular_pipelines.mellon_node_utils <span class="hljs-keyword">import</span> MellonPipelineConfig
mellon_config = MellonPipelineConfig.from_custom_block(
blocks,
input_types={<span class="hljs-string">&quot;prompt&quot;</span>: <span class="hljs-string">&quot;textbox&quot;</span>},
output_types={<span class="hljs-string">&quot;prompt&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>}
)<!----></pre></div><!----> <blockquote class="note"><p><code>metadata</code> と <code>input_types</code>/<code>output_types</code> の両方が指定されている場合、引数が <code>metadata</code> を上書きします。</p></blockquote> <!--[1--><h2 class="relative group"><a id="generate-and-push-the-mellon-config" 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="#generate-and-push-the-mellon-config"><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><!---->Mellon設定を生成してプッシュします<!----></span></h2><!--]--><!----> <p>ブロックにメタデータを追加した後、デフォルトのMellon設定テンプレートを生成し、Hubにプッシュします:</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-python "><!----><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ModularPipelineBlocks
<span class="hljs-keyword">from</span> diffusers.modular_pipelines.mellon_node_utils <span class="hljs-keyword">import</span> MellonPipelineConfig
<span class="hljs-comment"># load your custom blocks from your local dir</span>
blocks = ModularPipelineBlocks.from_pretrained(<span class="hljs-string">&quot;/path/local/folder&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-comment"># Generate the default config template</span>
mellon_config = MellonPipelineConfig.from_custom_block(blocks)
<span class="hljs-comment"># push the default template to `repo_id`, you will need to pass the same local folder path so that it will save the config locally first</span>
mellon_config.save(
local_dir=<span class="hljs-string">&quot;/path/local/folder&quot;</span>,
repo_id= repo_id,
push_to_hub=<span class="hljs-literal">True</span>
)<!----></pre></div><!----> <p>これにより、リポジトリに<code>mellon_pipeline_config.json</code>ファイルが作成されます。</p> <!--[1--><h2 class="relative group"><a id="review-and-adjust-the-config" 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="#review-and-adjust-the-config"><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>生成されたテンプレートは出発点にすぎません。必要に応じて調整することをお勧めします。Gemini Prompt Expander の生成された設定を順を追って見ていきましょう。</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-json "><!----><span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Gemini Prompt Expander&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;default_repo&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;default_dtype&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;node_params&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;custom&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;params&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;prompt&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Prompt&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;string&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;display&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;textarea&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;default&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;out_prompt&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Prompt&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;string&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;display&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;output&quot;</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;old_prompt&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Old Prompt&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;custom&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;display&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;output&quot;</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;doc&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Doc&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;string&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;display&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;output&quot;</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;input_names&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><span class="hljs-string">&quot;prompt&quot;</span><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;model_input_names&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;output_names&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><span class="hljs-string">&quot;out_prompt&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-string">&quot;old_prompt&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-string">&quot;doc&quot;</span><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;block_name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;custom&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;node_type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;custom&quot;</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="understanding-the-structure" 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="#understanding-the-structure"><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>params</code> ディクショナリは、各 UI 要素のレンダリング方法を定義します。<code>input_names</code>、<code>model_input_names</code>、<code>output_names</code> のリストは、これらの UI 要素を基盤となる <a href="/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline_blocks#diffusers.ModularPipelineBlocks">ModularPipelineBlocks</a> の I/O インターフェースにマッピングします。</p> <table><thead><tr><th>Mellon 設定</th><th>ModularPipelineBlocks</th></tr></thead><tbody><tr><td><code>input_names</code></td><td><code>inputs</code>プロパティ</td></tr><tr><td><code>model_input_names</code></td><td><code>expected_components</code> プロパティ</td></tr><tr><td><code>output_names</code></td><td><code>intermediate_outputs</code>プロパティ</td></tr></tbody></table> <p>この例では、<code>prompt</code> が唯一の入力です。モデルのコンポーネントは存在せず、出力には <code>out_prompt</code>、<code>old_prompt</code>、<code>doc</code> が含まれます。</p> <p>では、<code>params</code> ディクショナリを見てみましょう。</p> <ul><li><p><strong><code>prompt</code></strong>: <code>display: "textarea"</code>(テキスト入力ボックスとしてレンダリングされる)、<code>label: "Prompt"</code>(UIに表示される)、<code>default: ""</code>(初期状態は空)を持つ入力パラメータです。<code>type: "string"</code> フィールドは Mellon において重要であり、どのノード同士を接続できるかを決定します。同じ型を持つノードのみが「ヌードル」でリンクできます。</p></li> <li><p><strong><code>out_prompt</code></strong>: 展開されたプロンプトの出力です。入力と出力が同じ名前(<code>prompt</code>)を共有しているため、設定内の名前衝突を避けるために<code>out_</code>プレフィックスが自動的に付与されました。<code>display: "output"</code>が設定されており、出力ソケットとしてレンダリングされます。</p></li> <li><p><strong><code>old_prompt</code></strong>: メタデータを指定していないため、<code>type: "custom"</code> になっています。これにより、UI では単純なドットとして表示されます。実際には UI に公開したくないため、削除できます。</p></li> <li><p><strong><code>doc</code></strong>: ドキュメント出力。すべてのカスタムブロックに自動的に追加されます。</p></li></ul> <!--[2--><h3 class="relative group"><a id="making-adjustments" 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="#making-adjustments"><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>old_prompt</code> を <code>params</code> と <code>output_names</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-json "><!----><span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Gemini Prompt Expander&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;default_repo&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;default_dtype&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;node_params&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;custom&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;params&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;prompt&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Prompt&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;string&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;display&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;textarea&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;default&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;out_prompt&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Prompt&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;string&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;display&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;output&quot;</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;doc&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Doc&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;string&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;display&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;output&quot;</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;input_names&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><span class="hljs-string">&quot;prompt&quot;</span><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;model_input_names&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;output_names&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><span class="hljs-string">&quot;out_prompt&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-string">&quot;doc&quot;</span><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;block_name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;custom&quot;</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">&quot;node_type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;custom&quot;</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">}</span><!----></pre></div><!----> <p><a href="https://huggingface.co/diffusers/gemini-prompt-expander-mellon" rel="nofollow">diffusers/gemini-prompt-expander-mellon</a> に最終的な設定があります。</p> <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/modular_diffusers/mellon.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_1qsdbwf = {
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.0S0_iEoG.js"),
import("/docs/diffusers/main/en/_app/immutable/entry/app.CPdOxCbw.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 323],
data: [null,null],
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
46 kB
·
Xet hash:
d9b2d1d41694ef617511857afc471d8b50fc7f6c596c3192f7cc527c2ad975af

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