Skip to content

CLI reference

Every Diffuse command, its flags, and defaults.

bash
diffuse <command> [options]
diffuse --version
diffuse --help

chat

Interactive chat with a model on the network.

FlagDefaultMeaning
--bootstrap <urls>built-in sentinelssentinels to discover the network
--memoryoffkeep conversation history across turns
--max-tokens <n>512longest answer per turn

Inside a session, /attach, /image, /audio and /video send a file with the next message, and a model that answers with audio or pixels writes its answer to a file. The full command list is in the chat guide.

query

Ask one question, print the answer, exit.

FlagDefaultMeaning
--model <id>requiredmodel to query
--prompt <text>requiredprompt to send
--image <path>noneimage to send with the prompt, repeatable
--audio <path>noneaudio clip to send, repeatable
--video <path>nonevideo to send, repeatable
--media <path>noneany attachment; kind read from the extension
--bootstrap <urls>built-in sentinelssentinels to discover the network
--max-tokens <n>80maximum tokens to generate
--steps <n>20denoising steps, for a model that answers by diffusion
--patches <n>1pieces each denoising step is cut into across the nodes
--seed <n>0same seed and prompt give the same answer

Attachments are consumed on your machine; only activations leave. When the model answers with something other than text, the file is written to the current directory and its path printed. See images, audio and video.

--steps, --patches and --seed apply only to models that answer by diffusion; see diffusion across nodes.

models

List the models currently hosted on the network.

FlagDefaultMeaning
--bootstrap <urls>built-in sentinelssentinels to discover the network

serve

Run a local OpenAI-compatible HTTP server in front of the network.

FlagDefaultMeaning
--port <n>8080port to listen on
--host <addr>127.0.0.1bind address, loopback only by default
--model <id>nonedefault model when a request omits one
--bootstrap <urls>built-in sentinelssentinels to discover the network

host

Join the network: profile, pick a slice, load it, announce, and serve.

FlagDefaultMeaning
--model <id>optionalmodel to serve a slice of; omit to open the marketplace
--worker <url>http://127.0.0.1:50051worker endpoint
--listen <addr>0.0.0.0:9440gossip listen address
--bootstrap <urls>built-in sentinelssentinels to join through
--overhead <f>0.3memory fraction held back as headroom
--public-addr <addr>autoaddress to advertise to peers

plan

Analyze this machine and show which slice it would host, without joining.

FlagDefaultMeaning
--model <id>requiredmodel to analyze against
--worker <url>http://127.0.0.1:50051worker endpoint
--overhead <f>0.3memory fraction held back as headroom
--bootstrap <urls>nonesentinels for a network view

Environment

VariableDefaultMeaning
HF_TOKENnoneHugging Face token; unlocks gated models, stays on your machine
DIFFUSE_WORKER_DIRinstalled copy, then ./workerwhich worker to run; see troubleshooting
DIFFUSE_WORKER_PORT50051port the worker listens on
DIFFUSE_WORKER_DEVICEautocpu, cuda, or mps; detected when unset
DIFFUSE_WORKER_MAX_BATCH8concurrent requests grouped into one pass; 1 disables
DIFFUSE_WORKER_CONCURRENCY16how many requests the worker serves at once
DIFFUSE_WORKER_THREADStorch defaultCPU threads for inference
DIFFUSE_WORKER_CACHEHugging Face defaultwhere model weights are stored
DIFFUSE_ASCIIunsetplain symbols instead of Unicode, for limited terminals
RUST_LOGwarninfo shows routing and timing, debug shows every hop

Diffuse Enterprise is commercial software. Diffuse Open is AGPL-3.0.