Buckets:

download
raw
31.7 kB
import"../chunks/DsnmJJEf.js";import{i as A,h as V,C as L,H as o,a as t,E as z,s as X}from"../chunks/Bqo1LwON.js";import{p as Y,o as F,s as e,f as H,a as _,b as Q,d as W,n as E}from"../chunks/DK803DsY.js";const q='{"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}';var P=W('<meta name="hf:doc:metadata"/>'),D=W(`<p></p> <!> <!> <p><code>diffusers-cli</code> is a command line client for running, inspecting, and packaging Diffusers pipelines.</p> <!> <table><thead><tr><th>Command</th><th>Purpose</th></tr></thead><tbody><tr><td><a href="#env"><code>env</code></a></td><td>Print environment info for bug reports.</td></tr><tr><td><a href="#schema"><code>schema</code></a></td><td>Inspect a pipeline’s <code>__call__</code> signature without downloading weights.</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Run a pipeline locally or in a Hugging Face Sandbox.</td></tr><tr><td><a href="#customblocks"><code>custom_blocks</code></a></td><td>Package a local <code>ModularPipelineBlocks</code> subclass for the Hub.</td></tr><tr><td><a href="#fp16safetensors"><code>fp16_safetensors</code></a></td><td>Convert a checkpoint to fp16 <code>.safetensors</code>.</td></tr><tr><td><a href="#skills"><code>skills</code></a></td><td>Install pre-authored skill bundles into your AI coding agent.</td></tr></tbody></table> <blockquote class="tip"><p>This page does not provide details for all options under each subcommand. For the full, always current list of options for any subcommand, run <code>diffusers-cli &lt;command&gt; --help</code> (<code>diffusers-cli run --help</code>).</p></blockquote> <!> <p>Prints Python, PyTorch, Diffusers versions, CUDA info, and installed optional deps. Use it when opening an
issue so maintainers can reproduce your setup.</p> <!> <!> <p>Returns the pipeline’s accepted inputs without downloading weights. Use it when building <code>--pipeline-kwargs</code> for <a href="#run"><code>run</code></a>.</p> <p>Only the index file is fetched. Standard pipelines read <code>model_index.json</code>. Modular pipelines read <code>modular_model_index.json</code>. Custom-block repos read <code>modular_config.json</code> and need <code>--trust-remote-code</code>, because loading them runs Hub code.</p> <!> <!> <p>Run a pipeline end-to-end. The CLI auto-detects standard vs modular repos. It auto-loads media inputs from URLs or local paths, saves outputs from the pipeline’s return type, and can run remotely on a Hugging Face Sandbox via <code>--remote</code>.</p> <p>Minimal example:</p> <!> <!> <p><code>--pipeline-kwargs</code> takes a JSON object that’s forwarded to <code>pipeline(**kwargs)</code>. String values at known
media-input keys are auto-loaded:</p> <ul><li>Images (<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>PIL.Image</code> via <code>load_image</code>.</li> <li>Videos (<code>video</code>, <code>control_video</code>) → <code>list[PIL.Image]</code> via <code>load_video</code>.</li> <li>Audio (<code>initial_audio_waveforms</code>, <code>reference_audio</code>, <code>src_audio</code>) → <code>torch.Tensor</code> via <code>torchaudio.load</code>.</li></ul> <!> <p>Both media keys and text keys accept a JSON array to run a batch through a single pipeline call. Each entry
in a media list is loaded individually (URL, local path, or bucket-mount path), and Diffusers processes the
whole list in one forward pass on the GPU:</p> <!> <!> <p>Configure how the CLI loads model weights and custom pipeline code.</p> <ul><li><p><code>--dtype &#123;auto, bfloat16, bf16, float16, fp16, float32, fp32&#125;</code> — weight dtype.</p></li> <li><p><code>--device-map &lt;value&gt;</code> — component placement. Accepts a torch device string (<code>cuda</code>, <code>cuda:0</code>, <code>cpu</code>, <code>mps</code>), <code>balanced</code> (auto-splits components across visible GPUs), or a JSON dict for explicit per-component placement.
Auto-detected if omitted. See <a href="../training/distributed_inference#devicemap">device_map</a> for more details.</p></li> <li><p><code>--variant fp16</code> — pick a weight variant.</p></li> <li><p><code>--revision &lt;sha&gt;</code> — pin a specific model revision.</p></li> <li><p><code>--trust-remote-code</code> — allow custom code from the Hub (required for repos that ship custom pipeline classes
or modular blocks). See <a href="../using-diffusers/custom_pipeline_overview">Community pipelines</a> for standard custom
pipelines and <a href="../modular_diffusers/overview">Modular Diffusers</a>.</p></li> <li><p><code>--lora &lt;spec&gt;</code> — attach a LoRA adapter after loading. Each value is a JSON dict. Repeat the flag to
stack multiple adapters. <code>lora_id</code> is required per entry, <code>lora_scale</code> defaults to <code>1.0</code>, and <code>adapter_name</code> is optional (auto-generated as <code>lora_&lt;i&gt;</code> when stacking).</p> <ul><li>Single: <code>--lora '&#123;"lora_id": "alvdansen/flux-koda", "lora_scale": 0.8&#125;'</code></li> <li>Multiple: <code>--lora '&#123;"lora_id": "alvdansen/flux-koda", "lora_scale": 0.6, "adapter_name": "koda"&#125;' --lora '&#123;"lora_id": "Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur", "lora_scale": 0.4&#125;'</code></li></ul> <p>All specs are loaded by <code>pipeline.load_lora_weights(...)</code>, then activated together with a single <code>pipeline.set_adapters(names, adapter_weights=scales)</code> call. See <a href="../tutorials/using_peft_for_inference">LoRA</a> for a deeper walkthrough of adapter stacking, scale scheduling, and hotswapping.</p></li></ul> <!> <ul><li><code>--cpu-offload &#123;model, group, auto&#125;</code> — onload target comes from <code>--device-map</code> (plain device string required for offload). <ul><li><code>model</code> — <code>enable_model_cpu_offload</code> for standard pipelines. See <a href="../optimization/memory#model-offloading">Model offloading</a>.</li> <li><code>group</code> — <code>enable_group_offload(offload_type="leaf_level", use_stream=True)</code> for standard pipelines. See <a href="../optimization/memory#group-offloading">Group offloading</a>.</li> <li><code>auto</code> — modular only with <a href="../modular_diffusers/components_manager"><code>ComponentsManager</code></a>. Standard modes raise on modular pipelines. <code>auto</code> raises on standard pipelines.</li></ul></li> <li><code>--offload-margin &lt;size&gt;</code> — device memory kept free for activations under <code>--cpu-offload auto</code>, passed to <code>enable_auto_cpu_offload</code> as <code>memory_reserve_margin</code> (default <code>3GB</code>). Raise it when a large canvas runs out
of memory mid-forward. The offloader keeps components resident while they fit, so on a high-VRAM card the
default margin can leave too little room for the activations of a long video.</li> <li><code>--attention-backend</code> — Hub-hosted attention kernels, auto-downloaded on first use. Choices are <code>default</code> plus the Hub backends registered in Diffusers (for example <code>flash_hub</code>, <code>flash_varlen_hub</code>, <code>flash_4_hub</code>, <code>sage_hub</code>, <code>sage_blackwell_hub</code>). Run <code>diffusers-cli run --help</code> for the current list. It only supports Transformer-based pipelines only, and is ignored with a warning on legacy UNet pipelines. See <a href="../optimization/attention_backends">Attention backends</a>.</li> <li><code>--vae-tiling</code> / <code>--vae-slicing</code> — lower VAE decode VRAM. See <a href="../optimization/memory#vae-tiling">VAE tiling</a> and <a href="../optimization/memory#vae-slicing">VAE slicing</a>.</li> <li><code>--compile [JSON]</code> — compile denoiser modules with <a href="../optimization/fp16#torchcompile">torch.compile</a>. The
CLI prefers <a href="../optimization/fp16#regional-compilation">regional compilation</a> for modules with repeated
blocks. Bare <code>--compile</code> uses <code>fullgraph=true</code>. A JSON object is forwarded to <code>torch.compile</code>. Not supported
with <code>--context-parallel</code>.</li> <li><code>--context-parallel</code> — Ulysses-style context parallelism on a DiT-based pipeline. Locally requires torchrun, but
under <code>--remote</code> the CLI wraps <code>torchrun --nproc-per-node=gpu</code> for you. See <a href="../training/distributed_inference#context-parallelism">Context parallelism</a>.</li></ul> <!> <p><code>run</code> detects a <a href="../modular_diffusers/overview">modular repo</a> automatically — either because it ships a <code>modular_model_index.json</code>, or because its <code>model_index.json</code> names a <code>ModularPipeline</code> subclass — so no flag
is needed to opt in.</p> <p>Some modular repos define several <em>workflows</em> like named tasks that share components but differ in which blocks
run and which inputs they take. <a href="../api/pipelines/minimax_h3">MiniMax-H3</a>, for example, offers <code>t2va</code> (text to
video and audio), <code>fl2va</code> (first and/or last keyframe) and <code>ref2va</code> (an ordered mix of image, video and audio
references). Pass <code>--workflow</code> to select one:</p> <!> <p>Selecting a workflow keeps only that task’s blocks, so the pipeline declares only the components it needs and <code>load_components</code> fetches only their subfolders. Omit <code>--workflow</code> to keep every workflow available and let the
pipeline pick per call from the inputs it is given.</p> <!> <p><code>--workflow</code> applies to modular pipelines only. It is ignored with a warning on standard pipelines.</p> <p>A modular pipeline returns a <a href="../modular_diffusers/modular_pipeline"><code>PipelineState</code></a> rather than a single output object, so <code>--output-key</code> names the intermediate to save.</p> <!> <p><code>run</code> detects the pipeline output type:</p> <ul><li><code>PIL.Image</code>/list → <code>&lt;NNNN&gt;.png</code> (zero-padded index, e.g. <code>0000.png</code>)</li> <li>Image sequence → <code>0000.mp4</code> (<code>--fps</code> controls framerate, default 8)</li> <li>Audio array → <code>0000.wav</code> (<code>--sampling-rate</code> controls rate)</li> <li>Anything else → JSON dump</li></ul> <p>The default output directory format is <code>~/.diffusers/cli/run/outputs/diffusers-run-&lt;YYYYMMDDTHHMMSS&gt;-&lt;uuid&gt;/</code>. Each
run gets its own subdirectory so consecutive invocations don’t overwrite.</p> <p>Override with <code>--output &lt;path&gt;</code>. How the path expands depends on its shape and the batch size:</p> <table><thead><tr><th><code>--output</code></th><th>1 output</th><th>N outputs</th></tr></thead><tbody><tr><td><em>omitted</em></td><td>default dir → <code>0000.png</code></td><td>default dir → <code>0000.png</code>, <code>0001.png</code>, <code>0002.png</code>, …</td></tr><tr><td><code>./results/</code> (trailing <code>/</code> or an existing directory)</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> (file path)</td><td><code>my-cat.png</code> (used verbatim)</td><td><code>my-cat-0000.png</code>, <code>my-cat-0001.png</code>, …</td></tr></tbody></table> <p>Directory outputs always use bare padded names (<code>0000</code>, <code>0001</code>, …). Explicit file paths preserve your chosen
stem and get the padded index appended when the batch produces multiple outputs.</p> <p>Use <code>--push-to</code> to upload outputs to a <a href="https://huggingface.co/docs/hub/en/storage-buckets" rel="nofollow">Hugging Face storage bucket</a>. It accepts an:</p> <ul><li>HF bucket id (<code>&lt;namespace&gt;/&lt;name&gt;</code>)</li> <li><code>hf://buckets/&lt;namespace&gt;/&lt;name&gt;[/&lt;subpath&gt;]</code> <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_uris" rel="nofollow">HF URI</a></li> <li>browser URL</li></ul> <p>A subpath is used as a folder prefix. The bucket is created if missing, and objects land under <code>[&lt;subpath&gt;/]&lt;run_id&gt;/&lt;filename&gt;</code>.</p> <!> <p>The table below describes remote runs. For local runs, <code>--push-to</code> uploads the locally saved output. It does
not suppress local file creation.</p> <table><thead><tr><th><code>--push-to</code> set?</th><th><code>--output</code> set?</th><th>Result</th></tr></thead><tbody><tr><td>no</td><td>no</td><td>download to default local dir</td></tr><tr><td>no</td><td>yes</td><td>download to <code>--output</code></td></tr><tr><td>yes</td><td>no</td><td>bucket only, no local download</td></tr><tr><td>yes</td><td>yes</td><td>bucket AND <code>--output</code></td></tr></tbody></table> <p><code>--format</code> shapes the stdout metadata (paths, timing, sandbox info). It does not change the file format of
the media itself. Written images are always PNG, videos MP4, audio WAV.</p> <!> <p>Run the same call inside a <a href="https://huggingface.co/docs/huggingface_hub/en/guides/sandbox" rel="nofollow">Hugging Face Sandbox</a> — an isolated cloud VM the CLI drives over HTTP: it uploads inputs, runs the pipeline, downloads outputs, then
terminates the sandbox. Requires <code>huggingface_hub&gt;=1.23</code>.</p> <p>The sandbox boots from <a href="https://hub.docker.com/r/diffusers/diffusers-cli-cuda" rel="nofollow"><code>diffusers/diffusers-cli-cuda</code></a>, a
prebuilt image that already ships torch, CUDA, and the CLI’s dependencies, so a cold run starts generating instead
of installing first.</p> <!> <p>Remote flags:</p> <ul><li><code>--flavor &lt;name&gt;</code> — sandbox hardware (for example, <code>a10g-small</code>, <code>h200</code>, <code>rtx-pro-6000</code>).</li> <li><code>--timeout &lt;duration&gt;</code> — max wallclock for the run command inside the sandbox (default <code>10m</code>).</li> <li><code>--dependencies &lt;pkg&gt;</code> — extra pip deps (repeatable), installed on top of the image. Useful for pinning a
diffusers branch tarball or adding pipeline-specific extras.</li> <li><code>--namespace &lt;name&gt;</code> — create the sandbox under a different HF org/account.</li> <li><code>--image &lt;ref&gt;</code> — override the sandbox image. Must ship torch + CUDA compatible with your <code>--flavor</code>’s
driver. The CLI then installs its own dependencies on top on every cold sandbox, which the default image
avoids.</li> <li><code>--volume &lt;bucket-id&gt;[:&lt;mount-path&gt;]</code> — mount an <a href="https://huggingface.co/docs/hub/en/storage-buckets" rel="nofollow">HF storage bucket</a> into the sandbox as a read-write directory (repeatable). Default mount path is <code>/mnt/buckets/&lt;bucket-id&gt;</code>. Reference mounted files from <code>--pipeline-kwargs</code> like any other local path.
Applied only on new sandbox creation and ignored when reconnecting via <code>--sandbox-id</code>.</li></ul> <p>By default each <code>--remote</code> run is ephemeral (create → run → download → kill). To reuse a warm sandbox across
runs — keeping deps, the model weight cache, and the <code>torch.compile</code> cache on its disk — keep it alive and
reconnect:</p> <ul><li><code>--keep-alive</code> — don’t terminate the sandbox after the run. Its id is printed.</li> <li><code>--sandbox-id &lt;id&gt;</code> — reconnect to a kept-alive sandbox instead of creating a new one.</li> <li><code>--idle-timeout &lt;duration&gt;</code> — auto-shutdown after this much inactivity (default <code>10m</code>). Applied only on new sandbox creation and ignored when reconnecting via <code>--sandbox-id</code>.</li></ul> <!> <!> <p>Package a local <code>ModularPipelineBlocks</code> subclass for upload to the Hub. Reads a Python file, AST-scans it for
classes deriving from <code>ModularPipelineBlocks</code> or one of its composite subclasses (<code>SequentialPipelineBlocks</code>, <code>AutoPipelineBlocks</code>, <code>ConditionalPipelineBlocks</code>, <code>LoopSequentialPipelineBlocks</code>), instantiates the chosen one, and
calls <code>save_pretrained</code> in the current working directory.</p> <!> <p>The block class must be instantiable with zero constructor args and hardcodes defaults in <code>__init__</code> or read
config from the pipeline <code>state</code> at call time.</p> <!> <blockquote class="caution"><p>This command is now deprecated and will be removed in a future version.</p></blockquote> <p>Convert a checkpoint on the Hub to fp16 <code>.safetensors</code> and push the result. Useful for shrinking a repo’s
weight size for faster loading. See <code>diffusers-cli fp16_safetensors --help</code> for the exact args.</p> <!> <p>Install skills from the diffusers repo (<a href="https://github.com/huggingface/diffusers/tree/main/.ai/skills" rel="nofollow"><code>.ai/skills/</code></a>).</p> <!> <p>Without a target flag, the CLI installs for the agent that launched it, or for every agent when it cannot tell. Claude Code gets a plugin bundle under <code>.claude/skills/diffusers/</code> (namespaced as <code>/diffusers:&lt;skill name&gt;</code>). Codex and Cursor get <code>.agents/skills/&lt;skill name&gt;/</code>.</p> <!> <p></p>`,1);function ee(x,R){Y(R,!1),F(()=>{new URLSearchParams(window.location.search).get("fw")}),A();var l=D();V("1wkohmy",B=>{var S=P();X(S,"content",q),_(B,S)});var a=e(H(l),2);L(a,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var d=e(a,2);o(d,{title:"Command line interface",local:"command-line-interface",headingTag:"h1"});var i=e(d,4);o(i,{title:"Available commands",local:"available-commands",headingTag:"h2"});var s=e(i,6);o(s,{title:"env",local:"env",headingTag:"h2"});var c=e(s,4);t(c,{code:"ZGlmZnVzZXJzLWNsaSUyMGVudg==",highlighted:'diffusers-cli <span class="hljs-built_in">env</span>',lang:"bash",wrap:!1});var n=e(c,2);o(n,{title:"schema",local:"schema",headingTag:"h2"});var r=e(n,6);t(r,{code:"ZGlmZnVzZXJzLWNsaSUyMC0tZm9ybWF0JTIwanNvbiUyMHNjaGVtYSUyMC0tbW9kZWwlMjBibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMS1kZXYlMEFkaWZmdXNlcnMtY2xpJTIwc2NoZW1hJTIwLS1tb2RlbCUyMG15LW9yZyUyRm15LWN1c3RvbS1ibG9ja3MlMjAtLXRydXN0LXJlbW90ZS1jb2Rl",highlighted:`diffusers-cli --format json schema --model black-forest-labs/FLUX.1-dev
diffusers-cli schema --model my-org/my-custom-blocks --trust-remote-code`,lang:"bash",wrap:!1});var p=e(r,2);o(p,{title:"run",local:"run",headingTag:"h2"});var u=e(p,6);t(u,{code:"ZGlmZnVzZXJzLWNsaSUyMHJ1biUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbW9kZWwlMjBibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMS1kZXYlMjAlNUMlMEElMjAlMjAlMjAlMjAtLWR0eXBlJTIwYmYxNiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGlwZWxpbmUta3dhcmdzJTIwJyU3QiUyMnByb21wdCUyMiUzQSUyMCUyMmFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIyJTdEJw==",highlighted:`diffusers-cli run \\
--model black-forest-labs/FLUX.1-dev \\
--dtype bf16 \\
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;an astronaut riding a horse&quot;}&#x27;</span>`,lang:"bash",wrap:!1});var h=e(u,2);o(h,{title:"Passing pipeline arguments",local:"passing-pipeline-arguments",headingTag:"h3"});var m=e(h,6);t(m,{code:"ZGlmZnVzZXJzLWNsaSUyMHJ1biUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbW9kZWwlMjBibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMi1rbGVpbi05QiUyMC0tZHR5cGUlMjBiZjE2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1waXBlbGluZS1rd2FyZ3MlMjAnJTdCJTIycHJvbXB0JTIyJTNBJTIwJTIybWFrZSUyMHRoZSUyMGZ1ciUyMGdyZXklMjIlMkMlMjAlMjJpbWFnZSUyMiUzQSUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdGlvbi1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmRpZmZ1c2VycyUyRmNhdC5wbmclMjIlMkMlMjAlMjJzdHJlbmd0aCUyMiUzQSUyMDAuNiU3RCc=",highlighted:`diffusers-cli run \\
--model black-forest-labs/FLUX.2-klein-9B --dtype bf16 \\
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;make the fur grey&quot;, &quot;image&quot;: &quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png&quot;, &quot;strength&quot;: 0.6}&#x27;</span>`,lang:"bash",wrap:!1});var M=e(m,4);t(M,{code:"ZGlmZnVzZXJzLWNsaSUyMHJ1biUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbW9kZWwlMjBibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMS1Lb250ZXh0LWRldiUyMC0tZHR5cGUlMjBiZjE2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1waXBlbGluZS1rd2FyZ3MlMjAnJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycHJvbXB0JTIyJTNBJTIwJTVCJTIybWFrZSUyMGl0JTIwZ3JleSUyMiUyQyUyMCUyMm1ha2UlMjBpdCUyMHBpbmslMjIlMkMlMjAlMjJtYWtlJTIwaXQlMjBibHVlJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyaW1hZ2UlMjIlM0ElMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRi4uLiUyRmNhdDEucG5nJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkYuLi4lMkZjYXQyLnBuZyUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGLi4uJTJGY2F0My5wbmclMjIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMEElMjAlMjAlMjAlMjAlN0Qn",highlighted:`diffusers-cli run \\
--model black-forest-labs/FLUX.1-Kontext-dev --dtype bf16 \\
--pipeline-kwargs <span class="hljs-string">&#x27;{
&quot;prompt&quot;: [&quot;make it grey&quot;, &quot;make it pink&quot;, &quot;make it blue&quot;],
&quot;image&quot;: [
&quot;https://.../cat1.png&quot;,
&quot;https://.../cat2.png&quot;,
&quot;https://.../cat3.png&quot;
]
}&#x27;</span>`,lang:"bash",wrap:!1});var y=e(M,2);o(y,{title:"Loading",local:"loading",headingTag:"h3"});var f=e(y,6);o(f,{title:"Optimizations",local:"optimizations",headingTag:"h3"});var g=e(f,4);o(g,{title:"Modular pipelines",local:"modular-pipelines",headingTag:"h3"});var b=e(g,6);t(b,{code:"ZGlmZnVzZXJzLWNsaSUyMHJ1biUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbW9kZWwlMjBNaW5pTWF4QUklMkZNaW5pTWF4LUgzJTIwLS13b3JrZmxvdyUyMGZsMnZhJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1waXBlbGluZS1rd2FyZ3MlMjAnJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycHJvbXB0JTIyJTNBJTIwJTIydGhlJTIwY2FtZXJhJTIwcHVzaGVzJTIwaW4lMjBzbG93bHklMjBhcyUyMHJhaW4lMjBmYWxscyUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmltYWdlJTIyJTNBJTIwJTIyb3BlbmluZy1mcmFtZS5wbmclMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJsYXN0X2ltYWdlJTIyJTNBJTIwJTIyY2xvc2luZy1mcmFtZS5wbmclMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJudW1fZnJhbWVzJTIyJTNBJTIwMTI0JTBBJTIwJTIwJTIwJTIwJTdEJyUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tb3V0cHV0LWtleSUyMHZpZGVvcyUyMC0tb3V0cHV0LWtleSUyMGF1ZGlvJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1mcHMlMjAyNCUyMC0tc2FtcGxpbmctcmF0ZSUyMDMyMDAwJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1jcHUtb2ZmbG9hZCUyMGF1dG8lMjAtLWR0eXBlJTIwYmYxNg==",highlighted:`diffusers-cli run \\
--model MiniMaxAI/MiniMax-H3 --workflow fl2va \\
--pipeline-kwargs <span class="hljs-string">&#x27;{
&quot;prompt&quot;: &quot;the camera pushes in slowly as rain falls&quot;,
&quot;image&quot;: &quot;opening-frame.png&quot;,
&quot;last_image&quot;: &quot;closing-frame.png&quot;,
&quot;num_frames&quot;: 124
}&#x27;</span> \\
--output-key videos --output-key audio \\
--fps 24 --sampling-rate 32000 \\
--cpu-offload auto --dtype bf16`,lang:"bash",wrap:!1});var w=e(b,4);t(w,{code:"ZGlmZnVzZXJzLWNsaSUyMC0tZm9ybWF0JTIwanNvbiUyMHNjaGVtYSUyMC0tbW9kZWwlMjBNaW5pTWF4QUklMkZNaW5pTWF4LUgzJTIwLS10cnVzdC1yZW1vdGUtY29kZQ==",highlighted:"diffusers-cli --format json schema --model MiniMaxAI/MiniMax-H3 --trust-remote-code",lang:"bash",wrap:!1});var U=e(w,6);o(U,{title:"Outputs",local:"outputs",headingTag:"h3"});var J=e(U,20);t(J,{code:"JTIzJTIwSEYlMjBidWNrZXQlMjBpZCUyMCVFMiU4MCU5NCUyMGZpbGVzJTIwYXQlMjBoZiUzQSUyRiUyRmJ1Y2tldHMlMkZhbGljZSUyRmVkaXQtb3V0cHV0cyUyRiUzQ3J1bl9pZCUzRSUyRiUzQ2ZpbGUlM0UlMEEtLXB1c2gtdG8lMjBhbGljZSUyRmVkaXQtb3V0cHV0cyUwQSUwQSUyMyUyMFVSSSUyMHdpdGglMjBzdWJwYXRoJTIwJUUyJTgwJTk0JTIwZmlsZXMlMjBhdCUyMGhmJTNBJTJGJTJGYnVja2V0cyUyRmFsaWNlJTJGZWRpdC1vdXRwdXRzJTJGZ3JleXNjYWxlJTJGMjAyNi0wNyUyRiUzQ3J1bl9pZCUzRSUyRiUzQ2ZpbGUlM0UlMEEtLXB1c2gtdG8lMjBoZiUzQSUyRiUyRmJ1Y2tldHMlMkZhbGljZSUyRmVkaXQtb3V0cHV0cyUyRmdyZXlzY2FsZSUyRjIwMjYtMDclMEElMEElMjMlMjBCcm93c2VyJTIwVVJMJTIwY29weS1wYXN0ZSUyMGZyb20lMjB0aGUlMjBIdWIlMjBhbHNvJTIwd29ya3MuJTBBLS1wdXNoLXRvJTIwaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmJ1Y2tldHMlMkZhbGljZSUyRmVkaXQtb3V0cHV0cyUyRnRyZWUlMkZncmV5c2NhbGUlMkYyMDI2LTA3",highlighted:`<span class="hljs-comment"># HF bucket id — files at hf://buckets/alice/edit-outputs/&lt;run_id&gt;/&lt;file&gt;</span>
--push-to alice/edit-outputs
<span class="hljs-comment"># URI with subpath — files at hf://buckets/alice/edit-outputs/greyscale/2026-07/&lt;run_id&gt;/&lt;file&gt;</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`,lang:"bash",wrap:!1});var T=e(J,8);o(T,{title:"Remote execution ( --remote )",local:"remote-execution----remote-",headingTag:"h3"});var k=e(T,6);t(k,{code:"ZGlmZnVzZXJzLWNsaSUyMHJ1biUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tbW9kZWwlMjBibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMS1kZXYlMjAtLWR0eXBlJTIwYmYxNiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGlwZWxpbmUta3dhcmdzJTIwJyU3QiUyMnByb21wdCUyMiUzQSUyMCUyMmFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIyJTdEJyUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcmVtb3RlJTIwLS1mbGF2b3IlMjBhMTAwLWxhcmdl",highlighted:`diffusers-cli run \\
--model black-forest-labs/FLUX.1-dev --dtype bf16 \\
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;an astronaut riding a horse&quot;}&#x27;</span> \\
--remote --flavor a100-large`,lang:"bash",wrap:!1});var j=e(k,10);t(j,{code:"JTIzJTIwRmlyc3QlMjBydW4lMjBrZWVwcyUyMHRoZSUyMHNhbmRib3glMjBhbGl2ZSUyMGFuZCUyMHByaW50cyUyMHNhbmRib3hfaWQlM0QlM0NpZCUzRS4lMEFkaWZmdXNlcnMtY2xpJTIwcnVuJTIwLW0lMjBibGFjay1mb3Jlc3QtbGFicyUyRkZMVVguMS1kZXYlMjAtLWR0eXBlJTIwYmYxNiUyMCU1QyUwQSUyMCUyMCUyMCUyMC0tcGlwZWxpbmUta3dhcmdzJTIwJyU3QiUyMnByb21wdCUyMiUzQSUyMCUyMmElMjBjYXQlMjIlN0QnJTIwLS1yZW1vdGUlMjAtLWZsYXZvciUyMGExMDAtbGFyZ2UlMjAtLWtlZXAtYWxpdmUlMEElMEElMjMlMjBSZWNvbm5lY3QlMjBmb3IlMjB0aGUlMjBuZXh0JTIwcnVuJTIwJUUyJTgwJTk0JTIwdGhlJTIwbW9kZWwlMjBpcyUyMGFscmVhZHklMjBjYWNoZWQlMkMlMjBzbyUyMG9ubHklMjBpbmZlcmVuY2UlMjBydW5zLiUwQWRpZmZ1c2Vycy1jbGklMjBydW4lMjAtbSUyMGJsYWNrLWZvcmVzdC1sYWJzJTJGRkxVWC4xLWRldiUyMC0tZHR5cGUlMjBiZjE2JTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1waXBlbGluZS1rd2FyZ3MlMjAnJTdCJTIycHJvbXB0JTIyJTNBJTIwJTIyYSUyMGRvZyUyMiU3RCclMjAtLXJlbW90ZSUyMC0tZmxhdm9yJTIwYTEwMC1sYXJnZSUyMC0tc2FuZGJveC1pZCUyMCUzQ2lkJTNFJTBBJTBBJTIzJTIwU3RvcCUyMGl0JTIwd2hlbiUyMGRvbmUlMjAob3IlMjBsZXQlMjBpdCUyMHRpbWVvdXQpLiUwQWhmJTIwc2FuZGJveCUyMGtpbGwlMjAlM0NpZCUzRQ==",highlighted:`<span class="hljs-comment"># First run keeps the sandbox alive and prints sandbox_id=&lt;id&gt;.</span>
diffusers-cli run -m black-forest-labs/FLUX.1-dev --dtype bf16 \\
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;a cat&quot;}&#x27;</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">&#x27;{&quot;prompt&quot;: &quot;a dog&quot;}&#x27;</span> --remote --flavor a100-large --sandbox-id &lt;<span class="hljs-built_in">id</span>&gt;
<span class="hljs-comment"># Stop it when done (or let it timeout).</span>
hf sandbox <span class="hljs-built_in">kill</span> &lt;<span class="hljs-built_in">id</span>&gt;`,lang:"bash",wrap:!1});var I=e(j,2);o(I,{title:"custom_blocks",local:"customblocks",headingTag:"h2"});var Z=e(I,4);t(Z,{code:"JTIzJTIwUGFja2FnZSUyMHRoZSUyMGZpcnN0JTIwYmxvY2slMjBmb3VuZCUyMGluJTIwLiUyRmJsb2NrLnB5JTBBZGlmZnVzZXJzLWNsaSUyMGN1c3RvbV9ibG9ja3MlMEElMEElMjMlMjBQb2ludCUyMGF0JTIwYSUyMGRpZmZlcmVudCUyMGZpbGUlMjAlMkYlMjBwaWNrJTIwYSUyMHNwZWNpZmljJTIwY2xhc3MlMEFkaWZmdXNlcnMtY2xpJTIwY3VzdG9tX2Jsb2NrcyUyMC0tYmxvY2tfbW9kdWxlX25hbWUlMjBteV9ibG9jay5weSUyMC0tYmxvY2tfY2xhc3NfbmFtZSUyME15RGVub2lzZUJsb2Nr",highlighted:`<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`,lang:"bash",wrap:!1});var v=e(Z,4);o(v,{title:"fp16_safetensors",local:"fp16safetensors",headingTag:"h2"});var C=e(v,6);o(C,{title:"skills",local:"skills",headingTag:"h2"});var G=e(C,4);t(G,{code:"JTIzJTIwSW5zdGFsbCUyMGElMjBzaW5nbGUlMjBza2lsbCUwQWRpZmZ1c2Vycy1jbGklMjBza2lsbHMlMjBhZGQlMjAlMjIlM0Nza2lsbCUyMG5hbWUlM0UlMjIlMEElMEElMjMlMjBJbnN0YWxsJTIwZXZlcnklMjBza2lsbCUyMGluJTIwdGhlJTIwcmVnaXN0cnklMEFkaWZmdXNlcnMtY2xpJTIwc2tpbGxzJTIwYWRkJTIwLS1hbGwlMEElMEElMjMlMjBMaXN0JTIwYXZhaWxhYmxlJTIwc2tpbGxzJTIwd2l0aCUyMGElMjBvbmUtbGluZSUyMHN1bW1hcnklMjBvZiUyMGVhY2glMEFkaWZmdXNlcnMtY2xpJTIwc2tpbGxzJTIwbGlzdCUwQSUwQSUyMyUyMFByZXZpZXclMjBhJTIwc2tpbGwncyUyMFNLSUxMLm1kJTIwd2l0aG91dCUyMGluc3RhbGxpbmclMEFkaWZmdXNlcnMtY2xpJTIwc2tpbGxzJTIwcHJldmlldyUyMGRpZmZ1c2Vycy1jbGklMEElMEElMjMlMjBSZWZldGNoJTIwYW5kJTIwcmVpbnN0YWxsJTIwZXZlcnklMjBtYW5hZ2VkJTIwc2tpbGwlMEFkaWZmdXNlcnMtY2xpJTIwc2tpbGxzJTIwdXBkYXRlJTBBJTBBJTIzJTIwSW5zdGFsbCUyMHRvJTIwdGhlJTIwdXNlci1sZXZlbCUyMGRpcmVjdG9yeSUyMGluc3RlYWQlMjBvZiUyMHRoZSUyMGN1cnJlbnQlMjBwcm9qZWN0JTBBZGlmZnVzZXJzLWNsaSUyMHNraWxscyUyMGFkZCUyMGRpZmZ1c2Vycy1jbGklMjAtLWdsb2JhbCUwQSUwQSUyMyUyMEluc3RhbGwlMjBmb3IlMjBvbmUlMjBhZ2VudCUyMGluc3RlYWQlMjBvZiUyMGRldGVjdGluZyUyMGl0JTIwZnJvbSUyMHRoZSUyMGVudmlyb25tZW50JTBBZGlmZnVzZXJzLWNsaSUyMHNraWxscyUyMGFkZCUyMC0tYWxsJTIwLS1jbGF1ZGUlMjAlMjAlMjAlMjMlMjBvciUyMC0tY29kZXglMjAlMkYlMjAtLWN1cnNvcg==",highlighted:`<span class="hljs-comment"># Install a single skill</span>
diffusers-cli skills add <span class="hljs-string">&quot;&lt;skill name&gt;&quot;</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&#x27;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>`,lang:"bash",wrap:!1});var N=e(G,4);z(N,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/cli.md"}),E(2),_(x,l),Q()}export{ee as component};

Xet Storage Details

Size:
31.7 kB
·
Xet hash:
e7ee6ce9aa9225c0da093abb4351a72e1a4963579c8d7314625cbe90b28b8775

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