File size: 12,949 Bytes
c1f3ecd
268f754
 
 
 
c1f3ecd
 
 
268f754
59f944a
c1f3ecd
 
268f754
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ccf6870
 
 
 
 
 
 
 
 
 
268f754
 
 
 
 
 
8617a20
268f754
 
 
 
 
 
 
 
 
 
 
 
ccf6870
268f754
c1f3ecd
 
268f754
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c1f3ecd
59f944a
268f754
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
---

license: gpl-3.0
language:
- en
- es
tags:
- ps4
- playstation-4
- homebrew
- garlic-diffusion
- stable-diffusion
- sdxl
- real-esrgan
- text-to-image
pipeline_tag: text-to-image
---


<p align="center">
  <img src="icon.png" width="180" alt="GarlicDiffusion: 3D shaded white garlic bulb on a radial deep-navy background">
</p>

<h1 align="center">GarlicDiffusion for PS4</h1>

<p align="center">
  <b>Native Stable Diffusion 1.5, SDXL &amp; Real-ESRGAN 1080p/4K on your PS4's GPU.</b><br>
  100% Offline Inference · 10 Curated Models · In-App HTTPS Downloader · Web Studio &amp; Discord Bot API.
</p>

<p align="center">
  <a href="https://huggingface.co/DJTomato/ps4-diffusion-models/resolve/main/Garlic-Diffusion-1.10.pkg"><img src="https://img.shields.io/badge/Download-6.69%20MB%20pkg-0070d1" alt="Download PS4 PKG"></a>
  <a href="https://djtomato.github.io/GarlicDiffusion/"><img src="https://img.shields.io/badge/Website-GitHub%20Pages-1f6feb" alt="Website"></a>
  <a href="https://github.com/DJTOMATO/GarlicDiffusion"><img src="https://img.shields.io/badge/Source-GPLv3-111111" alt="Source"></a>
  <a href="https://discord.gg/Gbyq3kpGjc"><img src="https://img.shields.io/badge/Discord-Join%20%26%20Request%20Models-5865F2" alt="Support Discord"></a>
  <a href="https://ko-fi.com/djtomato"><img src="https://img.shields.io/badge/Support-Ko--fi-FF5E5B" alt="Ko-fi"></a>
  <a href="https://garlicllm.dev"><img src="https://img.shields.io/badge/Inspired%20by-Garlic%20LLM-3ddc97" alt="Garlic LLM"></a>
</p>

<p align="center">
  <img src="hero.jpg" width="840" alt="GarlicDiffusion PS4 TV UI in the Garlic LLM deep-navy theme">
</p>

**GarlicDiffusion** is a PlayStation 4 and PS4 Pro homebrew application that runs **Stable Diffusion 1.5**, **Stable Diffusion XL (SDXL 1.0)**, and **Real-ESRGAN AnimeVideo v3 (`1080p Full HD` & `4K UHD`)** directly on the console's own AMD GCN GPU — with zero PC and zero cloud connection required while generating.

