This release is a pre-release and may not be stable for production use.
diffusers-workflow
A declarative workflow engine and web UI for the Hugging Face Diffusers library. Define image/video generation pipelines in JSON — with full access to the configuration diffusers exposes — and run them from the command line, an interactive REPL, or a browser.
Python 3.10-3.14 | CUDA (NVIDIA) | MPS (Apple Silicon) | CPU
Features
- Web UI — browse and run workflows, edit them in introspection-driven forms, watch jobs stream live progress, manage generated output and the models on disk.
python -m dw.serveand open a browser. See Server & Web UI. - Declarative JSON workflows with variable substitution and cross-step data flow
- Multi-step pipelines — chain text-to-image, image-to-video, inpainting, ControlNet
- Reproducible by construction — outputs embed their full workflow definition and seed; any image in the gallery reopens as the exact workflow that made it
- Long-video chaining — run a video pipeline once per segment and stitch the segments into one clip, with audio-driven length and frame-to-frame continuity
- Quantization — BitsAndBytes, TorchAO, GGUF, SDNQ, optimum-quanto
- Inference acceleration — TeaCache, FirstBlockCache, FasterCache, MagCache, TaylorSeerCache
- Prompt weighting — A1111-style
(word:1.5)syntax with long prompt support - LoRA and IP-Adapter support
- Composable workflows from multiple JSON files with
builtin:references - Utility tasks — upscaling, face restoration, segmentation, captioning, frame interpolation, QR codes, and more
- Interactive REPL with persistent GPU model caching (2-4x faster iteration)
- Cross-platform — CUDA, MPS (Apple Silicon), and CPU
Installation
Linux / macOS
bash ./install.sh
source ./activate
python -m dw.test
Windows
.\install.ps1
.\venv\scripts\activate
python -m dw.test
The install scripts detect your Python version, create a virtual environment, and install all dependencies including platform-specific packages (bitsandbytes on CUDA, fp4-fp8-for-torch-mps on macOS).
The Web UI
python -m dw.serve
# diffusers-workflow server on http://127.0.0.1:8765
Everything the engine does, in a browser backed by a persistent GPU worker — models stay loaded between runs.
A form-based editor with the real pipeline signatures. Forms and argument autocomplete are generated by introspecting diffusers itself, so every knob a pipeline exposes is available — with its documentation — without leaving the browser. A split view puts the JSON beside the form, both editable; validation catches schema errors and argument typos (by checking the pipeline's actual call signature) before any model loads.
A gallery where every image is a recipe. Outputs embed their workflow and seed; open as workflow drops the definition into the editor with the seed pinned, ready to reproduce or riff on.
A model manager for the disk your models actually consume. The Hugging Face hub cache, inventoried: sizes, revisions, last-used dates, free space — download new models by id with live progress, delete with one click.
Jobs queue, stream progress live (per denoising step), cancel cooperatively, and persist to a searchable history. See Server & Web UI for the pages and the HTTP API.
Usage
Run a Workflow
python -m dw.run examples/flux/FluxDev.json
python -m dw.run examples/flux/FluxDev.json prompt="a cat" num_images_per_prompt=4
Validate a Workflow
python -m dw.validate examples/flux/FluxDev.json
Interactive REPL
python -m dw.repl
dw> workflow load flux/FluxDev
dw> arg set prompt="a beautiful sunset"
dw> workflow run
[... models load once ...]
dw> arg set prompt="a starry night"
dw> workflow run
Reusing loaded models from cache
[... 2-4x faster ...]
dw> memory show
dw> ? # show all command groups
See REPL Commands and Worker Guide.
Workflow Examples
Simple Image Generation
{
"id": "flux_example",
"variables": {
"prompt": "an apple",
"num_images_per_prompt": 1
},
"steps": [
{
"name": "main",
"pipeline": {
"configuration": {
"component_type": "FluxPipeline",
"offload": "sequential"
},
"from_pretrained_arguments": {
"model_name": "black-forest-labs/FLUX.1-dev",
"torch_dtype": "torch.bfloat16"
},
"arguments": {
"prompt": "variable:prompt",
"num_inference_steps": 25,
"num_images_per_prompt": "variable:num_images_per_prompt",
"guidance_scale": 3.5
}
},
"result": {
"content_type": "image/jpeg"
}
}
]
}
Override variables from the command line:
python -m dw.run flux_example.json prompt="an orange" num_images_per_prompt=4
Multi-Step Workflow (Image to Video)
Chain steps using previous_result:step_name to pass outputs between steps:
{
"id": "img2vid",
"steps": [
{
"name": "image_generation",
"pipeline": {
"configuration": {
"component_type": "StableDiffusion3Pipeline",
"offload": "model"
},
"from_pretrained_arguments": {
"model_name": "stabilityai/stable-diffusion-3.5-large",
"torch_dtype": "torch.bfloat16"
},
"arguments": {
"prompt": "a luminous owl in a neon forest",
"num_inference_steps": 25,
"guidance_scale": 4.5
}
},
"result": { "content_type": "image/png" }
},
{
"name": "video",
"pipeline": {
"configuration": {
"component_type": "CogVideoXImageToVideoPipeline",
"offload": "sequential",
"vae": { "configuration": { "enable_slicing": true, "enable_tiling": true } }
},
"from_pretrained_arguments": {
"model_name": "THUDM/CogVideoX-5b-I2V",
"torch_dtype": "torch.bfloat16"
},
"arguments": {
"image": "previous_result:image_generation",
"prompt": "The owl blinks slowly",
"num_inference_steps": 50,
"num_frames": 49,
"guidance_scale": 6
}
},
"result": { "content_type": "video/mp4" }
}
]
}
Inference Acceleration
Speed up generation with built-in diffusers caching or TeaCache:
"configuration": {
"component_type": "FluxPipeline",
"cache": { "type": "first_block", "threshold": 0.05 }
}
"configuration": {
"component_type": "FluxPipeline",
"teacache": { "rel_l1_thresh": 0.6 }
}
Prompt Weighting
Use A1111-style syntax for per-token weighting:
"configuration": {
"component_type": "FluxPipeline",
"prompt_weighting": true
}
a (photorealistic:1.4) portrait with (bright red hair:1.3) and [freckles]
JSON Schema
Interactive schema browser: View Schema
See examples/ for more workflow files.
Documentation
Guides
- Server & Web UI — The web UI, jobs API, and introspection service
- Workflow Guide — JSON structure, variables, steps, data flow
- Quantization — BitsAndBytes, TorchAO, GGUF, SDNQ
- Inference Acceleration — torch.compile, FirstBlockCache, MagCache, TaylorSeer, TeaCache
- Fast on 24GB — Recommended speed/memory configurations per model family
- LoRA — Loading and stacking LoRA adapters
- IP-Adapter — Image-prompt conditioning
- Prompt Weighting — A1111-style syntax
- Tasks — Image processing, ControlNet preprocessors, utilities
Reference
- REPL Commands — Interactive REPL command reference
- Worker Guide — GPU persistence and troubleshooting
- Dependencies — Installation details
- Security — Security model
- Testing — Running the test suite
- Releasing — Cutting a release from a version tag
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diffusers_workflow-0.4.0a4.tar.gz.
File metadata
- Download URL: diffusers_workflow-0.4.0a4.tar.gz
- Upload date:
- Size: 3.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0817c06b825dc32b635153f65dcecf00d5bec90005132eabd2923d935bfbd959
|
|
| MD5 |
a20ea578a1337257a1b3e9c95a353481
|
|
| BLAKE2b-256 |
b16f17dae13f1cc49d32746220246c62077138409254c2ad8d5cc3fee549a42d
|
Provenance
The following attestation bundles were made for diffusers_workflow-0.4.0a4.tar.gz:
Publisher:
ci.yml on dkackman/diffusers-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffusers_workflow-0.4.0a4.tar.gz -
Subject digest:
0817c06b825dc32b635153f65dcecf00d5bec90005132eabd2923d935bfbd959 - Sigstore transparency entry: 2652203906
- Sigstore integration time:
-
Permalink:
dkackman/diffusers-workflow@5f7878ede1c8d35d31f63e0351bd69f1b6e0cfc4 -
Branch / Tag:
refs/tags/v0.4.0-alpha.4 - Owner: https://github.com/dkackman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5f7878ede1c8d35d31f63e0351bd69f1b6e0cfc4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file diffusers_workflow-0.4.0a4-py3-none-any.whl.
File metadata
- Download URL: diffusers_workflow-0.4.0a4-py3-none-any.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29b395ae3e55763c0d8bb71f5e1bbbc2a0ce8e9d7de6011b7b0390457c36f9ba
|
|
| MD5 |
1d01f317e4af96c74bddcf9c9d51d4f2
|
|
| BLAKE2b-256 |
dd3ac1e80e26c8283ffc2df7da5979fe7ea2b63806f8f21cc9c1c487f936c998
|
Provenance
The following attestation bundles were made for diffusers_workflow-0.4.0a4-py3-none-any.whl:
Publisher:
ci.yml on dkackman/diffusers-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffusers_workflow-0.4.0a4-py3-none-any.whl -
Subject digest:
29b395ae3e55763c0d8bb71f5e1bbbc2a0ce8e9d7de6011b7b0390457c36f9ba - Sigstore transparency entry: 2652203969
- Sigstore integration time:
-
Permalink:
dkackman/diffusers-workflow@5f7878ede1c8d35d31f63e0351bd69f1b6e0cfc4 -
Branch / Tag:
refs/tags/v0.4.0-alpha.4 - Owner: https://github.com/dkackman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5f7878ede1c8d35d31f63e0351bd69f1b6e0cfc4 -
Trigger Event:
push
-
Statement type: