Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b2b660f
Studio: add local diffusion image generation page
danielhanchen May 24, 2026
a08686c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 24, 2026
f8504e3
Studio: fix Images page SectionCard required icon prop
danielhanchen May 24, 2026
bf5c4ac
Fix/adjust diffusion review findings for PR #5754
danielhanchen May 24, 2026
669964f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 24, 2026
d6f2a23
Fix/adjust diffusion lifecycle + UI for PR #5754
danielhanchen May 24, 2026
faa6822
Fix/adjust diffusion symmetric chat handoff for PR #5754
danielhanchen May 24, 2026
8074a2b
Fix/adjust diffusion: smart base, safetensors, peak VRAM, GGUF guard
danielhanchen May 25, 2026
8c10cf5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
6089720
Fix/adjust diffusion: export unload + sd3.5 alias for PR #5754
danielhanchen May 25, 2026
1601b78
Fix safetensors chat backend unload for PR #5754
danielhanchen May 25, 2026
0f9b19b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
65f7a26
Fix/adjust diffusion lifecycle for round 3 findings (PR #5754)
danielhanchen May 25, 2026
fbf06be
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
f44b55c
Fix/adjust diffusion: clear stale metadata on failed swap for PR #5754
danielhanchen May 25, 2026
18b50c1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
0f3ed08
Fix/adjust diffusion: token leak + cache guard + locked status + seed…
danielhanchen May 25, 2026
ec507c5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
fb0a31b
Fix/adjust diffusion: forward true_cfg_scale on Qwen/Flux for negativ…
danielhanchen May 25, 2026
f3f3f06
Fix/adjust diffusion: pin requests chain in no-deps runtime for PR #5754
danielhanchen May 25, 2026
f06895b
Fix/adjust diffusion: round 5 lifecycle + validation hardening for PR…
danielhanchen May 25, 2026
8858104
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
04de106
Fix/adjust diffusion: round 6 race-free lifecycle + delete guards for…
danielhanchen May 25, 2026
0fd9e90
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
fa8efaf
Fix/adjust diffusion: round 7 swap-aware guards + race-free generate …
danielhanchen May 25, 2026
92eccc3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
c1f9aac
Fix/adjust diffusion: round 8 async unloads + tighter handoffs for PR…
danielhanchen May 25, 2026
0ae2055
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
1193c81
Fix/adjust diffusion: round 9 shared release helpers + export-active …
danielhanchen May 25, 2026
b34fc62
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
641cdcc
Fix/adjust diffusion: round 10 fix export-active asymmetry + GGUF cha…
danielhanchen May 25, 2026
1698b66
Fix/adjust diffusion: tolerate ExportBackend without is_export_active…
danielhanchen May 25, 2026
4b1b149
Fix/adjust diffusion: round 11 export-active defense-in-depth + state…
danielhanchen May 25, 2026
921c602
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
8b8980a
Fix/adjust diffusion: round 12 local-path GGUF + per-variant delete +…
danielhanchen May 25, 2026
d8b785a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
ae41bfd
Fix/adjust diffusion: round 13 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
ff98c6d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
54adfdf
Fix _resolve_local_gguf_child traversal check for Windows for PR #5754
danielhanchen May 25, 2026
f501ab8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
e03ed3d
Fix/adjust diffusion: round 14 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
a9b3d1a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
59aa75b
Fix/adjust diffusion: round 15 P1+P2+P3 batch for PR #5754
danielhanchen May 25, 2026
2f9bb69
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
05184ad
Fix llama_cpp source-inspection tests for split load_model for PR #5754
danielhanchen May 25, 2026
7c8f1eb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
2ef9b0e
Fix/adjust diffusion: round 16 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
e948a96
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
6ac6757
Fix Windows test failures from round 16 changes for PR #5754
danielhanchen May 25, 2026
b841562
ci: restore diffusion-backend Ubuntu/macOS/Windows workflows for staging
danielhanchen May 25, 2026
c79a656
Fix/adjust diffusion: round 17 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
5d9f697
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2026
56a9386
Fix/adjust diffusion: round 18 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
347be3a
Fix/adjust diffusion: round 19 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
e6436e8
Fix/adjust diffusion: round 20 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
0411c9a
Fix/adjust diffusion: round 21 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
da65106
Fix/adjust diffusion: round 22 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
bf04dc6
Fix/adjust diffusion: round 23 P1+P2 batch for PR #5754
danielhanchen May 25, 2026
7b0eacc
Fix/adjust diffusion: round 24 P1 batch for PR #5754
danielhanchen May 25, 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
45 changes: 45 additions & 0 deletions .github/workflows/diffusion-backend-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Staging-only CI: diffusion backend tests on macOS 14 (Apple Silicon).
# Confirms the Pillow / Pydantic / FastAPI import surface works the
# same on darwin-arm64 as on Linux. No GPU; we stub diffusers.

name: Diffusion backend (macOS)

on:
push:
branches: [studio-diffusion-images-staging]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pytest:
runs-on: macos-14
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
- name: Install minimal backend test deps
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio httpx fastapi pydantic structlog \
pillow loguru python-multipart aiofiles sqlalchemy \
cryptography pyyaml jinja2 'numpy<3' requests
pip install -r studio/backend/requirements/studio.txt
# PyTorch wheels for macOS-arm64 come from the default PyPI
# index; CPU/MPS is fine since the tests stub the pipeline.
pip install 'torch>=2.4,<2.11'
- name: Run diffusion backend + route tests
working-directory: studio/backend
run: |
python -m pytest tests/test_diffusion_backend.py tests/test_diffusion_routes.py -v --tb=short
51 changes: 51 additions & 0 deletions .github/workflows/diffusion-backend-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Staging-only CI for the Studio diffusion image generation feature.
# Runs the backend unit tests on Ubuntu (CPU). Imports are exercised
# without the heavy diffusers / torch import; the test suite stubs
# diffusers via sys.modules so this stays under two minutes.

name: Diffusion backend (Ubuntu)

on:
push:
branches: [studio-diffusion-images-staging]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pytest:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python }}'
cache: 'pip'
- name: Install minimal backend test deps
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio httpx fastapi pydantic structlog \
pillow loguru python-multipart aiofiles sqlalchemy \
cryptography pyyaml jinja2 'numpy<3' requests
pip install -r studio/backend/requirements/studio.txt
# diffusion.py imports torch lazily inside load_model and
# generate_image; CPU build is enough to satisfy the import
# since the tests stub the actual pipeline class.
pip install --index-url https://download.pytorch.org/whl/cpu 'torch>=2.4,<2.11'
- name: Run diffusion backend + route tests
working-directory: studio/backend
run: |
python -m pytest tests/test_diffusion_backend.py tests/test_diffusion_routes.py -v --tb=short
47 changes: 47 additions & 0 deletions .github/workflows/diffusion-backend-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Staging-only CI: diffusion backend tests on Windows latest.
# Mirrors Linux/macOS jobs; runs on a single Python interpreter to
# stay under the 5-concurrent-Windows-runner cap.

