Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
135 lines (102 loc) · 5.77 KB
/
Copy path.env.example
File metadata and controls
135 lines (102 loc) · 5.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# diffusers-workflow environment knobs.
#
# Copy to .env and uncomment what you need. dw loads .env from the directory
# a process starts in (load_dotenv() in dw/__init__.py), before diffusers or
# torch is imported, so every line here reaches dw.serve, dw.run and each
# spawned worker. A variable already set in the environment wins over this file.
# Everything below is commented out, so copying this file as is changes nothing.
# Workers read .env when they start, so restart dw.serve (or its idle workers)
# after editing it.
#
# Never commit .env: it is git-ignored because tokens go in it.
# --- dw: server and clients --------------------------------------------------
# Bearer token for dw.serve. Set, every API, UI and MCP request must carry it.
# dw.run and the stdio MCP server read the same variable, so one value
# configures both ends. Required before binding to anything but localhost.
# DW_API_TOKEN=some-long-random-string
# This server's public origin, for links handed to someone not at the box
# (docs/REMOTE.md). Overrides the 'public_url' setting.
# DW_PUBLIC_URL=http://lem:8765
# Where dw.run and the stdio MCP server find dw.serve.
# DW_MCP_URL=http://127.0.0.1:8765
# The workspace the stdio MCP session starts in - a name on the server.
# DW_MCP_WORKSPACE=default
# The cap on one wait_for_job call, in seconds (default 55). Raise it only if
# your MCP client holds a tool call open longer than that.
# DW_MCP_MAX_WAIT_SECONDS=55
# --- dw: engine ----------------------------------------------------------------
# The device for a CLI run: cuda, cuda:1, mps or cpu (default: detected).
# dw.serve picks cards with --devices instead.
# DW_DEVICE=cuda
# The workspace directory: workflows, assets, outputs, prompts
# (default ~/diffusers-workspace; dw.serve --workspace wins over it).
# DW_WORKSPACE=~/diffusers-workspace
# 'flat' restores the pre-run-directory output layout for scripts that glob
# the output folder (default: one directory per run).
# DW_OUTPUT_LAYOUT=flat
# Where settings.json, the job database and the log live
# (default ~/.diffusers_helper).
# DIFFUSERS_HELPER_ROOT=~/.diffusers_helper
# --- Defaults dw sets itself (shown so you know they exist) -----------------
# Each is set at import only when absent; set it here to override.
# Lets the CUDA allocator grow segments instead of fragmenting fixed ones.
# PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
# Loads sharded checkpoints on several threads (default true; false on macOS,
# where it segfaulted an SDNQ load on MPS).
# HF_ENABLE_PARALLEL_LOADING=true
# MPS only: let PyTorch use all unified memory.
# PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0
# torch.compile's cache, and with it SDNQ's Triton autotune results - the
# first-step stall of a new size or frame count is paid once per box while
# this survives reboots (default $XDG_CACHE_HOME/dw/torchinductor, or
# ~/.cache/dw/torchinductor; PyTorch's own default under /tmp does not).
# TORCHINDUCTOR_CACHE_DIR=~/.cache/dw/torchinductor
# --- Hugging Face Hub (all of diffusers and transformers download through it) --
# Token for gated models such as FLUX.1-dev (or run `hf auth login` once).
# HF_TOKEN=hf_...
# Where models are cached (default ~/.cache/huggingface). Point HF_HUB_CACHE
# at a bigger disk without moving the token and settings in HF_HOME.
# HF_HOME=~/.cache/huggingface
# HF_HUB_CACHE=/mnt/models/hub
# Never touch the network: every model must already be cached. Also stops
# diffusers checking Hub kernel publishers (see DIFFUSERS_TRUST_REMOTE_KERNELS).
# HF_HUB_OFFLINE=1
# Faster large downloads through the Xet backend, at the cost of more CPU
# and memory while downloading.
# HF_XET_HIGH_PERFORMANCE=1
# Seconds before a slow download is abandoned (default 10).
# HF_HUB_DOWNLOAD_TIMEOUT=60
# HF_HUB_DISABLE_TELEMETRY=1
# --- diffusers -----------------------------------------------------------------
# Allow attention kernels from Hub publishers diffusers does not list as
# trusted. Needed for "attention_backend": "sage_hub" (SageAttention 2 from
# SageAttention/sage-attention) - about 30% faster per MiniMax-H3 step on an
# RTX 3090. It downloads and runs remote code from any such publisher, not
# only that one, so enable it deliberately. CUDA only; no use on MPS.
# DIFFUSERS_TRUST_REMOTE_KERNELS=true
# The attention backend for every model that sets none (default native). A
# workflow's per-component "attention_backend" overrides it. Same values as
# that setting: native, flash_hub, sage_hub, _native_cudnn, ... Leave it
# native: it reaches every model on the server, and sage cannot serve all of
# them (Music3's head_dim-256 decoder, LTX's attention mask). Pin sage_hub per
# workflow instead - the MiniMax-H3 templates take attention_backend=sage_hub.
# DIFFUSERS_ATTN_BACKEND=native
# Refuse any pipeline or component that would load custom code from the Hub.
# dw's own trust gate (--trust-workflows) already covers workflow files; this
# closes the same door at the diffusers layer.
# DIFFUSERS_DISABLE_REMOTE_CODE=true
# --- transformers --------------------------------------------------------------
# Log level for transformers (debug, info, warning, error, critical).
# TRANSFORMERS_VERBOSITY=error
# Silence the tokenizers fork-safety warning after a tokenizer has been used.
# TOKENIZERS_PARALLELISM=false
# --- SDNQ quantization (CUDA) -----------------------------------------------------
# SDNQ's int matmuls run on autotuned Triton kernels by default. 0 falls back
# to PyTorch's kernels: no first-step autotune stall at a new shape, but
# slower steps. Measure before turning it off.
# SDNQ_USE_TRITON_MM=0
# Narrow the autotune search to shorten that stall, at the risk of a slower
# kernel. Comma lists; the defaults are shown.
# SDNQ_TRITON_MM_BLOCK_SIZE_M_LIST=64,128,256
# SDNQ_TRITON_MM_BLOCK_SIZE_N_LIST=64,128,256
# SDNQ_TRITON_MM_BLOCK_SIZE_K_LIST=32,64