--- license: openrail++ tags: - text-to-image - stable-diffusion-xl - sdxl - realvisxl - lightning - gguf - stable-diffusion-cpp - tokforge base_model: - SG161222/RealVisXL_V4.0_Lightning pipeline_tag: text-to-image --- ## TokForge - **Website:** https://tokforge.ai - **Discord:** https://discord.gg/Acv3CBtfVm - **Google Play:** https://play.google.com/store/apps/details?id=dev.tokforge - **iOS TestFlight:** https://testflight.apple.com/join/jnufjzRr Runs on-device in the TokForge app. # TokForge — RealVisXL V4.0 Lightning GGUF (SDXL Quality) A single self-contained **GGUF** for [`stable-diffusion.cpp`](https://github.com/leejet/stable-diffusion.cpp), packaging **[RealVisXL V4.0 Lightning](https://huggingface.co/SG161222/RealVisXL_V4.0_Lightning)** (SDXL, photoreal, few-step Lightning). The **UNet is q8_0**, the **VAE is kept at f16**, both CLIP text encoders included — everything in one file. This is the **GPU "Quality" image tier** for the [TokForge](https://tokforge.ai) Android app: native **1024px photoreal** SDXL on **certified high-memory Qualcomm/Adreno** devices via the OpenCL F16-GEMM route. It is **not** a CPU default — SDXL is too heavy for phone CPU — it is the opt-in photoreal step-up above the DreamShaper fast route. ## Files | File | Size | Precision | Contents | |------|------|-----------|----------| | `realvisxl-v40-lightning-q8_0.gguf` | ~4.2 GB | q8_0 UNet / f16 VAE | CLIP-L + OpenCLIP-bigG + Lightning UNet + SDXL VAE | ## Recommended render settings (SDXL Lightning, few-step) ``` sampler: dpm++2m scheduler: discrete steps: 6 (4 = fast floor, 8 = extra refinement) cfg-scale: 1.5 resolution: 1024x1024 (SDXL native) backend: OpenCL on high-memory Adreno (GPU); SDXL CPU is not a supported tier ``` ### stable-diffusion.cpp CLI example ```bash sd -M img_gen \ -m realvisxl-v40-lightning-q8_0.gguf \ -p "close-up portrait, natural skin texture, 85mm, RAW photo, photorealistic" \ --sampling-method dpm++2m --steps 6 --cfg-scale 1.5 \ -W 1024 -H 1024 -o out.png ``` ## Provenance & how this was built 1. Loaded `SG161222/RealVisXL_V4.0_Lightning` (SDXL diffusers, fp16). Lightning is a baked few-step distilled checkpoint (no LoRA to fuse). 2. Exported to a single original-format SDXL `.safetensors`. 3. Converted to GGUF with `stable-diffusion.cpp` (`-M convert --type q8_0`, keeping the VAE at f16 via `--tensor-type-rules '^first_stage_model\.=f16'`). ## License & attribution - **License:** **openrail++** (inherited from RealVisXL V4.0 Lightning / SDXL). - **Base model:** RealVisXL V4.0 Lightning by **SG161222** — https://huggingface.co/SG161222/RealVisXL_V4.0_Lightning - Built on top of Stable Diffusion XL (Stability AI). The original openrail++ terms and attribution requirements propagate to this GGUF and any images generated with it.