Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .versions
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ GOLANGCI_LINT_VERSION=v2.12.2
VLLM_VERSION=0.19.1
VLLM_UPSTREAM_VERSION=0.19.0
VLLM_METAL_RELEASE=v0.2.0-20260420-142150
DIFFUSERS_RELEASE=v0.1.0-20260216-000000
DIFFUSERS_RELEASE=v0.1.0-20260617-000000
SGLANG_VERSION=0.5.6
LLAMA_SERVER_VERSION=b9592
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,13 @@ diffusers-build:
@if [ -f "$(DIFFUSERS_TARBALL)" ]; then \
echo "Tarball already exists: $(DIFFUSERS_TARBALL)"; \
else \
set -e; \
echo "Building diffusers tarball..."; \
scripts/build-diffusers-tarball.sh $(DIFFUSERS_RELEASE) $(DIFFUSERS_TARBALL); \
if [ ! -f "$(DIFFUSERS_TARBALL)" ]; then \
echo "Error: $(DIFFUSERS_TARBALL) was not created"; \
exit 1; \
fi; \
echo "Tarball created: $(DIFFUSERS_TARBALL)"; \
fi

Expand All @@ -369,7 +374,8 @@ diffusers-dev:
echo "Usage: make diffusers-dev DIFFUSERS_PATH=../path-to-diffusers-server"; \
exit 1; \
fi
@PYTHON_BIN=""; \
@set -e; \
PYTHON_BIN=""; \
if command -v python3.12 >/dev/null 2>&1; then \
PYTHON_BIN="python3.12"; \
elif command -v python3 >/dev/null 2>&1; then \
Expand All @@ -386,11 +392,11 @@ diffusers-dev:
echo "Installing diffusers from $(DIFFUSERS_PATH)..."; \
rm -rf "$(DIFFUSERS_INSTALL_DIR)"; \
$$PYTHON_BIN -m venv "$(DIFFUSERS_INSTALL_DIR)"; \
. "$(DIFFUSERS_INSTALL_DIR)/bin/activate" && \
pip install "diffusers==0.36.0" "torch==2.9.1" "transformers==4.57.5" "accelerate==1.3.0" "safetensors==0.5.2" "huggingface_hub==0.34.0" "bitsandbytes==0.49.1" "fastapi==0.115.12" "uvicorn[standard]==0.34.1" "pillow==11.2.1" && \
SITE_PACKAGES="$(DIFFUSERS_INSTALL_DIR)/lib/python3.12/site-packages" && \
cp -Rp "$(DIFFUSERS_PATH)/python/diffusers_server" "$$SITE_PACKAGES/diffusers_server" && \
echo "dev" > "$(DIFFUSERS_INSTALL_DIR)/.diffusers-version"; \
. "$(DIFFUSERS_INSTALL_DIR)/bin/activate"; \
pip install "diffusers==0.38.0" "torch==2.9.1" "transformers==4.57.5" "accelerate==1.3.0" "safetensors==0.8.0" "huggingface_hub==0.34.0" "bitsandbytes==0.49.1" "fastapi==0.115.12" "uvicorn[standard]==0.34.1" "pillow==11.2.1"; \
SITE_PACKAGES="$(DIFFUSERS_INSTALL_DIR)/lib/python3.12/site-packages"; \
cp -Rp "$(DIFFUSERS_PATH)/python/diffusers_server" "$$SITE_PACKAGES/diffusers_server"; \
echo "dev" > "$(DIFFUSERS_INSTALL_DIR)/.diffusers-version"; \
echo "diffusers dev installed from $(DIFFUSERS_PATH)"

diffusers-clean:
Expand Down
5 changes: 3 additions & 2 deletions pkg/inference/backends/diffusers/diffusers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const (
Name = "diffusers"
defaultInstallDir = ".docker/model-runner/diffusers"
// diffusersVersion is the diffusers release tag to download from Docker Hub.
diffusersVersion = "v0.1.0-20260216-000000"
// Keep in sync with DIFFUSERS_RELEASE in .versions.
diffusersVersion = "v0.1.0-20260617-000000"
)

var (
Expand Down Expand Up @@ -258,7 +259,7 @@ func (d *diffusers) Run(ctx context.Context, socket, model string, modelRef stri
BackendName: "Diffusers",
Socket: socket,
BinaryPath: d.pythonPath,
SandboxPath: "",
SandboxPath: d.installDir,
SandboxConfig: sandbox.ConfigurationPython,
Args: args,
Logger: d.log,
Expand Down
10 changes: 7 additions & 3 deletions scripts/build-diffusers-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,19 @@ fi
echo "Installing standalone Python 3.12 via uv..."
uv python install 3.12

PYTHON_BIN=$(uv python find 3.12)
PYTHON_BIN=$(uv python find 3.12 | awk '/^\// { path=$0 } END { print path }')
if [ -z "$PYTHON_BIN" ]; then
echo "Error: could not resolve uv Python 3.12 path" >&2
exit 1
fi
PYTHON_PREFIX=$(cd "$(dirname "$PYTHON_BIN")/.." && pwd)
echo "Using standalone Python from: $PYTHON_PREFIX"

DIFFUSERS_VERSION="0.36.0"
DIFFUSERS_VERSION="0.38.0"
TORCH_VERSION="2.9.1"
TRANSFORMERS_VERSION="4.57.5"
ACCELERATE_VERSION="1.3.0"
SAFETENSORS_VERSION="0.5.2"
SAFETENSORS_VERSION="0.8.0"
HUGGINGFACE_HUB_VERSION="0.34.0"
BITSANDBYTES_VERSION="0.49.1"
FASTAPI_VERSION="0.115.12"
Expand Down