Let players make something personal. Runtime Image Forge runs an image diffusion model inside your Windows game. The player picks options you define (an item, a material, an ornament), the package turns those choices into a prompt you control, and a new picture is generated on the player's own graphics card. No server, no API key and no per-image fee.A complete game is included. The package comes with The Ember Forge, a finished crafting game in the package's Samples folder that you can edit freely: choose a sword, shield, ring or amulet, forge it, keep it in a paged collection and export it as PNG. Its scene, gameplay source, workshop art, model profiles and choice styles are all in the sample.Try it in three stepsChoose Tools > Runtime Image Forge > Open The Ember Forge sample. It installs the Windows backend and opens the scene.Enter Play Mode and press DOWNLOAD MODEL. FLUX.2 Klein 4B (5.21 GB) downloads once from Hugging Face and every file is verified by SHA-256.Choose an item, a material and a detail, then FORGE MY ITEM.How it works in your gameChoice styles. A choice style asset (ForgeStyleAsset) holds your catalog and prompt template. Players select catalog keys; unknown keys and unresolved fields are rejected, so the prompt stays within the choices you defined.Local generation. A Windows x64 Vulkan native backend (stable-diffusion.cpp) runs inside the Editor or Player process. Libraries are verified against pinned SHA-256 checksums before loading.Transparent or full pictures. An optional U²-Netp foreground model, downloaded with its license by one Editor command, removes the background for icons; portraits and scenes keep it.Recipes and caching. Every request records model revision, style, prompt, size, steps, guidance and seed. Results are cached as PNG by recipe and can be exported with their recipe JSON.Bounded jobs. A queue serializes work, supports cancellation and reports progress, so the UI stays responsive.ModelsModel weights are not part of the package. They are downloaded only when the developer or player chooses to:FLUX.2 Klein 4B (Apache-2.0): one-click HTTPS download of three pinned files from Hugging Face (5.21 GB), or local import of the same files.Your own model files: a profile can pin other compatible model files (checkpoints with CLIP text encoders, or Qwen text encoders in GGUF format) for download or local import.Every file is verified by size and SHA-256. After that, generation works offline.Measured on the tested machineWindows 11, NVIDIA RTX 3060 Laptop GPU (6 GB VRAM), 32 GB RAM, FLUX.2 Klein 4B, 1024 × 1024, 4 steps: about 17 seconds per item including background removal, after the one-time download and a model load and warmup of about 1.5 minutes. Times depend on the GPU, drivers and other GPU work. This is a tested configuration, not a minimum.IncludedThe Ember Forge, a complete sample game: scene, gameplay source, workshop art, the FLUX.2 Klein 4B and U²-Netp profiles and five editable choice styles (items, pixel-inspired items, flat icons, portraits, environment cards).Editor windows and Inspectors with their own icons, in English, Russian, Spanish and Simplified Chinese. The Overview window opens after import with a three-step start guide.Optional Editor MCP tools for AI coding assistants (Editor only, not in builds).Commented C# source and guides: quick start, models and styles, API, export, MCP and troubleshooting, in four languages. Website: https://merrymaker14.github.io/runtime-image-forge/Is this for your game?Good fit: Windows PC games where players create or customize items, icons, portraits or cards, and where a short wait is part of the moment.Not built for: mobile, consoles, WebGL, macOS or Linux (the supplied backend is Windows x64 only; other platforms need your own backend); generating every frame; exact text, logos, exact geometry or pixel-perfect pixel art. Generated pictures can miss requested details, and cutouts can leave imperfect edges.RequirementsUnity 6000.5 or later; Unity Inference Engine 2.6.1 and Unity uGUI 2.5.0 are installed as package dependencies.Windows x64, a Vulkan-capable GPU, the Microsoft Visual C++ 2015–2022 Redistributable (x64).About 5.3 GB of disk space for the model cache, and internet access for the first download.Third-party licensesAsset uses stable-diffusion.cpp, ggml, cpp-httplib, nlohmann/json, miniz, zip and the OpenAI CLIP tokenizer vocabulary under the MIT License; utf8proc under the MIT License with the Unicode data license; stb under the MIT License or public domain; libwebp, libwebm and darts-clone under the BSD 3-Clause License; and Oniguruma under the BSD 2-Clause License; see Third-Party Notices.txt file in package for details. Model weights, including the optional U²-Netp cutout model, are not included and keep their own licenses.

