CoolFace
Apppublic

hugging-apps/oui-1-generative-ui

sourceHugging Faceapache-2.0updated 6d agoView on Hugging Face
0likes
App README

OUI-1 — a diffusion model that writes interfaces

**thesysdev/OUI-1** is a LoRA-merged finetune of google/diffusiongemma-26B-A4B-it (26B total, 4B active) that writes UI screens in openui-lang — a line-oriented declarative language where each line is identifier = Component(args...) and root is the entry point. It scores 71.7% on the Generative UI Benchmark, 5.5× its base model.

Being a text-diffusion model, it denoises a 256-token canvas at a time instead of emitting tokens left to right. This Space streams that canvas as it settles (tokens appear once they have held the same value for a couple of denoising steps), then renders the finished program.

What this Space does

  1. 1.Builds the system prompt from the OpenUI React component library's signatures (openuiLibrary.prompt() from `@openuidev/react-ui` v0.16.1) — this is the model's "component library" contract.
  2. 2.Runs DiffusionGemmaForBlockDiffusion in bf16 on ZeroGPU (size="xlarge" — the bf16 weights are ~52 GiB, which does not fit the 48 GiB half-card) with the checkpoint's own entropy-bound sampler at 48 denoising steps per canvas.
  3. 3.Renders the result for real: the openui-lang program is handed to `@openuidev/react-lang`'s <Renderer> running in a sandboxed iframe, backed by the same openuiLibrary the prompt was generated from — so prompt and renderer can never drift apart.

static/openui-bundle.min.js and static/openui-styles.css are an esbuild IIFE bundle of @openuidev/react-lang + @openuidev/react-ui + React 19, built for this Space (both packages MIT, Thesys Inc.).

Notes

  • temperature and seed are not plumbed through this checkpoint's sampler, so two identical briefs can return differently worded screens.
  • max_new_tokens must stay above 256 or the screen is cut off after the first canvas. 48 and 32 denoising steps score the same on the benchmark; 16 breaks the output.
  • The model is not a general chat model — it only writes UI screens.

Credits

  • Model: thesysdev/OUI-1 (Apache-2.0), on top of google/diffusiongemma-26B-A4B-it (© Google DeepMind, Gemma 4 license).
  • Renderer / component library / system prompt: thesysdev/openui (MIT).
  • Example briefs: the first is the brief quoted in the OUI-1 model card; the rest are the OpenUI repo's own benchmark prompts (benchmarks/generate-samples.ts, MIT).
  • Streaming-canvas approach adapted from multimodalart/diffusiongemma.