Skip to content
Merged

Develop #1156

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b0ab997
chore: open 0.18.0-alpha.1 on develop
dkackman Nov 1, 2026
1b475b8
docs(proposals): Higgsfield feature audit, tier 1 cinematic-controls …
dkackman Nov 2, 2026
093cadf
feat(plugin): #1142 - cinematography skill: camera/look vocabulary co…
dkackman Nov 2, 2026
9927491
fix(plugin): #1142 - cinematography: scope line, LTX viewpoint per ro…
dkackman Nov 2, 2026
349a6f6
feat(plugin): #1143 - persisted shot document, fix ladder, H3 prompt …
dkackman Nov 2, 2026
1f8f6f3
feat(tasks): #1144 - stills_to_video: hold each still for a duration
dkackman Nov 2, 2026
cdc56c6
fix(tasks): #1144 - stills_to_video: byte budget before allocation, i…
dkackman Nov 2, 2026
c7ac773
feat(tasks): #1146 - analyze_face_drift: SFace identity check per shot
dkackman Nov 2, 2026
79da2c1
feat(catalog): #1145/#1146 - animatic + face-drift-check templates, s…
dkackman Nov 2, 2026
4f0eb10
feat(plugin): #1147 - sitcom multicam grammar
dkackman Nov 2, 2026
f7ef74b
fix(plugin): #1147 - sitcom multicam: line-level cuts, plan_cuts fiel…
dkackman Nov 2, 2026
b35ab13
fix: #1141 - final review: ratchet green, animatic durations list, ke…
dkackman Nov 2, 2026
758c7e9
Merge feat/1141-cinematic-controls: cinematic controls tier 1 (stages…
dkackman Nov 2, 2026
c8cb1e8
feat: enhance FlowView with step selection and state indication; upda…
dkackman Nov 2, 2026
23c2ab5
feat: add JSON toggle button to JobPage with Braces icon; improve layout
dkackman Nov 2, 2026
e2dd2d9
fix(JobPage): update JSON toggle button styles and icon size for impr…
dkackman Nov 2, 2026
53024eb
feat(docker): add Docker support for dw with init and switch scripts
dkackman Nov 2, 2026
0b03e55
docs(docker): DW_BIND=0.0.0.0 for LAN access after switching from sys…
dkackman Nov 2, 2026
fa6cd43
Merge feat/docker-image: Docker image with a diffusers overlay volume…
dkackman Nov 2, 2026
9aa8e92
ci(docker): publish dkackman/diffusers-workflow to Docker Hub on rele…
dkackman Nov 2, 2026
c1780ff
refactor(ui): FlowLegend out of FlowView, back under the size ceiling…
dkackman Nov 2, 2026
f0fdee5
fix(docker): never log the API token; login-url prints the link on re…
dkackman Nov 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
"name": "diffusers-workflow",
"description": "Skills for driving a diffusers-workflow server from Claude Code: a composition skill per model family, and one for cutting a series from them.",
"description": "Skills for driving a diffusers-workflow server from Claude Code: a composition skill per model family, one for cutting a series from them, one camera-and-look vocabulary compiled per family, and storyboards with a timed animatic.",
"owner": {
"name": "Don Kackman"
},
"plugins": [
{
"name": "dw",
"source": "./plugins/dw",
"description": "Compose MiniMax H3 video, MiniMax Music 3 and LTX-2.5 workflows over a dw MCP server, and cut a multi-episode series from them: which template fits which shape, the hard rules, cost, and how to judge the output. Prompt format comes from the vendors' own guides."
"description": "Compose MiniMax H3 video, MiniMax Music 3, LTX-2.5, Kandinsky 6.0 and FLUX 3 Klein workflows over a dw MCP server, cut a multi-episode series from them, direct camera and look in each family's caption format, and storyboard a scene before it is filmed: which template fits which shape, the hard rules, cost, and how to judge the output. Prompt format comes from the vendors' own guides."
}
]
}
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# The image builds from a clean tree: no venv, no build products, no outputs
.git
venv
activate
.env
.env.*
**/__pycache__
**/*.pyc
*.egg-info
build
dist
outputs
log
tmp*
.superpowers
.remember
.claude
docker/.env
ui/node_modules
ui/dist
ui/test-results
ui/playwright-report
dw/server/ui
dw/docs
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,60 @@ jobs:
name: diffusers-workflow-dist
path: dist
- uses: pypa/gh-action-pypi-publish@v1.14.3

docker:
# The container image (docker/Dockerfile, docs/DOCKER.md) on Docker Hub,
# from the same tag as the release. One-time setup: a Docker Hub access
# token (read/write) for dkackman, stored as secret DOCKERHUB_TOKEN in a
# GitHub environment named dockerhub. A pre-release tag (v1.2.3-rc1)
# pushes its version only; a release also moves latest.
needs: release
runs-on: ubuntu-latest
environment:
name: dockerhub
url: https://hub.docker.com/r/dkackman/diffusers-workflow
env:
IMAGE: dkackman/diffusers-workflow
steps:
- name: Free disk space
# The image is ~12 GB and torch's wheels are unpacked on the way;
# the runner's preinstalled SDKs leave too little room otherwise
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost
sudo docker image prune --all --force
df -h /
- uses: actions/checkout@v7
- name: Build
run: |
version="${GITHUB_REF_NAME#v}"
tags=(-t "$IMAGE:$version")
case "$version" in *-*) ;; *) tags+=(-t "$IMAGE:latest");; esac
docker buildx build --load -f docker/Dockerfile "${tags[@]}" \
--label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
--label "org.opencontainers.image.version=$version" \
--label "org.opencontainers.image.revision=$GITHUB_SHA" \
--label "org.opencontainers.image.licenses=Apache-2.0" \
.
- name: Smoke test
# No GPU here: the server starts on CPU with the baked diffusers and
# must answer /api/health; the worker starts lazily, so no model loads
run: |
docker run -d --name dw -p 127.0.0.1:8765:8765 \
-e DW_DIFFUSERS_REF=image -e DW_INSECURE_NO_TOKEN=1 \
"$IMAGE:${GITHUB_REF_NAME#v}"
for _ in $(seq 60); do
if curl -fsS http://127.0.0.1:8765/api/health >/dev/null; then
docker logs dw 2>&1 | tail -5; exit 0
fi
sleep 5
done
docker logs dw 2>&1 | tail -50
exit 1
- name: Push
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
echo "$DOCKERHUB_TOKEN" | docker login -u dkackman --password-stdin
docker push --all-tags "$IMAGE"
docker logout
14 changes: 7 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ The guides in `docs/`, by topic:

`.claude-plugin/marketplace.json` publishes the `dw` plugin in `plugins/dw/`: one
composition skill per model family (`minimax-h3`, `minimax-music3`, `ltx-2.5`,
`kandinsky-6`, `flux3-klein`) that chooses a template for a request's shape and
states the family's hard rules, plus
cross-cutting composition skills (`script-to-video`, `series-episodes`) - shapes above
the families that orchestrate the decision trees and cast consistency across multiple
generations. Every skill the directory holds is named in `plugins/dw/README.md` and here,
pinned by `tests/test_plugin_skills.py`; that README says how the rest is pinned and
versioned.
`kandinsky-6`, `flux3-klein`) that chooses a template for a request's shape and states the
family's hard rules, plus cross-cutting composition skills (`script-to-video`,
`series-episodes`, `cinematography`, `storyboard`) - shapes above the families that
orchestrate the decision trees, cast consistency across multiple generations, one
camera-and-look vocabulary compiled per family, and boards and a timed animatic before
video. Every skill the directory holds is named in `plugins/dw/README.md` and here, pinned
by `tests/test_plugin_skills.py`; that README says how the rest is pinned and versioned.

## Security Rules

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ source ./activate
`python -m dw.test` runs a small built-in workflow end to end - it downloads
SD 1.5 (a few GB) and generates one image on whichever accelerator was found.

**Or run it in Docker** (Linux with an NVIDIA GPU). The image
[`dkackman/diffusers-workflow`](https://hub.docker.com/r/dkackman/diffusers-workflow)
has torch, the engine and the web UI built in, and it shares the model cache
and workspace with a native install on the same box. diffusers itself lives
on a volume, so it can follow GitHub main. That makes step 2 a container:

```bash
bash docker/init-env.sh
docker compose -f docker/compose.yaml up -d --build
docker compose -f docker/compose.yaml logs -f # wait for the server to start
docker compose -f docker/compose.yaml exec dw python /opt/dw/entrypoint.py login-url # the login link
```

Setup, data sharing and updates are in [docs/DOCKER.md](docs/DOCKER.md).

**2. Start the engine.** Leave it running; everything else talks to it.

```bash
Expand Down Expand Up @@ -226,6 +241,7 @@ frame interpolation and more.
- [MCP Server](docs/MCP.md) — The agent tool surface (Claude Code, Claude Desktop)
- [Server & Web UI](docs/SERVER.md) — The web UI, jobs API, and introspection service
- [Remote GPU server](docs/REMOTE.md) — Using the server, UI and MCP from another machine
- [Docker](docs/DOCKER.md) — The server in a container on a Linux NVIDIA box, sharing data with a native install
- [Workspaces](docs/WORKSPACES.md) — Where your content lives, run directories, and several workspaces on one server
- [Workflow Guide](docs/WORKFLOW_GUIDE.md) — JSON structure, variables, steps, data flow
- [Quantization](docs/QUANTIZATION.md) — BitsAndBytes, TorchAO, GGUF, SDNQ
Expand Down
84 changes: 84 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# syntax=docker/dockerfile:1
# diffusers-workflow server image (Linux, NVIDIA). See docs/DOCKER.md.
#
# docker compose -f docker/compose.yaml build
#
# The build context is the repository root. Torch and every dependency are
# baked in; diffusers is baked too, as a fallback - the copy the server uses
# lives on the /data/env volume (docker/entrypoint.py), so it can track main.

ARG PYTHON_VERSION=3.13

# --- the wheel: scripts/build_dist.sh, with the SPA built by npm -----------
# Node's version follows ui/.nvmrc (tests/test_docker.py pins the two)
FROM node:24.20.0-trixie-slim AS node

FROM python:${PYTHON_VERSION}-slim-trixie AS wheel
COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
WORKDIR /src
COPY ui/package.json ui/package-lock.json ui/
RUN cd ui && npm ci --no-audit --no-fund
COPY . .
RUN bash scripts/build_dist.sh

# --- the runtime ----------------------------------------------------------
FROM python:${PYTHON_VERSION}-slim-trixie

# cu130 needs an NVIDIA driver >= 580 and a Turing or newer card. A CUDA 12
# image for an older driver: --build-arg TORCH_INDEX=https://pypi.org/simple
ARG TORCH_INDEX=https://download.pytorch.org/whl/cu130
# The baked (fallback) diffusers: a branch, tag or commit
ARG DIFFUSERS_REF=main

# git for pip's git+ installs; a compiler for Inductor and Triton, which
# build kernels at run time; tini as PID 1, so signals reach dw.serve and
# its worker processes are reaped
RUN apt-get update \
&& apt-get install -y --no-install-recommends git build-essential tini \
&& rm -rf /var/lib/apt/lists/*

ENV PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PYTHONUNBUFFERED=1

# install.sh's order: torch first, so the resolver below sees it satisfied;
# then dw; then diffusers from git, forced without its dependencies (forcing
# those would reinstall torch), and a plain install to add any it needs
RUN pip install torch torchvision torchaudio --index-url "${TORCH_INDEX}"
COPY --from=wheel /src/dist/*.whl /tmp/wheels/
RUN pip install "$(ls /tmp/wheels/*.whl)[server,mcp]" && rm -rf /tmp/wheels
RUN pip install --force-reinstall --no-deps \
"git+https://github.com/huggingface/diffusers@${DIFFUSERS_REF}" \
&& pip install diffusers

# The catalog the server offers beside the workspace's own (--examples-dir):
# the repo's workflows/, with the prompts/ and loras/ they reference
COPY workflows /opt/dw/examples/workflows
COPY prompts /opt/dw/examples/prompts
COPY loras /opt/dw/examples/loras

COPY docker/entrypoint.py /opt/dw/entrypoint.py
RUN python /opt/dw/entrypoint.py record-image

# Defaults for a container with one /data volume. docker/compose.yaml
# replaces the shared ones with host paths, mounted at the same path.
ENV DW_ENV_DIR=/data/env \
HOME=/data/env/home \
DW_WORKSPACE=/data/workspace \
HF_HOME=/data/hf \
TORCHINDUCTOR_CACHE_DIR=/data/cache/torchinductor \
TRITON_CACHE_DIR=/data/cache/triton \
DIFFUSERS_HELPER_ROOT=/data/settings

# Any uid may run it (compose passes the host user's); nothing below /data
# is created at build time, so the volume's owner owns everything in it, and
# without a volume /data is world-writable (sticky) for whichever uid it is
RUN mkdir -m 1777 /data
WORKDIR /data
EXPOSE 8765
HEALTHCHECK --interval=30s --timeout=15s --start-period=10m --retries=3 \
CMD ["python", "/opt/dw/entrypoint.py", "healthcheck"]
ENTRYPOINT ["tini", "--", "python", "/opt/dw/entrypoint.py", "serve"]
CMD []
66 changes: 66 additions & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# diffusers-workflow in a container. See docs/DOCKER.md.
#
# bash docker/init-env.sh # writes docker/.env from this host's layout
# docker compose -f docker/compose.yaml up -d --build
# docker compose -f docker/compose.yaml logs -f # wait for it to start
# docker compose -f docker/compose.yaml exec dw python /opt/dw/entrypoint.py login-url
#
# Every shared directory is mounted at the same absolute path it has on the
# host, and the variable dw reads points at it. Run manifests, settings and
# quantized-cache entries record absolute paths, so a container and a native
# dw.serve (systemd, install.sh) can share the workspace and every cache and
# read each other's records. Only DW_ENV_DIR - the diffusers overlay - is the
# container's own.
services:
dw:
build:
context: ..
dockerfile: docker/Dockerfile
# Built here by default; DW_IMAGE=dkackman/diffusers-workflow:latest
# (then `docker compose pull`) runs the published image instead
image: ${DW_IMAGE:-diffusers-workflow:local}
# The host user, so files written to the shared directories are theirs
user: "${DW_UID:?run docker/init-env.sh}:${DW_GID:?run docker/init-env.sh}"
ports:
- "${DW_BIND:-127.0.0.1}:${DW_HOST_PORT:-8765}:8765"
volumes:
- ${DW_ENV_DIR:?run docker/init-env.sh}:/data/env
- ${DW_WORKSPACE:?run docker/init-env.sh}:${DW_WORKSPACE}
- ${HF_HOME:?run docker/init-env.sh}:${HF_HOME}
- ${TORCHINDUCTOR_CACHE_DIR:?run docker/init-env.sh}:${TORCHINDUCTOR_CACHE_DIR}
- ${TRITON_CACHE_DIR:?run docker/init-env.sh}:${TRITON_CACHE_DIR}
- ${DIFFUSERS_HELPER_ROOT:?run docker/init-env.sh}:${DIFFUSERS_HELPER_ROOT}
env_file:
# The checkout's own .env (DW_QUANTIZED_CACHE=1 and the like), the
# file a native dw.serve loads, so both run with the same switches;
# then docker/.env (DW_API_TOKEN, HF_TOKEN, DW_DIFFUSERS_REF, ...),
# which wins where both set a variable
- path: ../.env
required: false
- path: .env
# Only the mounted paths, which must match the mounts above. Anything
# else set here would override both env files, empty or not.
environment:
# docker/.env holds the overlay's host path; inside, it is /data/env
DW_ENV_DIR: /data/env
DW_WORKSPACE: ${DW_WORKSPACE}
HF_HOME: ${HF_HOME}
TORCHINDUCTOR_CACHE_DIR: ${TORCHINDUCTOR_CACHE_DIR}
TRITON_CACHE_DIR: ${TRITON_CACHE_DIR}
DIFFUSERS_HELPER_ROOT: ${DIFFUSERS_HELPER_ROOT}
# dw.serve's arguments; the entrypoint adds --host, --port and --examples-dir
command: ${DW_SERVE_ARGS:---mcp}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# Worker processes hand tensors through shared memory
shm_size: "16gb"
ulimits:
nofile: 65536
# Model loads are slow to interrupt; give a job time to unwind
stop_grace_period: 60s
restart: unless-stopped
Loading
Loading