Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"Komut satırı arayüzü","local":"command-line-interface","sections":[{"title":"Kullanılabilir komutlar","local":"available-commands","sections":[],"depth":2},{"title":"env","local":"env","sections":[],"depth":2},{"title":"şema","local":"schema","sections":[],"depth":2},{"title":"çalıştır","local":"run","sections":[{"title":"Hattın argümanlarını iletme","local":"passing-pipeline-arguments","sections":[],"depth":3},{"title":"Yükleniyor","local":"loading","sections":[],"depth":3},{"title":"Optimizasyonlar","local":"optimizations","sections":[],"depth":3},{"title":"Modüler hatlar","local":"modular-pipelines","sections":[],"depth":3},{"title":"Çıktılar","local":"outputs","sections":[],"depth":3},{"title":"Uzak yürütme ( --remote )","local":"remote-execution----remote-","sections":[],"depth":3}],"depth":2},{"title":"custom_blocks","local":"customblocks","sections":[],"depth":2},{"title":"fp16_safetensors","local":"fp16safetensors","sections":[],"depth":2},{"title":"beceriler","local":"skills","sections":[],"depth":2}],"depth":1}"/> | |
| <link href="/docs/diffusers/main/en/_app/immutable/entry/start.vZc-dOUR.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/Bafuik5c.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.B6c3Ml05.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.BQlx092V.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/380.tOQoTovb.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/B4AMoTAu.js" rel="modulepreload"> | |
| <!--1wkohmy--><meta name="hf:doc:metadata" content="{"title":"Command line interface","local":"command-line-interface","sections":[{"title":"Available commands","local":"available-commands","sections":[],"depth":2},{"title":"env","local":"env","sections":[],"depth":2},{"title":"schema","local":"schema","sections":[],"depth":2},{"title":"run","local":"run","sections":[{"title":"Passing pipeline arguments","local":"passing-pipeline-arguments","sections":[],"depth":3},{"title":"Loading","local":"loading","sections":[],"depth":3},{"title":"Optimizations","local":"optimizations","sections":[],"depth":3},{"title":"Modular pipelines","local":"modular-pipelines","sections":[],"depth":3},{"title":"Outputs","local":"outputs","sections":[],"depth":3},{"title":"Remote execution ( --remote )","local":"remote-execution----remote-","sections":[],"depth":3}],"depth":2},{"title":"custom_blocks","local":"customblocks","sections":[],"depth":2},{"title":"fp16_safetensors","local":"fp16safetensors","sections":[],"depth":2},{"title":"skills","local":"skills","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="command-line-interface" 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="#command-line-interface"><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><!---->Komut satırı arayüzü<!----></span></h1><!--]--><!----> <p><code>diffusers-cli</code>, Diffusers pipeline'lerini çalıştırmak, denetlemek ve paketlemek için kullanılan bir komut satırı istemcisidir.</p> <!--[1--><h2 class="relative group"><a id="available-commands" 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="#available-commands"><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><!---->Kullanılabilir komutlar<!----></span></h2><!--]--><!----> <table><thead><tr><th>Komut</th><th>Amaç</th></tr></thead><tbody><tr><td><a href="#env"><code>env</code></a></td><td>Hata raporları için ortam bilgilerini yazdırın.</td></tr><tr><td><a href="#schema"><code>schema</code></a></td><td>Ağırlıkları indirmeden bir hattın <code>__call__</code> imzasını inceleyin.</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Bir pipeline'ı yerel olarak veya bir Hugging Face Sandbox'ta çalıştırın.</td></tr><tr><td><a href="#customblocks"><code>custom_blocks</code></a></td><td>Yerel bir <code>ModularPipelineBlocks</code> alt sınıfını Hub için paketleyin.</td></tr><tr><td><a href="#fp16safetensors"><code>fp16_safetensors</code></a></td><td>Bir kontrol noktasını <code>.safetensors</code> olarak fp16'ya dönüştürün.</td></tr><tr><td><a href="#skills"><code>skills</code></a></td><td>Yapay zekâ kodlama aracınıza önceden oluşturulmuş beceri demetlerini yükleyin.</td></tr></tbody></table> <blockquote class="tip"><p>Bu sayfa, her alt komutun altındaki tüm seçenekler için ayrıntılar sunmaz. Herhangi bir alt komut için tam ve her zaman güncel seçenek listesini görmek için <code>diffusers-cli <command> --help</code> (<code>diffusers-cli run --help</code>) komutunu çalıştırın.</p></blockquote> <!--[1--><h2 class="relative group"><a id="env" 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="#env"><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><!---->env<!----></span></h2><!--]--><!----> <p>Python, PyTorch, Diffusers sürümlerini, CUDA bilgilerini ve kurulu isteğe bağlı bağımlılıkları yazdırır. Sorun açarken, bakımcıların kurulumunuzu yeniden oluşturabilmesi için bunu kullanın.</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli <span class="hljs-built_in">env</span><!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="schema" 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="#schema"><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><!---->şema<!----></span></h2><!--]--><!----> <p>Ağırlıkları indirmeden hattın kabul ettiği girdileri döndürür. <a href="#run"><code>run</code></a> için <code>--pipeline-kwargs</code> oluştururken kullanın.</p> <p>Yalnızca indeks dosyası alınır. Standart iş akışları <code>model_index.json</code> dosyasını okur. Modüler iş akışları <code>modular_model_index.json</code> dosyasını okur. Özel blok depoları <code>modular_config.json</code> dosyasını okur ve Hub kodunun çalıştırılması gerektiğinden <code>--trust-remote-code</code> parametresine ihtiyaç duyar.</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli --format json schema --model black-forest-labs/FLUX.1-dev | |
| diffusers-cli schema --model my-org/my-custom-blocks --trust-remote-code<!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="run" 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="#run"><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><!---->çalıştır<!----></span></h2><!--]--><!----> <p>Bir pipeline’ı uçtan uca çalıştırın. CLI, standart ve modüler depoları otomatik olarak algılar. Medya girdilerini URL’lerden veya yerel yollardan otomatik yükler, pipeline’ın dönüş türüne göre çıktıları kaydeder ve <code>--remote</code> ile Hugging Face Sandbox üzerinde uzaktan çalıştırılabilir.</p> <p>Minimal örnek:</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \ | |
| --model black-forest-labs/FLUX.1-dev \ | |
| --dtype bf16 \ | |
| --pipeline-kwargs <span class="hljs-string">'{"prompt": "an astronaut riding a horse"}'</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="passing-pipeline-arguments" 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="#passing-pipeline-arguments"><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><!---->Hattın argümanlarını iletme<!----></span></h3><!--]--><!----> <p><code>--pipeline-kwargs</code>, <code>pipeline(**kwargs)</code> ile iletilecek bir JSON nesnesi alır. Bilinen medya-girdi anahtarlarındaki dize değerleri otomatik olarak yüklenir:</p> <ul><li>Görseller (<code>image</code>, <code>last_image</code>, <code>mask_image</code>, <code>control_image</code>, <code>ip_adapter_image</code>, <code>image_2</code>) → <code>load_image</code> ile <code>PIL.Image</code>.</li> <li>Videolar (<code>video</code>, <code>control_video</code>) → <code>load_video</code> ile <code>list[PIL.Image]</code>.</li> <li>Ses (<code>initial_audio_waveforms</code>, <code>reference_audio</code>, <code>src_audio</code>) → <code>torchaudio.load</code> üzerinden <code>torch.Tensor</code>.</li></ul> <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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \ | |
| --model black-forest-labs/FLUX.2-klein-9B --dtype bf16 \ | |
| --pipeline-kwargs <span class="hljs-string">'{"prompt": "make the fur grey", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png", "strength": 0.6}'</span><!----></pre></div><!----> <p>Hem medya anahtarları hem de metin anahtarları, bir partiyi tek bir pipeline çağrısıyla çalıştırmak için JSON dizisi kabul eder. Medya listesindeki her giriş ayrı ayrı yüklenir (URL, yerel yol veya bucket-mount yolu) ve Diffusers, listeyi GPU üzerinde tek bir ileri geçişte işler:</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \ | |
| --model black-forest-labs/FLUX.1-Kontext-dev --dtype bf16 \ | |
| --pipeline-kwargs <span class="hljs-string">'{ | |
| "prompt": ["make it grey", "make it pink", "make it blue"], | |
| "image": [ | |
| "https://.../cat1.png", | |
| "https://.../cat2.png", | |
| "https://.../cat3.png" | |
| ] | |
| }'</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="loading" 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="#loading"><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><!---->Yükleniyor<!----></span></h3><!--]--><!----> <p>CLI'nin model ağırlıklarını ve özel pipeline kodunu nasıl yükleyeceğini yapılandırın.</p> <ul><li><p><code>--dtype {auto, bfloat16, bf16, float16, fp16, float32, fp32}</code> — ağırlık dtype.</p></li> <li><p><code>--device-map <value></code> — bileşen yerleşimi. Bir torch cihaz dizisi (<code>cuda</code>, <code>cuda:0</code>, <code>cpu</code>, <code>mps</code>), <code>balanced</code> (bileşenleri görünür GPU'lar arasında otomatik olarak böler) veya bileşen başına açık yerleşim için bir JSON sözlüğü kabul eder. | |
| Atlanırsa otomatik olarak algılanır. Daha fazla ayrıntı için <a href="../training/distributed_inference#devicemap">device_map</a> bölümüne bakın.</p></li> <li><p><code>--variant fp16</code> — bir ağırlık varyantı seçin.</p></li> <li><p><code>--revision <sha></code> — belirli bir model revizyonunu sabitlemek için kullanılır.</p></li> <li><p><code>--trust-remote-code</code> — Hub'dan özel kodlara izin verir (özel pipeline sınıfları veya modüler bloklar içeren depolar için gereklidir). Standart özel pipeline'lar için <a href="../using-diffusers/custom_pipeline_overview">Topluluk pipeline'ları</a> ve <a href="../modular_diffusers/overview">Modüler Diffusers</a> konusuna bakın.</p></li> <li><p><code>--lora <spec></code> — yükleme işleminden sonra bir LoRA adaptörü ekler. Her değer bir JSON sözlüğüdür. Birden fazla adaptörü yığmak için bayrağı tekrarlayın. Her giriş için <code>lora_id</code> zorunludur, <code>lora_scale</code> varsayılan olarak <code>1.0</code> değerini alır ve <code>adapter_name</code> isteğe bağlıdır (yığınlama sırasında <code>lora_<i></code> olarak otomatik oluşturulur).</p> <ul><li>Tekli: <code>--lora '{"lora_id": "alvdansen/flux-koda", "lora_scale": 0.8}'</code></li> <li>Birden fazla: <code>--lora '{"lora_id": "alvdansen/flux-koda", "lora_scale": 0.6, "adapter_name": "koda"}' --lora '{"lora_id": "Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur", "lora_scale": 0.4}'</code></li></ul> <p>Tüm özellikler <code>pipeline.load_lora_weights(...)</code> ile yüklenir, ardından tek bir <code>pipeline.set_adapters(names, adapter_weights=scales)</code> çağrısıyla birlikte etkinleştirilir. Adaptör yığınlama, ölçek zamanlaması ve sıcak değiştirme konularının daha ayrıntılı açıklaması için <a href="../tutorials/using_peft_for_inference">LoRA</a> bölümüne bakın.</p></li></ul> <!--[2--><h3 class="relative group"><a id="optimizations" 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="#optimizations"><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><!---->Optimizasyonlar<!----></span></h3><!--]--><!----> <ul><li><code>--cpu-offload {model, group, auto}</code> — onload hedefi şuradan gelir <code>--device-map</code> (offload için düz cihaz dizgesi gereklidir). <ul><li><code>model</code> — standart boru hatları için <code>enable_model_cpu_offload</code>. <a href="../optimization/memory#model-offloading">Model offloading</a> bölümüne bakın.</li> <li><code>group</code> — standart iş akışları için <code>enable_group_offload(offload_type="leaf_level", use_stream=True)</code>. <a href="../optimization/memory#group-offloading">Grup offloading</a> bölümüne bakın.</li> <li><code>auto</code> — yalnızca <a href="../modular_diffusers/components_manager"><code>ComponentsManager</code></a> ile modüler. Standart modlar, modüler boru hatlarında hata fırlatır. <code>auto</code>, standart boru hatlarında hata fırlatır.</li></ul></li> <li><code>--offload-margin <size></code> — <code>--cpu-offload auto</code> altında aktivasyonlar için serbest bırakılan cihaz belleği, <code>enable_auto_cpu_offload</code> fonksiyonuna <code>memory_reserve_margin</code> parametresi olarak iletilir (varsayılan <code>3GB</code>). Büyük bir tuvalin ileri yayılım sırasında bellek yetersizliği yaşaması durumunda bu değeri artırın. Offloader, bileşenler sığdığı sürece bunları bellekte tutar; bu nedenle yüksek VRAM'li bir kartta varsayılan marj, uzun bir videonun aktivasyonları için yeterince yer bırakmayabilir.</li> <li><code>--attention-backend</code> — Hub üzerinden barındırılan dikkat çekirdekleri, ilk kullanımda otomatik olarak indirilir. Seçenekler <code>default</code> ve Diffusers'ta kayıtlı Hub arka uçlarıdır (örneğin <code>flash_hub</code>, <code>flash_varlen_hub</code>, <code>flash_4_hub</code>, <code>sage_hub</code>, <code>sage_blackwell_hub</code>). Güncel liste için <code>diffusers-cli run --help</code> komutunu çalıştırın. Yalnızca Transformer tabanlı iş akışlarını destekler ve eski UNet iş akışlarında bir uyarıyla yoksayılır. <a href="../optimization/attention_backends">Dikkat arka uçları</a> bölümüne bakın.</li> <li><code>--vae-tiling</code> / <code>--vae-slicing</code> — VAE decode VRAM'ını düşürür. <a href="../optimization/memory#vae-tiling">VAE tiling</a> ve <a href="../optimization/memory#vae-slicing">VAE slicing</a> konularına bakın.</li> <li><code>--compile [JSON]</code> — denoiser modüllerini <a href="../optimization/fp16#torchcompile">torch.compile</a> ile derler. | |
| CLI, tekrar eden bloklara sahip modüller için <a href="../optimization/fp16#regional-compilation">regional compilation</a> tercih eder. Sadece <code>--compile</code> kullanıldığında <code>fullgraph=true</code> kullanılır. JSON nesnesi <code>torch.compile</code> iletilir. <code>--context-parallel</code> ile desteklenmez.</li> <li><code>--context-parallel</code> — DiT tabanlı bir pipeline üzerinde Ulysses tarzı bağlam paralelliği. Yerel kullanımda torchrun gerektirir, ancak <code>--remote</code> altında CLI, <code>torchrun --nproc-per-node=gpu</code> komutunu sizin için sarar. <a href="../training/distributed_inference#context-parallelism">Bağlam paralelliği</a> bölümüne bakın.</li></ul> <!--[2--><h3 class="relative group"><a id="modular-pipelines" 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="#modular-pipelines"><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><!---->Modüler hatlar<!----></span></h3><!--]--><!----> <p><code>run</code>, bir <a href="../modular_diffusers/overview">modüler depo</a>’yu otomatik olarak algılar — ya bir <code>modular_model_index.json</code> içerdiği ya da <code>model_index.json</code> dosyasının bir <code>ModularPipeline</code> alt sınıfını adlandırması nedeniyle — bu nedenle dahil olmak için bir bayrak gerekmez.</p> <p>Bazı modüler depolar, bileşenleri paylaşan ancak çalıştırılan blokların ve alınan girdilerin farklı olduğu, adlandırılmış görevler gibi birden fazla <em>iş akışı</em> tanımlar. Örneğin <a href="../api/pipelines/minimax_h3">MiniMax-H3</a>, <code>t2va</code> (metinden video ve ses), <code>fl2va</code> (ilk ve/veya son ana kare) ve <code>ref2va</code> (görsel, video ve ses referanslarının sıralı bir karışımı) seçeneklerini sunar. Birini seçmek için <code>--workflow</code> parametresini iletin:</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \ | |
| --model MiniMaxAI/MiniMax-H3 --workflow fl2va \ | |
| --pipeline-kwargs <span class="hljs-string">'{ | |
| "prompt": "the camera pushes in slowly as rain falls", | |
| "image": "opening-frame.png", | |
| "last_image": "closing-frame.png", | |
| "num_frames": 124 | |
| }'</span> \ | |
| --output-key videos --output-key audio \ | |
| --fps 24 --sampling-rate 32000 \ | |
| --cpu-offload auto --dtype bf16<!----></pre></div><!----> <p>Bir iş akışı seçildiğinde yalnızca o görevin blokları korunur; bu sayede pipeline yalnızca ihtiyaç duyduğu bileşenleri bildirir ve <code>load_components</code> yalnızca bu bileşenlerin alt klasörlerini alır. Tüm iş akışlarının kullanılabilir kalmasını sağlamak ve pipeline'ın her çağrıda kendisine verilen girdilere göre seçim yapmasını istiyorsanız <code>--workflow</code> parametresini atlayın.</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli --format json schema --model MiniMaxAI/MiniMax-H3 --trust-remote-code<!----></pre></div><!----> <p><code>--workflow</code> yalnızca modüler iş akışlarına uygulanır. Standart iş akışlarında bir uyarıyla yok sayılır.</p> <p>Modüler bir pipeline, tek bir çıktı nesnesi yerine <a href="../modular_diffusers/modular_pipeline"><code>PipelineState</code></a> döndürür, bu nedenle <code>--output-key</code> kaydedilecek ara çıktıyı adlandırır.</p> <!--[2--><h3 class="relative group"><a id="outputs" 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="#outputs"><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><!---->Çıktılar<!----></span></h3><!--]--><!----> <p><code>run</code>, hattın çıktı türünü algılar:</p> <ul><li><code>PIL.Image</code>/list → <code><NNNN>.png</code> (sıfır dolgulu indeks, örn. <code>0000.png</code>)</li> <li>Görsel dizisi → <code>0000.mp4</code> (<code>--fps</code> kare hızını kontrol eder, varsayılan 8)</li> <li>Ses dizisi → <code>0000.wav</code> (<code>--sampling-rate</code> oranı kontrol eder)</li> <li>Diğer her şey → JSON dökümü</li></ul> <p>Varsayılan çıktı dizini biçimi <code>~/.diffusers/cli/run/outputs/diffusers-run-<YYYYMMDDTHHMMSS>-<uuid>/</code>'dir. Her çalıştırma kendi alt dizinine sahip olur, böylece ardışık çağrılar birbirinin üzerine yazmaz.</p> <p><code>--output <path></code> ile geçersiz kılınabilir. Yolun nasıl genişletildiği, biçimine ve parti boyutuna bağlıdır:</p> <table><thead><tr><th><code>--output</code></th><th>1 çıktı</th><th>N çıktı</th></tr></thead><tbody><tr><td><em>atlandı</em></td><td>varsayılan dizin → <code>0000.png</code></td><td>varsayılan dizin → <code>0000.png</code>, <code>0001.png</code>, <code>0002.png</code>, …</td></tr><tr><td><code>./results/</code> (sonunda <code>/</code> veya mevcut bir dizin)</td><td><code>./results/0000.png</code></td><td><code>./results/0000.png</code>, <code>./results/0001.png</code>, …</td></tr><tr><td><code>my-cat.png</code> (dosya yolu)</td><td><code>my-cat.png</code> (olduğu gibi kullanılır)</td><td><code>my-cat-0000.png</code>, <code>my-cat-0001.png</code>, …</td></tr></tbody></table> <p>Dizin çıktıları her zaman çıplak, sıfır dolgulu adlar kullanır (<code>0000</code>, <code>0001</code>, …). Açık dosya yolları, seçtiğiniz kökü korur ve parti birden fazla çıktı ürettiğinde sıfır dolgulu indeks eklenir.</p> <p>Çıktıları bir <a href="https://huggingface.co/docs/hub/en/storage-buckets" rel="nofollow">Hugging Face depolama kovasına</a> yüklemek için <code>--push-to</code> kullanın. Aşağıdakilerden birini kabul eder:</p> <ul><li>HF bucket kimliği (<code><namespace>/<name></code>)</li> <li><code>hf://buckets/<namespace>/<name>[/<subpath>]</code> <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_uris" rel="nofollow">HF URI</a></li> <li>tarayıcı URL'si</li></ul> <p>Alt yol, klasör öneki olarak kullanılır. Var olmayan bucket oluşturulur ve nesneler <code>[<subpath>/]<run_id>/<filename></code> altında yer alır.</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># HF bucket id — files at hf://buckets/alice/edit-outputs/<run_id>/<file></span> | |
| --push-to alice/edit-outputs | |
| <span class="hljs-comment"># URI with subpath — files at hf://buckets/alice/edit-outputs/greyscale/2026-07/<run_id>/<file></span> | |
| --push-to hf://buckets/alice/edit-outputs/greyscale/2026-07 | |
| <span class="hljs-comment"># Browser URL copy-paste from the Hub also works.</span> | |
| --push-to https://huggingface.co/buckets/alice/edit-outputs/tree/greyscale/2026-07<!----></pre></div><!----> <p>Aşağıdaki tablo uzak çalıştırmaları açıklar. Yerel çalıştırmalarda <code>--push-to</code>, yerel olarak kaydedilen çıktıyı yükler. Yerel dosya oluşturmayı engellemez.</p> <table><thead><tr><th><code>--push-to</code> ayarlandı mı?</th><th><code>--output</code> ayarlandı mı?</th><th>Sonuç</th></tr></thead><tbody><tr><td>hayır</td><td>hayır</td><td>varsayılan yerel dizine indir</td></tr><tr><td>hayır</td><td>evet</td><td><code>--output</code> adresine indir</td></tr><tr><td>evet</td><td>hayır</td><td>sadece bucket, yerel indirme yok</td></tr><tr><td>evet</td><td>evet</td><td>bucket VE <code>--output</code></td></tr></tbody></table> <p><code>--format</code>, stdout meta verilerini (yollar, zamanlama, sandbox bilgisi) biçimlendirir. Medyanın kendisinin dosya biçimini değiştirmez. Yazılan görüntüler her zaman PNG, videolar MP4, sesler WAV'dir.</p> <!--[2--><h3 class="relative group"><a id="remote-execution----remote-" 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="#remote-execution----remote-"><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><!---->Uzak yürütme ( --remote )<!----></span></h3><!--]--><!----> <p>Aynı çağrıyı <a href="https://huggingface.co/docs/huggingface_hub/en/guides/sandbox" rel="nofollow">Hugging Face Sandbox</a> içinde çalıştırın — CLI'nin HTTP üzerinden yönettiği yalıtılmış bir bulut VM: girdileri yükler, hattı çalıştırır, çıktıları indirir ve ardından sandbox'ı sonlandırır. <code>huggingface_hub>=1.23</code> gerektirir.</p> <p>Sandbox, <a href="https://hub.docker.com/r/diffusers/diffusers-cli-cuda" rel="nofollow"><code>diffusers/diffusers-cli-cuda</code></a> adlı, torch, CUDA ve CLI bağımlılıklarını zaten içeren önceden derlenmiş bir imajdan başlatılır; bu sayede soğuk bir çalıştırma önce kurulum yapmak yerine doğrudan üretmeye başlar.</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \ | |
| --model black-forest-labs/FLUX.1-dev --dtype bf16 \ | |
| --pipeline-kwargs <span class="hljs-string">'{"prompt": "an astronaut riding a horse"}'</span> \ | |
| --remote --flavor a100-large<!----></pre></div><!----> <p>Uzak bayraklar:</p> <ul><li><code>--flavor <name></code> — sandbox donanımı (örneğin, <code>a10g-small</code>, <code>h200</code>, <code>rtx-pro-6000</code>).</li> <li><code>--timeout <duration></code> — sandbox içindeki run komutu için maksimum duvar saati (varsayılan <code>10m</code>).</li> <li><code>--dependencies <pkg></code> — ek pip bağımlılıkları (tekrarlanabilir), imajın üzerine kurulur. diffusers dalı tar dosyasını sabitlemek veya hattına özgü ekleri eklemek için faydalıdır.</li> <li><code>--namespace <name></code> — sandbox'ı farklı bir HF org/hesabı altında oluşturur.</li> <li><code>--image <ref></code> — sandbox görüntüsünü geçersiz kılar. <code>--flavor</code> sürücüsüyle uyumlu torch + CUDA içermelidir. CLI, varsayılan görüntünün kaçındığı bu işlemi, her soğuk sandbox'ta kendi bağımlılıklarını üstüne kurarak gerçekleştirir.</li> <li><code>--volume <bucket-id>[:<mount-path>]</code> — bir <a href="https://huggingface.co/docs/hub/en/storage-buckets" rel="nofollow">HF depolama kovasını</a> sandbox içine okuma-yazma dizini olarak bağlar (tekrarlanabilir). Varsayılan bağlama yolu <code>/mnt/buckets/<bucket-id></code>'dir. Bağlanan dosyalara <code>--pipeline-kwargs</code> içinde herhangi bir yerel yol gibi başvurun. | |
| Yalnızca yeni sandbox oluşturulduğunda uygulanır ve <code>--sandbox-id</code> ile yeniden bağlanırken yok sayılır.</li></ul> <p>Varsayılan olarak her <code>--remote</code> çalıştırması geçicidir (oluştur → çalıştır → indir → öldür). Çalıştırmalar arasında sıcak bir kum havuzunu yeniden kullanmak için — bağımlılıkları, model ağırlık önbelleğini ve <code>torch.compile</code> önbelleğini diskinde tutmak için — onu hayatta tutun ve yeniden bağlanın:</p> <ul><li><code>--keep-alive</code> — çalıştırma sonrasında sandbox'u sonlandırmaz. Kimliği yazdırılır.</li> <li><code>--sandbox-id <id></code> — yeni bir tane oluşturmak yerine, açık tutulan bir sandbox'a yeniden bağlanın.</li> <li><code>--idle-timeout <duration></code> — bu kadar süre hareketsizlikten sonra otomatik kapatma (varsayılan <code>10m</code>). Yalnızca yeni bir sandbox oluşturulduğunda uygulanır ve <code>--sandbox-id</code> ile yeniden bağlanırken yok sayılır.</li></ul> <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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># First run keeps the sandbox alive and prints sandbox_id=<id>.</span> | |
| diffusers-cli run -m black-forest-labs/FLUX.1-dev --dtype bf16 \ | |
| --pipeline-kwargs <span class="hljs-string">'{"prompt": "a cat"}'</span> --remote --flavor a100-large --keep-alive | |
| <span class="hljs-comment"># Reconnect for the next run — the model is already cached, so only inference runs.</span> | |
| diffusers-cli run -m black-forest-labs/FLUX.1-dev --dtype bf16 \ | |
| --pipeline-kwargs <span class="hljs-string">'{"prompt": "a dog"}'</span> --remote --flavor a100-large --sandbox-id <<span class="hljs-built_in">id</span>> | |
| <span class="hljs-comment"># Stop it when done (or let it timeout).</span> | |
| hf sandbox <span class="hljs-built_in">kill</span> <<span class="hljs-built_in">id</span>><!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="customblocks" 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="#customblocks"><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><!---->custom_blocks<!----></span></h2><!--]--><!----> <p>Yerel bir <code>ModularPipelineBlocks</code> alt sınıfını Hub'a yüklemek için paketler. Bir Python dosyasını okur, <code>ModularPipelineBlocks</code>'ten veya bileşik alt sınıflarından (<code>SequentialPipelineBlocks</code>, <code>AutoPipelineBlocks</code>, <code>ConditionalPipelineBlocks</code>, <code>LoopSequentialPipelineBlocks</code>) türeyen sınıfları AST taraması ile bulur, seçilen sınıfı örnekler ve mevcut çalışma dizininde <code>save_pretrained</code> çağrısını yapar.</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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># Package the first block found in ./block.py</span> | |
| diffusers-cli custom_blocks | |
| <span class="hljs-comment"># Point at a different file / pick a specific class</span> | |
| diffusers-cli custom_blocks --block_module_name my_block.py --block_class_name MyDenoiseBlock<!----></pre></div><!----> <p>Block sınıfı, sıfır yapıcı argümanla örneklenmeli ve varsayılanları <code>__init__</code> içinde sabit kodlamalı veya çağrı anında pipeline <code>state</code>'inden yapılandırmayı okumalıdır.</p> <!--[1--><h2 class="relative group"><a id="fp16safetensors" 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="#fp16safetensors"><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><!---->fp16_safetensors<!----></span></h2><!--]--><!----> <blockquote class="caution"><p>Bu komut artık kullanımdan kaldırılmıştır ve gelecekteki bir sürümde kaldırılacaktır.</p></blockquote> <p>Hub'daki bir kontrol noktasını <code>.safetensors</code> biçiminde fp16'ya dönüştürün ve sonucu ittirin. Daha hızlı yükleme için bir repodaki ağırlık boyutunu küçültmek için kullanışlıdır. Kesin argümanlar için <code>diffusers-cli fp16_safetensors --help</code> komutuna bakın.</p> <!--[1--><h2 class="relative group"><a id="skills" 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="#skills"><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><!---->beceriler<!----></span></h2><!--]--><!----> <p>diffusers deposundan becerileri yükleyin (<a href="https://github.com/huggingface/diffusers/tree/main/.ai/skills" rel="nofollow"><code>.ai/skills/</code></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> Kopyalandı</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># Install a single skill</span> | |
| diffusers-cli skills add <span class="hljs-string">"<skill name>"</span> | |
| <span class="hljs-comment"># Install every skill in the registry</span> | |
| diffusers-cli skills add --all | |
| <span class="hljs-comment"># List available skills with a one-line summary of each</span> | |
| diffusers-cli skills list | |
| <span class="hljs-comment"># Preview a skill's SKILL.md without installing</span> | |
| diffusers-cli skills preview diffusers-cli | |
| <span class="hljs-comment"># Refetch and reinstall every managed skill</span> | |
| diffusers-cli skills update | |
| <span class="hljs-comment"># Install to the user-level directory instead of the current project</span> | |
| diffusers-cli skills add diffusers-cli --global | |
| <span class="hljs-comment"># Install for one agent instead of detecting it from the environment</span> | |
| diffusers-cli skills add --all --claude <span class="hljs-comment"># or --codex / --cursor</span><!----></pre></div><!----> <p>Hedef bayrağı olmadan, CLI onu başlatan ajan için veya ayırt edemediğinde tüm ajanlar için kurulumu yapar. Claude Code, <code>.claude/skills/diffusers/</code> altında bir eklenti paketi alır (ad alanı olarak <code>/diffusers:<skill name></code> olarak adlandırılır). Codex ve Cursor ise <code>.agents/skills/<skill name>/</code> alır.</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/using-diffusers/cli.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_1rjuniz = { | |
| 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.vZc-dOUR.js"), | |
| import("/docs/diffusers/main/en/_app/immutable/entry/app.B6c3Ml05.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 380], | |
| data: [null,null], | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 62.6 kB
- Xet hash:
- 37f1ea9f2525ddca2858d5e31ac3fd5b721d8ea9b30ad6fe05cc33aa2c151363
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.