name: Diffusion backend (Windows)

on:
push:
branches: [studio-diffusion-images-staging]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pytest:
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
- name: Install minimal backend test deps
shell: pwsh
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio httpx fastapi pydantic structlog `
pillow loguru python-multipart aiofiles sqlalchemy `
cryptography pyyaml jinja2 'numpy<3' requests
pip install -r studio/backend/requirements/studio.txt
# CPU torch on Windows: diffusion.py imports torch lazily and
# the tests stub the pipeline; the CPU wheel is enough.
pip install --index-url https://download.pytorch.org/whl/cpu 'torch>=2.4,<2.11'
- name: Run diffusion backend + route tests
working-directory: studio/backend
shell: pwsh
run: |
python -m pytest tests/test_diffusion_backend.py tests/test_diffusion_routes.py -v --tb=short
15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,20 @@ huggingfacenotorch = [
"peft>=0.18.0,!=0.11.0",
"huggingface_hub>=0.34.0",
"hf_transfer",
"diffusers",
# Studio Images page depends on Flux2KleinPipeline /
# Flux2Pipeline, both shipped in diffusers>=0.37.0. Floor was
# missing here so a `pip install unsloth[huggingfacenotorch]`
# could resolve to 0.36.0 and fail at runtime when the default
# curated FLUX.2 klein model loads.
"diffusers>=0.37.0",
# diffusers.GGUFQuantizationConfig + from_single_file rely on
# the standalone gguf package at runtime. Floor at 0.10.0 to
# match the diffusers requirement; older gguf releases raise
# at load time. Studio Images default curated picker is
# GGUF-only so this must install with the public
# huggingfacenotorch extra; missing / under-pinned it makes
# /api/inference/images/load 500.
"gguf>=0.10.0",
"transformers>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.0,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.5.0",
"trl>=0.18.2,!=0.19.0,<=0.24.0",
"sentence-transformers",
Expand Down
Loading
Loading