--- title: Agate Preview 002 4-step Live emoji: ⌨️ colorFrom: red colorTo: gray sdk: gradio sdk_version: 6.22.0 python_version: "3.12" app_file: app.py pinned: false license: mit short_description: A new image on every keystroke, 4-step Agate on GPU models: - ML-Intern-lab/agate-preview-002-4step - Logolabs/agate-preview-002 - Falconsai/nsfw_image_detection --- # Agate 4-step, live Type a prompt and the image redraws as you type. The model is [ML-Intern-lab/agate-preview-002-4step](https://huggingface.co/ML-Intern-lab/agate-preview-002-4step), an **unofficial** 4-step, guidance-free distillation of LogoLabs' [Agate Preview 002](https://huggingface.co/Logolabs/agate-preview-002): 4 network passes per 256 px image instead of 100. ## Runs on any hardware The app picks its serving mode and precision from the hardware at startup; switch hardware in the Space settings, no code changes needed. | hardware | precision | how keystrokes are served | |---|---|---| | ZeroGPU | bf16 | the first keystroke opens one GPU session that stays open while you type; it streams a new image for each prompt change and closes after 6 s without typing (each ZeroGPU call costs ~1.2 s of CUDA warm-up, so one call per keystroke would be slow) | | T4 | fp16 (Turing has no bf16) | one request per keystroke, model warm, each step replayed from a CUDA graph | | L4, A10G, L40S, A100, H100, ... | bf16 | same as T4 | | CPU | fp32 | same, slowly | Measured: ZeroGPU about 170-200 ms per image inside a live session (plus ~2 s to open one); T4 about 190 ms per image, about 0.5 s per keystroke end to end from a test client with a ~285 ms network round trip to the Space. Other details: `trigger_mode="always_last"` drops keystrokes typed during a render except the newest; images are sent inline as WebP so the browser needs no second request; every image carries Agate's invisible watermark (`AGATE002`); an NSFW classifier (`Falconsai/nsfw_image_detection`) blurs flagged outputs. In-browser version: [ML-Intern-lab/agate-preview-002-4step-webgpu](https://huggingface.co/spaces/ML-Intern-lab/agate-preview-002-4step-webgpu). Not affiliated with LogoLabs. Licence: MIT.