Defora turns Stable Diffusion Forge + Deforumation into a playable instrument: live visuals, prompt morphing, camera motion, beat-synced controls, and a neon-styled web UI for performance. https://defora.dudeisland.eu/
Top-level tabs (web UI): LIVE · PROMPTS · MOTION · MODULATION · AUDIO · SETTINGS. Runs lives under Settings → Runs; the motion sequencer / generate dock is on MOTION; stream output is Settings → Output. Library opens from the header icon (Projects, Videos, Audio, Files, Editor). Screenshots below were captured from the current build (June 2026). See also docker/web/docs/UI-FEATURE-FLOW.md and docs/ui-migration/00-README.md.
Browser-based stage with real-time layer switching:
A/B prompt blending, style modifiers, and LoRA crossfader:
XY performance pads, presets, and the animation timeline:
Six LFO slots routed to any parameter:
Checkpoint, sampler, and GPU pool configuration:
Map any MIDI controller to live parameters:
- Web UI: Browser-based Web MIDI — bind knobs and faders in Settings → Controllers / MIDI
- TUI: CC learn mode with per-parameter binding
- Full parameter control via hardware controllers at performance time
- Moderately fast GPU (4070ti / 5060ti tested) with at least 12G VRAM
- Models that have either Lightning support or accompanying LORa that need 1-2 steps for a frame. SDXL Lightning is proven to be working fine
- 32GB ram is minimum, 64gb ram recommended
- Stable Diffusion Forge + Deforum extension from https://github.com/Tok/sd-forge-deforum and https://github.com/lllyasviel/stable-diffusion-webui-forge
- There is docker stack including these in the package but it is recommended to run on external node
forge_cli— Model-aware txt2img/Deforum CLI with preset support and sensible defaultsdefora_tui— Full multi-tab ncurses interface (LIVE, PROMPTS, LORA, MOTION, AUDIO, CONTROLNET, SETTINGS)deforumation_cli_panel— Lightweight control panel with rebindable hotkeys (strength/CFG/noise/pan/zoom/rot/FOV)deforumation_dashboard— Curses dashboard mirroring the Deforumation GUI tabs
audio_reactive_modulator— Map audio bands to mediator parameters; output schedules or stream live- Beat-synced macros — Drive parameters with tempo-aligned modulation
deforumation_runs_cli— Browse run manifests, set overrides, rerun/continue generationsdeforumation_request_dispatcher— Merge manifests/presets/overrides and execute runsmonitor_cli— Tail latest frames and show live mediator values
stream_helper— Push rendered frames to RTMP/SRT/WHIP via ffmpeg- Web streaming stack — Docker compose with ffmpeg encoder, Nginx/Node (HLS), RabbitMQ, and mediator bridge
- Web UI — Browser-based performance interface with WebSocket controls and HLS video
docs/— Architecture, workflows, server targeting, schemas, troubleshooting guides
git clone https://github.com/janiluuk/defora.git
cd defora
git submodule update --init --recursive
# or: ./scripts/clone_deforumation.sh
pip install -r requirements.txtStart Forge with Deforum API enabled:
# Example: assuming Forge is installed in ~/stable-diffusion-webui-forge
cd ~/stable-diffusion-webui-forge
./webui.sh --deforum-apiGenerate images or animations with smart defaults:
# Single image
./forge_cli "a synthwave city at night"
# Animation (240 frames)
./forge_cli deforum -f 240 "surreal biomechanical cathedral"
# img2img (requires running Forge)
./forge_cli img2img --init-image ./ref.png "enhance details, cinematic" --denoising-strength 0.55
# Inpainting (mask image, same size as init recommended)
./forge_cli img2img --init-image ./scene.png --mask-image ./mask.png \
"object removal, clean background" --denoising-strength 0.72Full browser-based performance interface:
docker-compose up --build
# Open http://localhost:8080Features: Live macro sliders, prompt morphing, motion curves, audio sync, MIDI control
Full-featured ncurses interface for terminal users:
./defora_tuiNavigation: F1–F7 to switch tabs (incl. LORA on F3), ←/→ to adjust parameters, Q to quit
Minimal control panel with hotkey bindings:
./deforumation_cli_panel --host 127.0.0.1 --port 8766Browse & Rerun Saved Generations:
./deforumation_runs_cliAudio-Reactive Modulation:
# Generate audio schedule
./audio_reactive_modulator --audio song.wav --fps 24 --output audio_mod.json
# Stream live to mediator
./audio_reactive_modulator --audio song.wav --fps 24 --live \
--mediator-host 127.0.0.1 --mediator-port 8766
# Optional post-pass on the generated schedule (module:function)
./audio_reactive_modulator --audio song.wav --fps 24 --output out.json \
--post-plugin defora_cli.plugins.audio_post:processMonitor Live Generation:
./monitor_cli --frames runs/<id>/framesStream to RTMP/SRT:
./stream_helper start --source runs/<id>/frames \
--target rtmp://example/live/key --fps 24- Audio-visual instrument: Treat prompts, camera, and ControlNet as live parameters; drive them via CLI/TUI/Web or controllers.
- Presets & manifests: Deforum JSON presets and run manifests can be merged with CLI overrides. The runs TUI writes
*_request.jsonthat the dispatcher consumes. - Mediator control: The panel, dashboard, and audio modulator talk to the mediator websocket so you can steer generation without the full UI.
- Model-aware defaults:
forge_clipicks steps/CFG/sampler based on the active model (Flux/SDXL/SD1.5) and can auto-switch to Flux-schnell.
- The DeforumationQT mediator is vendored under
deforumation/. Run it to bridge SD-Forge/Deforum to the Deforumation UI and our CLI tools (panel/dashboard/audio modulator). - See
docs/mediator_setup.mdfor mediator startup steps and for installing the sd-forge Deforum bridge fromdeforumation/Deforum_Version/sd-forge/. - Docker users:
docker-compose up --build mediator sd-forgewill start the mediator (ports 8765/8766) and a Forge container with the Deforumation-patched Deforum extension pre-installed (UI on port 7860).
On vimage2 (192.168.2.101) DeforumationQT runs alongside the SD-Forge Docker stack as systemd services:
./vimage2-deforumationqt status # show SD-Forge, mediator, GUI status
./vimage2-deforumationqt start # start all services
./vimage2-deforumationqt stop # stop all services| Service | Ports | Description |
|---|---|---|
forge (Docker) |
7860 (public) |
SD-Forge web UI + Deforum extension |
deforumation-mediator.service |
8765/8766 (public) |
Mediator bridging Deforum ↔ Deforumation |
deforumation-gui.service |
8767 (local) |
DeforumationQT Qt GUI (headless via Xvfb) |
Set VIMAGE2_HOST (default 192.168.2.101) if the IP differs.
FORGE_API_BASE— Python CLI target Forge server (e.g.,http://192.168.2.101:7860).SD_FORGE_HOST/SD_FORGE_PORT— web stack Forge hostname and port (Docker Compose defaults tosd-forge:7860).FORGE_OUT_DIR— output directory forforge_cli.DEFORUMATION_FORGE_CLI— path override for Forge CLI when auto-dispatching.DEFORUMATION_AUTO_DISPATCH=1— havedeforumation_runs_cliimmediately dispatch requests.DEFORUMATION_FRAMES_DIR— default frames path formonitor_cli.DEFORUMATION_ASCII_PREVIEW=1— enable ASCII thumbnails in monitor/runs TUI (needs Pillow).DEFORUMATION_MEDIATOR_HOST/DEFORUMATION_MEDIATOR_PORT— defaults for mediator-backed UIs (panel, dashboard, monitor).CONTROL_TOKEN— WebSocket control token for the web UI (set when running docker-compose).MEDIATOR_HOST(compose bridge) — set this ifhost.docker.internalis not available on your host (common on Linux) so the control bridge can reach the mediator.SD_FORGE_POLL_MS— if set to a positive value (milliseconds) on the web stack, the API periodically probes SD-Forge so/api/statusand the Web UI Forge indicator stay current without opening model list endpoints.SEQUENCER_DIR— directory for saved animation sequencer timelines (Web UI MOTION tab); default isdocker/web/sequencersnext to the Node server.DEFORA_TUI_LORA_STATE— optional path fordefora_tuiLoRA tab save/load (JSON); default~/.config/defora/tui_lora.json.PLUGINS_DIR— optional directory fordocker/web/plugins/manifest.json(WebGET /api/plugins). CLI post-plugins use a separate registry:defora_cli/plugins/manifest.json(seedefora_cli.plugins).- Web MIDI: enable in your browser and map controls in the Settings tab (Controllers / WebMIDI) to live parameters.
See ROADMAP.md for:
- Current feature status and completeness
- Unfinished/in-progress features
- Planned features and timeline
- Long-term vision and goals
Same pattern as Sparkki: rsync + remote Docker Compose via jumphost pi@sparkki.dudeisland.eu:4322 → root@192.168.2.100:/srv/defora.
./scripts/production-deploy.shGitHub Actions: .github/workflows/deploy-production.yml (after green CI on main, or manual dispatch). Requires secret DEPLOY_SSH_PRIVATE_KEY. See docs/deploy.md.
- CLI/package code:
tools/defora_cli/ - Executable wrappers:
tools/bin/(root stubs like./forge_clidelegate here) - Web UI & streaming stack:
docker-compose.yml,docker/web/(Nginx+Node+Vue front-end, HLS, controls),docker/bridge/(mediator bridge) - Docs:
docs/(workflows, server targeting, schema, streaming) - Tests:
tests/(Python) anddocker/web/test(web UI smoke tests) - Logo:
assets/defora_logo.svg(dark-mode friendly, neon gradient)
Run the suite (requires pytest installed):
./scripts/run_tests.sh # or: python -m pytest













