← all repositories
vivo/BluePixel

4K image editing in 4 steps, by swapping the VAE

vivo open-sources BluePixel, a FLUX.2 Klein-based editor that edits natively at 4096×4096 by compressing latents 64× so 4K costs the same tokens as 1K.

★589 stars Python Image · Video · Audio
Collecting fresh signals — velocity needs a few days of history.
star history

What it does BluePixel is an instruction-based image editor: you give it a photo and a prompt like “change the gray sweater to burgundy red,” and it returns an edited image at up to native 4096×4096 — no cascaded super-resolution stage. It’s built on FLUX.2 Klein (a 9B DiT with Qwen3 as text encoder) and ships as a 4-step distilled checkpoint, BluePixel-Turbo, distilled from a 50-step teacher. The repo is inference code only; training is described but not included.

The interesting bit The trick that makes 4K tractable is the VAE swap: replacing Klein’s f=8 VAE with DCAE-F64 (f=64, 1×1 patchify) shrinks the 4K latent from ~65,536 tokens to ~4,096 — the same token count as 1K editing. The DiT never sees a bigger problem. Distillation uses source-anchored target projection (SATP), which anchors non-edited regions to the source latent so backgrounds stay put across just 4 steps.

Key highlights

  • Native 4096×4096 output; non-square images keep roughly their aspect ratio within a requested pixel budget (target_pixels).
  • 4-step inference, ~8.7 seconds per 4K edit on a Kunlunxin P800 XPU, ~4× faster than the 50-step teacher.
  • 4K adaptation took ~200K samples on 32 Kunlunxin XPUs in about 4 days, via progressive compression migration (f=8 → 32 → 64).
  • Continual learning via ACE-LoRA + OPD absorbs long-tail editing skills without catastrophic forgetting; RL alignment uses PickScore and a custom BluePixReward.
  • Batch runner (vins_infer.py) has resume-by-default, file-lock multi-process support, and dry-run/check modes — clearly built for real evaluation runs.

Caveats

  • The evaluation table in the README is empty — no benchmark scores are actually published, so quality claims rest on the demo and paper.
  • Requires CUDA with BF16, targets the Diffusers 0.36 API, and the README itself notes GPU inference must be validated in your deployment environment.
  • Training code isn’t released; this is inference-only, and the disclaimer asks for security review before product use.

Verdict Worth a look if you edit high-resolution images and want 4K output without a super-resolution pipeline — the token-count trick is genuinely elegant. Skip it if you need training code or published benchmark numbers to justify a pick.

Frequently asked

What is vivo/BluePixel?
vivo open-sources BluePixel, a FLUX.2 Klein-based editor that edits natively at 4096×4096 by compressing latents 64× so 4K costs the same tokens as 1K.
Is BluePixel open source?
Yes — vivo/BluePixel is open source, released under the Apache-2.0 license.
What language is BluePixel written in?
vivo/BluePixel is primarily written in Python.
How popular is BluePixel?
vivo/BluePixel has 589 stars on GitHub.
Where can I find BluePixel?
vivo/BluePixel is on GitHub at https://github.com/vivo/BluePixel.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.