Stable Diffusion Webgpu
Stable Diffusion WebGPU demo is a web-based application that allows users to generate images using the create-react-app framework. To access the application, users need to have JavaScript enabled and use the latest version of Chrome, which requires enabling the "Experimental WebAssembly" and "Experimental WebAssembly JavaScript Promise Integration (JSPI)" flags.
The application performs a series of inference steps to generate an image, with each step taking approximately 1 minute plus around 10 seconds for the VAE decoder to generate the image.
It is worth noting that having the DevTools open can slow down the process by approximately 2 times. The UNET model, which is responsible for image generation, only runs on the CPU due to better performance and accurate results compared to the GPU.For acceptable results, the minimum number of steps recommended is 20; however, for demonstration purposes, 3 steps would suffice.
The model files are cached, eliminating the need for repeated downloads.The application provides a user-friendly interface with options to load the model, run the image generation process, and view the result.
To address specific issues, an FAQ section is available, offering troubleshooting guidance.Despite running on a GPU, the webgpu implementation in onnxruntime is still in its early stage, causing some operations to be incomplete.
This leads to data being continuously transferred between the CPU and GPU, impacting performance. Multi-threading is not currently supported, and limitations in WebAssembly prevent the creation of 64-bit memory with SharedArrayBuffer.
The developer plans to address these issues through proposed spec changes and engine patches.The source code for Stable Diffusion WebGPU demo is available on GitHub, allowing users to run it locally.
Additionally, a patched version of onnxruntime is provided, enabling the use of large language models with transformers.js, although its reliability in all scenarios is not guaranteed.
The developer also plans to submit a pull request to the onnxruntime repository.
How would you rate Stable Diffusion Webgpu?
Help other people by letting them know if this AI was useful.
Feature requests
100 alternatives to Stable Diffusion Webgpu for Images
-
4,86652
-
2,23617
-
1,3967
-
5163
-
3545
-
3021
-
2722
-
255
-
2242
-
215
-
181
-
1711
-
1672
-
1582
-
1552
-
1542
-
1512
-
146
-
1433
-
134
-
1321
-
132
-
1261
-
124
-
1212
-
11811
-
109
-
1071
-
1062
-
105
-
1051
-
104
-
1031
-
1001
-
1003
-
98
-
96
-
931
-
90
-
87
-
861
-
84
-
82
-
81
-
79
-
78
-
781
-
77
-
74
-
73
-
72
-
72
-
714
-
70
-
701
-
702
-
69
-
67
-
66
-
65
-
641
-
64
-
631
-
632
-
611
-
61
-
61
-
61
-
611
-
613
-
60
-
59
-
592
-
57
-
56
-
553
-
55
-
54
-
542
-
53
-
52
-
521
-
52
-
513
-
511
-
51
-
513
-
504
-
501
-
506
-
49
-
48
-
4711
-
46
-
44
-
44
-
43
-
431
-
43
-
43
Pros and Cons
Pros
Cons
If you liked Stable Diffusion Webgpu
Featured matches
Other matches
-
17
-
8
-
18
-
211
-
2K
-
275
-
130
-
138
-
199
-
7124
-
2457
-
162
-
1
-
10
-
276
-
209
-
341
-
571
-
1052
-
41
-
23
-
30
-
29
-
26
-
12
-
16
-
8
-
1641
-
281
-
162
-
3111
-
32
-
11
-
7644
-
88
-
29
-
25
-
362
-
33
-
1935
-
452
-
252
-
13
-
25
-
25
-
25
-
7
-
34
-
24
-
6
-
141
-
281
-
60
-
6642
-
42
-
14
-
321
-
131
-
70
-
39
-
27
-
30
-
743
-
30
-
10
-
9
-
37
-
412
-
25
-
17
-
712
-
49
-
35
-
22
-
26
-
12
-
3
-
2181
-
24
Help
To prevent spam, some actions require being signed in. It's free and only takes a few seconds.
Sign in with Google