--- title: PixelMoE emoji: 🧩 colorFrom: green colorTo: red sdk: gradio sdk_version: 6.31.0 app_file: app.py short_description: Class-conditional 512x512 pixel-space MoE diffusion python_version: "3.12" startup_duration_timeout: 30m --- # PixelMoE Interactive demo for **PixelMoE: Scaling Pixel-Space Diffusion with LLM-Style Mixture-of-Experts** ([arXiv 2610.18857](https://arxiv.org/abs/2610.18857)). Pick any of the 1000 ImageNet-1K classes and the Space samples a 512×512 image with the released **PixelMoE-B-E32A4/16** base model from [KlingTeam/PixelMoE](https://huggingface.co/KlingTeam/PixelMoE), using the authors' official sampling settings (Heun solver, 25 steps per hierarchical stage, CFG 3.7 applied while t < 0.8, second-EMA weights). PixelMoE runs diffusion entirely in pixel space: every image token activates 4 of 32 routed experts plus a shared expert in each MoE block, and images are generated by a two-stage hierarchical flow — coarse structure first, then details at the target resolution. ## Advanced settings - **Steps per stage** — denoising steps per hierarchical stage (25 in the official `scripts/sample.sh`; each Heun step is two model evaluations). - **CFG scale / CFG interval max** — classifier-free guidance and the global timestep below which it is active. - **Sigma min** — lower bound clamped into the velocity denominator. The model code is vendored from the MIT-licensed official repository [KlingAIResearch/PixelMoE](https://github.com/KlingAIResearch/PixelMoE) (`torch.compile` decorators and the deterministic-scatter toggle are adapted for the ZeroGPU runtime, otherwise inference is unchanged).