--- license: apache-2.0 base_model: Qwen/Qwen3.5-4B base_model_relation: adapter pipeline_tag: text-to-image language: - en tags: - jeveration - mlx - apple-silicon - one-pass - text-to-image - derivative ---  # Jeveration-MLX — MLX port of Jeveration for Apple Silicon > **Derivative work.** This repository is an unofficial **MLX derivative** of > [linlinlinlinsdada/Jeveration](https://huggingface.co/linlinlinlinsdada/Jeveration) (Apache-2.0): the same > rank-256 LoRA, decision heads and TA-TiTok decoder, re-implemented for MLX (`jev_mlx.py`, MIT) on the frozen > [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) backbone (Apache-2.0). Under Apache-2.0 the derivative > keeps the same licence; see "Licenses" below. This repo hosts the **MLX port** of [Jeveration](https://github.com/Carol-lyh/Jeveration) (arXiv [2611.24738](https://arxiv.org/abs/2611.24738), Apache-2.0): a frozen **Qwen3.5-4B** vision-language backbone with a rank-256 LoRA, 128 joint decision tokens, an adaLN image head, and the **TA-TiTok BL128** 512-px decoder + **CLIP ViT-L/14-336** text tower. One forward pass of the backbone produces the whole 512×512 image — no denoising loop. It runs with `mlx` + `mlx-vlm` only (no PyTorch), via the included `jev_mlx.py`, and is wired into [DiffusionBear](https://github.com/OuincheWinch/DiffusionBear) as the `jeveration` model (engine `jev`, one-shot subprocess, backbone q4 by default on 16 GB). ## Files | File | Size | What | |---|---|---| | `jev_mlx.py` | — | self-contained MLX port (backbone via mlx_vlm, LoRA merged, heads, decoder, CLIP) | | `weights/lora.safetensors` | 1.95 GB | the 200 rank-256 LoRA adapters (fp32, merged in fp32 at load) | | `weights/heads.safetensors` | 0.99 GB | decision-token inputs, adaLN image head, code heads (bf16) | | `weights/decoder512.safetensors` | 0.61 GB | TA-TiTok 512-px plain decoder, minus the source-decoder `cond_*` (bf16) | | `weights/codebook.safetensors` | 2 MB | TA-TiTok `quantize.embedding.weight` [8192, 64] | | `weights/clip_text.safetensors` | 0.25 GB | CLIP ViT-L/14-336 **text tower only** (bf16) | | `weights/lat_stats.json` | — | latent mean/std of the codebook | | `clip/` | 1.4 MB | CLIP BPE tokenizer files | The backbone is **not** duplicated here: it is `Qwen/Qwen3.5-4B` at the pinned revision `851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a` (Apache-2.0), downloaded on first use (`resolve_backbone()` in `jev_mlx.py`). On a 16 GB Mac the backbone is quantized to q4 in-process after the LoRA merge (`quantize=4`, ~7–10 s per image measured on M1). ## Usage ```bash pip install mlx mlx-vlm transformers safetensors pillow numpy hf download Ouinche/Jeveration-MLX --local-dir jeveration-mlx DIFFUSIONBEAR_JEVERATION_DIR=jeveration-mlx python jeveration-mlx/jev_mlx.py 4 \ "A lone pine tree on a small island in a calm lake at dawn." out.png ``` Args: `[quantize bits (4|8|none)] [prompt] [out.png]`. ## Examples (Apple M1, 16 GB unified memory, this repo) Rendered with the full **FP16 world** (Qwen3.5-4B backbone + LoRA merged + heads + decoder + CLIP all in `float16`; per-shard cast at load): | Prompt | Image (512×512, one pass) | |---|---| | "A lone pine tree on a small grassy island in a calm lake at dawn…" |  | | "A small stone castle on a green hill under a bright blue sky…" |  | Timings on M1 16 GB (see `examples/timings_fp16.json`): **load 76 s**, then **60–81 s per 512×512 image** in the FP16 world. For comparison, the shipped in-app default quantizes the backbone to **q4**: ~7–10 s per image. ## Examples from DiffusionBear v0.5.3 (Apple M4 Pro VM, 16 GB) Real outputs from DiffusionBear v0.5.3 (`backend/jev_engine.py`, commit `c47a419`), not cherry-picked across seeds: one run per prompt, seed 42. Settings: native 512×512, 1 forward pass (no denoising steps, no CFG, no negative prompt), Qwen3.5-4B backbone q4 (DiffusionBear default), weights `Ouinche/Jeveration-MLX@dc00cbaa` + `Qwen/Qwen3.5-4B@851bf6e8`. Machine: Apple M4 Pro (Virtual), 16 GB unified memory, macOS VM. Times are single runs, not benchmark medians. The time is the generation only; DiffusionBear reloads the model for every image (shown as "+ load"). Peak = the engine process's max memory footprint, reached while loading.
![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() |