git clone https://github.com/FeelTheFonk/sddj.git
cd sddj/server
uv sync --all-extras # all deps including demucs, torchao, etc.
# SageAttention is installed separately by setup.ps1 (pre-built wheel)
uv run python run.py # dev server on ws://localhost:9999| Directory | Stack | Role |
|---|---|---|
server/ |
Python (PyTorch, Diffusers, Librosa) | Generation engine, WebSocket API |
extension/ |
Lua (Aseprite scripting API) | UI, image capture, canvas injection |
docs/ |
Markdown | User guide, API reference, DSL spec, sources |
scripts/ |
PowerShell/Python | Model download, extension build, integration tests |
Architecture: docs/REFERENCE.md
- Ruff for lint + format. Line length: 100. Strict type hints (
from __future__ import annotations). - Google-style docstrings for classes and public functions.
uv run ruff check . && uv run ruff format .- Code split across
sddj_*.luamodules — do not merge intosddj.lua. - UI state centralized in
sddj_state.lua. Usepcallfor Aseprite API calls that may fail mid-generation.
cd server && uv run pytest -vNew features/fixes require pytest tests. scripts/test_generate.py runs end-to-end pipeline tests.
- Branch:
feat/your-featureorfix/your-bug - Code + tests + docs (if user-facing)
pytestpasses,ruffzero warnings- PR with problem description + approach
- Offline by default — no runtime downloads,
download_models.pyfetches everything upfront - SOTA Performance — torch.compile, DeepCache, distilled models over slower alternatives
- Resilience — server never crashes Aseprite, WebSockets auto-reconnect, generations timeout