unsloth/studio/frontend/src/components
Daniel Han-Chen b2b660f76f Studio: add local diffusion image generation page
Backend
- core/inference/diffusion.py: DiffusionBackend singleton that loads
  diffusion GGUFs from Hugging Face via diffusers.GGUFQuantizationConfig
  and runs them on the active CUDA / MPS / CPU device. Supports FLUX.2,
  FLUX.2 klein, FLUX.1, Qwen-Image, Stable Diffusion 3, and SDXL.
- routes/inference.py: POST /api/inference/images/load,
  POST /api/inference/images/generate, POST /api/inference/images/unload,
  GET /api/inference/images/status mirroring the llama-server lifecycle.
- models/inference.py: DiffusionLoadRequest, DiffusionGenerateRequest,
  DiffusionGenerateResponse pydantic schemas with prompt / step / size
  validation up front so callers get clear 422s rather than VAE crashes.
- requirements/no-torch-runtime.txt: pin gguf alongside the existing
  diffusers entry so GGUFQuantizationConfig works out of the box.
- tests/test_diffusion_backend.py + tests/test_diffusion_routes.py:
  27 unit tests covering family detection, validation, lifecycle, and
  the full FastAPI round trip with the backend stubbed. No torch /
  diffusers / GPU required to run.

Frontend
- features/images/: standalone images-page.tsx with curated model picker
  (FLUX.2 klein 4B / 9B, FLUX.2 dev, FLUX.1 dev), HF token field,
  prompt + negative prompt, resolution presets, steps + guidance
  sliders, seed input, and a result gallery that renders base64 PNGs
  inline.
- app/routes/images.tsx: lazy /images route wired into router.tsx.
- components/app-sidebar.tsx: PaintBrush02Icon nav item between
  Recipes and Export, hidden in chat-only mode.
2026-05-24 14:26:07 +00:00
..
assistant-ui Truncate long code execution tool output (#5708) 2026-05-22 07:45:58 -07:00
layout Update license headers 2026-03-12 17:23:10 +00:00
markdown Update license headers 2026-03-12 17:23:10 +00:00
tauri Harden Tauri release flow (#5341) 2026-05-12 20:30:20 -07:00
ui studio/frontend: fix onboarding CSP violations (#5658) 2026-05-22 05:02:19 -07:00
web Add Studio web update banner and release version display (#5308) 2026-05-11 18:24:01 +04:00
app-sidebar.tsx Studio: add local diffusion image generation page 2026-05-24 14:26:07 +00:00
example.tsx Update license headers 2026-03-12 17:23:10 +00:00
navbar.tsx Studio: Improve chat composition, fix scroll behaviour, and refine sidebar UX (#5089) 2026-04-21 02:20:45 +04:00
section-card.tsx Update license headers 2026-03-12 17:23:10 +00:00
shutdown-dialog.tsx feat(studio): replace navbar with collapsible sidebar (#4936) 2026-04-16 08:46:16 -07:00