It is respectfully inspired by and builds upon **[Leonardo Alegría's Garlic LLM (`garlicllm.dev`)](https://github.com/leonardo-alegria/garlic-llm)**, sharing its bare-metal PS4 PM4 compute architecture, direct-memory ("Garlic") allocator, Selawik `PFN2` font renderer, and signature deep-navy visual style.

---

## Use It on Your PS4 TV — or From Any Browser

Control everything with a DualShock 4 directly on your TV, or open **`http://<PS4-IP>:8081`** from any PC, phone, or tablet on your Wi-Fi:

| PS4 TV Studio (DualShock 4 Dropdowns & Sliders) | Browser Web Studio (`http://<PS4-IP>:8081`) |
| :---: | :---: |
| ![GarlicDiffusion PS4 TV Studio UI](ps4_ui.jpg) | ![GarlicDiffusion Browser Web Studio UI](pc_ui.png) |

---

## Download the PS4 App (`v1.10`)

| | |
|---|---|
| **File** | [`Garlic-Diffusion-1.10.pkg`](https://huggingface.co/DJTomato/ps4-diffusion-models/resolve/main/Garlic-Diffusion-1.10.pkg) |
| **Size** | `7,012,352` bytes (`6.69 MB` — includes GCN kernels, CLIP tokenizer, Web Studio & Real-ESRGAN Anime v3 upscaler) |
| **SHA-256** | `fe5b657582bf96c446bb394706cb6925e3702b61b5f686c82d5922eb5c6e545c` |
| **Version** | `1.10` |
| **Title** | `GarlicDiffusion` |
| **Title ID** | `PSAI00003` (installs cleanly alongside Garlic LLM `PSAI00001`!) |

---

## Install in 3 Steps

A **PS4, PS4 Slim, or PS4 Pro** running **GoldHEN** (tested on firmware 9.00, 11.00, and all GoldHEN-supported firmwares). GarlicDiffusion is an ordinary userland homebrew package and contains no exploit.

1. Download [`Garlic-Diffusion-1.10.pkg`](https://huggingface.co/DJTomato/ps4-diffusion-models/resolve/main/Garlic-Diffusion-1.10.pkg) onto a USB drive (or push over GoldHEN FTP) and install it via **GoldHEN → Package Installer**.
2. Open **GarlicDiffusion** from the PS4 home screen.
3. Press **OPTIONS** on your DualShock 4 (or open `http://<PS4-IP>:8081` → **Models** tab from any phone/PC browser on your Wi-Fi) and click **Download to PS4** on any of the **10 pre-converted models** in this repository. The PS4 downloads them directly over HTTPS (`libSceHttp` + `libSceSsl`) to `/data/garlic-diffusion/models/`.

---

## All 10 Pre-Converted PS4 Models in This Repository

Every model folder in [`DJTomato/ps4-diffusion-models`](https://huggingface.co/DJTomato/ps4-diffusion-models/tree/main) is **100% standalone** (`unet.psd1`, `clip_l.psd1`, `clip_g.psd1` for SDXL, `vae.psd1`, and `preset.cfg`) quantized to custom `PSD1` (`Q8_0` weights + `FP16` scales) for bare-metal PS4 GCN execution:

| Model Folder | Arch | Size | Recommended Settings | PS4 Pro Time (`Quiet 20CU`) | Highlights |
| :--- | :---: | ---: | :--- | :---: | :--- |
| **`WAI_Illustrious_v17_dmd2`** ⭐ | `SDXL` | `3,716 MiB` | `6–8 steps · CFG 1.0 · LCM` | **`~17.7s`** (512) / **`~50.9s`** (16:9 1080p) / **`~67.6s`** (1080×1440) | **Flagship SDXL anime** (WAI v17 + DMD2 6-step fused) |

| **`waiNSFWIllustrious_v140_dmd2`** ⭐ | `SDXL` | `3,716 MiB` | `6–8 steps · CFG 1.0 · LCM` | **`~51.0s`** (16:9 1080p) / **`~67.6s`** (1080×1440) | Razor-sharp WAI v14 + DMD2 6-step SDXL |

| **`Animagine_XL_4_dmd2`** | `SDXL` | `3,716 MiB` | `6–8 steps · CFG 1.0 · LCM` | **`~50.8s`** (768×1024) / **`~67.6s`** (1080×1440) | Clean modern anime aesthetics (Animagine XL 4.0 + DMD2) |
| **`NoobAI_XL_1.1_dmd2`** | `SDXL` | `3,716 MiB` | `6–8 steps · CFG 1.0 · LCM` | **`~50.8s`** (768×1024) / **`~67.6s`** (1080×1440) | Crisp Danbooru tag understanding (NoobAI-XL 1.1 + DMD2) |

| **`waiNSFWIllustrious_v140_8step`** | `SDXL` | `3,716 MiB` | `8 steps · CFG 3.5 · Euler` | **`~103.5s`** (768×1024) / **`~120.4s`** (1080×1440) | 8-step Hyper-SD SDXL with active negative prompt guidance |

| **`waiNSFWIllustrious_v140`** | `SDXL` | `3,716 MiB` | `20 steps · CFG 7.0 · Euler a` | **`~228.0s`** (768×1024) | Full 20-step non-distilled reference SDXL checkpoint |
| **`MeinaMix_V11_8step`** ⭐ | `SD 1.5` | `1,220 MiB` | `8 steps · CFG 3.5 · Euler` | **`~17.3s`** (4-stp) / **`~26.2s`** (512) / **`~46.5s`** (1080×1620) | **Best for Base PS4 / Slim & Fast 1080p!** Only 1.54 GiB VRAM |
| **`MeinaMix_V11`** | `SD 1.5` | `1,220 MiB` | `20 steps · CFG 7.0 · Euler a` | **`~87.2s`** (1080×1620 HD) | Classic 20-step glossy anime SD 1.5 |

| **`DreamShaper_8`** | `SD 1.5` | `1,220 MiB` | `20 steps · CFG 6.5 · Euler a` | **`~87.2s`** (1080×1620 HD) / **`~105.0s`** (16:9 1080p) | Fantasy landscapes, scenic art & 2.5D/2D portraits |
| **`Anything_V5`** | `SD 1.5` | `1,220 MiB` | `20 steps · CFG 7.0 · Euler a` | **`~87.2s`** (1080×1620 HD) / **`~105.0s`** (16:9 1080p) | Classic cel-shaded 2D anime SD 1.5 |



> 💬 **Want another model or checkpoint converted for PS4?**

> Join our official **[Support Discord (`discord.gg/Gbyq3kpGjc`)](https://discord.gg/Gbyq3kpGjc)** and post your requests in `#model-requests`!



---



## Sample 1080p Outputs Rendered Natively on PS4 Pro (`Quiet 20CU`)



<p align="center">

  <img src="sample_widescreen.jpg" width="840" alt="16:9 1920x1080 Hatsune Miku rendered on PS4 Pro in 50.94s">

  <br>

  <sub><b>16:9 Full HD (<code>1024×576 → 1920×1080</code>)</b> · <code>WAI_Illustrious_v17_dmd2</code> · 6 steps CFG 1.0 LCM · <b>50.94s total</b> (19.56s UNet + 14.37s VAE + 12.04s Real-ESRGAN) in Quiet (20 CU) mode.</sub>

</p>



<p align="center">

  <img src="sample_scenic.jpg" width="840" alt="16:9 1920x1080 Floating Sky Sanctuary rendered on PS4 Pro in 51.16s">

  <br>

  <sub><b>16:9 Full HD Scenic (<code>1024×576 → 1920×1080</code>)</b> · <code>WAI_Illustrious_v17_dmd2</code> · 6 steps CFG 1.0 LCM · <b>51.16s total</b> in Quiet (20 CU) mode. Explore all 45+ samples on our <a href="https://djtomato.github.io/GarlicDiffusion/">Website</a> &amp; <a href="https://djtomato.github.io/GarlicDiffusion/scenic.html">Scenic Gallery</a>.</sub>

</p>



---



## What You Get



| Feature | Details |

|---|---|

| **Dual SD 1.5 & SDXL GCN Engine** | 22 custom bare-metal OpenCL AMD GCN (`bonaire` ISA) kernels dispatched via raw PM4 command packets (`libSceGnmDriver`). |

| **Base PS4, Slim & Pro Ready** | Auto-detects console hardware: uses `1.54 GiB` for SD 1.5 and `4.04 GiB` (Base PS4 24×24 tiled VAE) or `4.21 GiB` (PS4 Pro) for full SDXL. |

| **Built-In 1080p & 4K Upscaler** | Ships with **Real-ESRGAN AnimeVideo v3** (`upscaler.psd1`, 2.4 MiB) inside the PKG for on-console `1080p Full HD` (`~9–17s`) and `4K UHD` (`3840×2160`) upscaling. |

| **80+ Presets, Styles & Characters** | Seeded with **20 Prompt Presets**, **22 Art Styles** (Shinkai, Ghibli, 2D Anime Fix for DreamShaper, Manga, Cyberpunk, Ukiyo-e), and **38 Character Presets** across 20 series. |

| **Hardware CU Thermal Scaling** | 4 live GPU power modes (**Silent 14CU**, **Quiet 20CU**, **Balanced 25CU**, **Turbo 36CU**) via `SH_STATIC_THREAD_MGMT` masks + inter-block cooldown breathers. |

| **Web Studio, A1111 & Discord API** | Full Web UI on port `8081`, Automatic1111 PNG `parameters` metadata, plus `/sdapi/v1/txt2img` for **`bz-cogs/aimage` Discord bots** and `/v1/images/generations` for OpenAI clients. |

---

## PS4 Controller Map & Web / Discord API

| Button | Action on PS4 TV UI |
|---|---|
| **Cross (`✕`)** | Open PS4 On-Screen Keyboard (or USB Keyboard) to edit Prompt |
| **Triangle (`△`)** | Generate Image (or Recreate in Gallery) |
| **Square (`□`)** | Open On-Console **Artwork Gallery** (`Left/Right` browse, `R1` full-screen, `L3` upscale 1080p) |
| **Circle (`○`)** | Open **Credits, Licenses & Scannable QR Codes** screen (or **Cancel** while generating) |
| **D-Pad Left / Right** | Cycle through **20 Saved Prompt Presets** |
| **D-Pad Down** | Cycle through **38 Built-In Character Presets** |
| **D-Pad Up / OPTIONS** | Open **In-App Model Manager & Hugging Face HTTPS Downloader** |
| **Touchpad Click** | Cycle through **22 Reusable Art Styles** |
| **L1 / R1** | Cycle Resolution (`512×512`, `512×768`, `768×512`, `896×512` 16:9, `1024×576` 16:9, `768×1024`, `1024×1024`, `832×1216`) |
| **L2 / R2** | Decrease / Increase Sampling Steps (`1..40`) |
| **L3 (Left Stick Click)** | Cycle AI Upscaler (`Native 1×` → `1080p HD` → `2× HD` → `4K UHD`) |
| **R3 (Right Stick Click)** | Cycle GPU Power & Fan Mode (`Quiet 20CU` → `Balanced 25CU` → `Turbo 36CU` → `Silent 14CU`) |

<p align="center">
  <img src="credits_qr.jpg" width="840" alt="GarlicDiffusion PS4 TV Credits and Scannable QR Codes Screen">
</p>

### REST API Examples (`Port 8081`)

```bash

# Check live GPU status, active model & benchmark TFLOPS

curl http://192.168.1.29:8081/status



# Automatic1111 WebUI compatible txt2img (works out-of-the-box with bz-cogs/aimage Discord bots!)

curl http://192.168.1.29:8081/sdapi/v1/txt2img   -H "Content-Type: application/json"   -d '{"prompt":"1girl, hatsune miku, cherry blossoms, masterpiece","width":768,"height":1024,"steps":6,"cfg_scale":1.0,"sampler_name":"LCM","enable_hr":true}'

```

---

## ⚠️ Hardware, Thermal & Liability Disclaimer

GarlicDiffusion is distributed under the **GNU General Public License v3.0 (GPLv3)** on an **"AS IS"** basis, **WITHOUT WARRANTY OF ANY KIND**. In no event shall the authors, contributors, or upstream copyright holders be liable for any console overheating, fan/APU wear, thermal shutdown, data loss, or hardware damage. PlayStation 4 consoles are 7–13 year old hardware: always ensure unobstructed ventilation, clean dust and aging thermal paste, and use **Quiet (`20 CU`, default)** or **Silent (`14 CU`)** mode for extended sessions.

---

## Credits & Component Licenses

| Component | Author / Source | License |
|---|---|---|
| **GarlicDiffusion App, GCN Kernels & Web Studio** | [DJTOMATO/GarlicDiffusion](https://github.com/DJTOMATO/GarlicDiffusion) ([Ko-fi](https://ko-fi.com/djtomato) · [Discord](https://discord.gg/Gbyq3kpGjc)) | **GNU GPLv3** |
| **Garlic LLM Foundation, PM4 Architecture & UI Theme** | [Leonardo Alegría (`garlicllm.dev`)](https://github.com/leonardo-alegria/garlic-llm) ([Ko-fi](https://ko-fi.com/leonardoalegria)) | **GNU GPLv3** |
| **WAI-Illustrious-SDXL (v14 / v17)** | WAI / OnomaAI Illustrious | Fair AI Public License 1.0-SD |
| **Animagine XL 4.0 & NoobAI-XL 1.1** | Cagliostro Research Lab / Laxhar Lab | Fair AI Public License 1.0-SD |
| **DMD2 & Hyper-SD Distillation LoRAs** | Tianwei Yin et al. (MIT) / ByteDance | MIT / CreativeML Open RAIL++-M |
| **MeinaMix V11 / DreamShaper 8 / Anything V5** | Meina / Lykon / Community | CreativeML Open RAIL-M |
| **Real-ESRGAN AnimeVideo v3 (`SRVGGNetCompact`)** | Xintao Wang et al. (Tencent ARC) | BSD-3-Clause |
| **OpenOrbis PS4 Toolchain & Selawik UI Font** | OpenOrbis Team / Microsoft Corporation | GNU GPLv3 / SIL OFL 1.1 |

Not affiliated with or endorsed by Sony Interactive Entertainment. PlayStation and PS4 are trademarks of their respective owners.