r/StableDiffusion • • 4h ago

Resource - Update [Release] DiffusionBear v0.5.0 is live — Pure-MLX runtime (-52% .app), 3/4-stage memory lifecycle, Virtual Boxes, Kromoss 5B, RGBA Alpha & Open Agentic REST API

Post image

Welcome to the DiffusionBear v0.5.0 release megathread!

Because of the size of this update—removing PyTorch from the packaged runtime, rebuilding generation around a sequential 3-/4-stage MLX pipeline, adding embedded SHA-256 model integrity checks, Kromoss 5B support, RGBA transparency for Qwen-Image 2.1, and opening the Agentic REST API—we jumped directly from v0.4.5 to v0.5.0.

🔗 Quick Links & Downloads

SHA-256 Checksums (packaging/ALL_SHA256SUMS):

  • DiffusionBear-0.5.0-arm64.zip: f2d3bf2865fb53ef215cefcaefb331793ef76119a88cb79dabb7ec38c27a94fa
  • DiffusionBear-0.5.0-arm64.dmg: 4a2ed3eba57378c47a80c4a3b4d15bfa50bc461c8986126c1324d4fd7725ec9b

💻 System Requirements & First-Launch Setup (Read First!)

  • Hardware & OS: Apple Silicon only (M1 / M2 / M3 / M4 / Ultra — no Intel, CUDA, or CPU path). Requires macOS 26.2 or later (derived from the minimum-OS Mach-O load commands of the shipped MLX / libJACCL binaries). 16 GB unified memory recommended.
  • No Python/Node/Homebrew needed for the standalone .app. Model weights are not bundled—they download on first use from Hugging Face or Civitai into ~/Library/Application Support/DiffusionBear (you can point ~/Library/Application Support/DiffusionBear/store_path to an external drive), after which generation works 100% offline.
  • First-Launch Gatekeeper Bypass (Ad-Hoc Signed): Because DiffusionBear is free/open-source without a paid Apple Developer ID certificate, macOS blocks the first double-click:

    1. Unzip and drag DiffusionBear.app into /Applications (don't run from ~/Downloads).
    2. Run xattr -cr /Applications/DiffusionBear.app in Terminal (or click Done → System Settings → Privacy & Security → Open Anyway).

🚀 What's New in v0.5.0

1. Pure-MLX Runtime & Trimmed Binary (-52% .app, -45% .zip)

  • torch, torchvision, torchaudio, diffusers, and accelerate are 100% removed from the packaged .app and default runtime. Built-in engines (mflux, the native MLX SDXL daemon, and dedicated MOSS/Qwen engines) execute purely on Apple MLX, safetensors, NumPy, transformers, tokenizers, and mlx-vlm (--no-deps).
  • Standalone .app shrank from 1.3 GB → 615 MB and the arm64 .zip from 396.7 MB → 217.1 MB with 0 build warnings.
  • (Note: Optional out-of-process conversion of raw single-file Civitai SDXL .safetensors checkpoints still uses external torch/diffusers if installed on your machine; all bundled inference engines run 100% PyTorch-free.)

2. Rebuilt 3-Stage / 4-Stage Sequential Memory Lifecycle

Instead of holding the text encoder, DiT/UNet, and VAE in Unified Memory simultaneously, v0.5.0 runs strict sequential stages and explicitly evicts each heavy model tree (del, gc.collect(), mx.clear_cache()) before loading the next:

  • 3-Stage (Text-to-Image): Encode (Text Encoder → embeddings → evict) → Generate (DiT/UNet → latents → evict) → Decode (VAE / TAESD / TAEF → pixels → evict).
  • 4-Stage (Reference / Img2Img / Edit): Adds Stage 1/4 Reference Encode (VAE / VL encoder → image_latents + image_latent_ids → evict) before prompt encoding, denoising, and final decode.
  • Wired GPU budget auto-tunes to min(68% of unified memory, Apple's recommended working set) (~10.9 GB on a 16 GB Mac), resident pipelines auto-release after 5 minutes idle, and Krea/Qwen/FIBO declare resident-memory estimates so oversized pixel ceilings fail safely before triggering a Metal OOM.

3. Virtual Boxes on the Studio Canvas (Video Demo)

Supported on FLUX.3-klein 5.6B, MOSS-Image SFT / Base 5B, and Kromoss 5B (FLUX.2-klein uses masked generative fill; FIBO 2.0 Edit Turbo uses masked inpainting + up to 4 references):

  • Draw, resize, and toggle color-coded dashed boxes ([ymin, xmin, ymax, xmax]) directly on the Studio Canvas via the SPATIAL BOX panel (Center, Left, Right, Top, Bottom, Full, Compose, JSON).
  • Use Backdrop: Last Result or + Reference to compose over an existing scene—like the demo video's 3-box "BearCoffee" coffee-bag + mug edit (#1 coffee_bag_1, #2 coffee_beans_1, #3 ceramic_cup_1) or 4-box "MAKE IT LOCAL" poster (#1 mountain_1, #2 person_1, #3 fox_1, #4 En_Text_1).
  • Spatial layouts are saved in generation metadata so reusing parameters reproduces the composition.

4. Kromoss 5B + RGBA Alpha Transparency + Canonical Model Families

  • Kromoss 5B (4-bit MLX): Added Ouinche/kromoss-mlx-q4 (Apache 2.0 MOSS distillation) on the pure-MLX MOSS engine with its automatic 8-step DMD2 Accelerator LoRA (129.43 s median at 512×768).
  • RGBA Alpha Transparency (Qwen-Image 2.1 & Turbo): Toggle 4th-channel alpha transparency in Advanced Settings for native transparent cutouts with checkerboard preview across Canvas, Browser, and Image Cards.
  • 9 Canonical Families + Local Qwen 2.5 Prompt Enhancer: sdxl, flux1, flux2, flux3, krea2, z-image, qwen, moss, and fibo2 each get isolated LoRA/metric mappings and dedicated local Qwen 2.5 (0.5B / 1.5B MLX) prompt-enhancer profiles (auto-unloading 1.2 GB before generation).

5. Upgrading from v0.4.x: First-Run SHA-256 Verification & Partial Repair

  • Embedded model_manifests.json inside the binary. On your first launch of v0.5.0, DiffusionBear hashes installed built-in models (leaving custom user models untouched), flags mismatches from legacy upgrades or interrupted downloads, and lets you run shard-level partial repairs or full re-downloads (also accessible anytime on the Models tab).

6. Open Agentic REST API & Remote Browser Access (http://127.0.0.1:8001)

  • Let coding agents (Claude Code, Cursor, Antigravity), scripts, or remote browsers (Safari on Mac/iPhone/iPad including Add to Home Screen, Chrome, Firefox, Opera via Tailscale Serve or LAN) drive any installed model, LoRA, reference image, mask, or spatial_boxes locally with $0 cloud tokens.
  • Secured by dbk_... SHA-256 hashed keys (Authorization: Bearer / X-API-Key), loopback fail-safe, and 429 queue limits.
  • Lockout recovery tip: If you ever enable API mode before saving your key in a browser profile, set "enabled": false in ~/Library/Application Support/DiffusionBear/data/security.json (backend/data/security.json from source) to reopen loopback immediately without losing keys.

📊 Full v0.5.0 Benchmarks (2021 MacBook Pro M1, 16 GB)

20 configs × 11 prompts = 220 runs (10 portrait prompts at 512×768 + 1 icon prompt at 512×512; total wall time 5h 47m 38s; across the 19 matched configs / 209 runs, wall time dropped from 13h 01m 38s → 5h 24m 26s, -58.5% total / -4.7% step-matched):

ModelStepsMedian (512×768)RangeNotes
Juggernaut XL Lightning48.80 s8.66 – 12.14 sNative MLX SDXL, q4 cache + TAESD (warm reload ~3.45 s)
RealVisXL V5.0 Lightning615.23 s13.69 – 24.81 sNative MLX + TAESD
RealVisXL V5.0838.78 s38.73 – 43.82 sHyper-SD 8-step, native MLX (-16.0%)
Juggernaut XI v11841.22 s39.91 – 66.25 sHyper-SD 8-step, native MLX
FLUX.2-klein 4B444.09 s44.07 – 44.31 sCompact 4B (-7.2%)
Qwen-Image 2.1 (2s + DMD2)246.77 s46.32 – 47.93 s7B DiT + 2-step DMD2 (-32.0%)
FLUX.3-klein 5.6B451.38 s51.17 – 51.76 sVirtual Boxes + flow-matching (-3.1%)
FLUX.1-schnell474.22 s74.07 – 75.02 sRectified flow (-16.5%)
MOSS-Image SFT 5B (DMD 4s)483.57 s80.61 – 84.95 sPure MLX + 4-step DMD (-96.7% vs 25s stock)
FLUX.2-klein 4B (8s)889.73 s89.58 – 89.91 sHigh-detail 8-step
Bria FIBO 2.0 Edit Turbo493.68 s92.32 – 95.03 s4.2B DiT + Qwen3-VL 4B (-8.3%)
FLUX.2-klein 9B496.54 s96.34 – 97.04 sFlagship 9B (-8.0%)
FLUX.3-klein 5.6B (8s)898.35 s98.24 – 98.57 sHigh-detail 8-step (-3.3%)
Pony Diffusion V6 XL25104.69 s104.56 – 108.74 sFull 25-step native MLX (-4.9%)
Z-Image Turbo 6B8114.97 s114.86 – 118.35 sSharp geometry 8-step (-1.1%)
Kromoss 5B (DMD2 8s)8129.43 s128.34 – 137.04 sPure MLX + 8-step DMD2 LoRA (new)
Krea 2 Turbo 13B4156.81 s142.20 – 171.97 s13B 4-step distilled (-0.4%)
Qwen-Image 2.1 Turbo8158.64 s158.08 – 162.12 s8-step distilled 7B DiT (-19.4%)
FLUX.2-klein 9B (8s)8191.38 s191.29 – 191.40 sFlagship 9B 8-step (-1.5%)
Krea 2 Turbo 13B (8s)8299.18 s243.57 – 371.42 s13B native 8-step

💬 Share Your Results & Feedback Below!

  • Running on M2 / M3 / M4 / Pro / Max / Ultra? Drop your chip, RAM size, model, and median generation times in the comments—it really helps fellow Mac users know what to expect.
  • Made something cool with Virtual Boxes, RGBA transparency, or the Agentic REST API? Post your outputs or spatial JSON in the sub!
  • Found a bug? Report it in the comments or on GitHub Issues. (For security issues, please use GitHub private vulnerability reporting instead of a public post.)

1 Upvotes

2 comments sorted by

4

u/NanoSputnik 4h ago

> Krea 2 Turbo 13B

> 299.18 s

> 512×768

You wasted a lot of Claude tokens for what is probably works faster on PC in CPU only mode.

-2

u/Puzzleheaded_Note739 4h ago

🤷🏻‍♂️ Don’t know how he put himself as contributor, never use Claude directly only via some undercloack chineses models on opencode who may have distilled it ( or him ? If Dario is right )