onnxruntime/js/web/lib/wasm
Arthur Islamov fac3e33da5
[js/web] JSEP Attention & MultiHeadAttention (#17742)
### Description
This is a narrow implementation of Attention/MultiHeadAttention as it
does not support:
a. inputs 5-7 for MHA
b. packed QKV/KV
c. past/present
d. attention mask

But it works well for StableDiffusion and can be extended later. It
reduces VRAM usage as it combines many ops into few
I've updated demo here https://islamov.ai/stable-diffusion-webgpu/ it
takes ~13sec for 1 image with 20 steps on RTX3090Ti and about 25s on M1
Pro
VRAM usage is about 8gb if you don't use img2img

Going to focus on SDXL now

---------

Co-authored-by: Guenther Schmuelling <guschmue@microsoft.com>
Co-authored-by: Yulong Wang <7679871+fs-eire@users.noreply.github.com>
2023-11-17 12:23:52 -08:00
..
binding [js/web/training] Add CreateTrainingSession (#17891) 2023-10-26 09:22:10 -07:00
jsep [js/web] JSEP Attention & MultiHeadAttention (#17742) 2023-11-17 12:23:52 -08:00
proxy-worker [js/web] set noUnusedParameters to true and fix a few bugs (#18404) 2023-11-15 09:16:29 -08:00
proxy-messages.ts [js/web/training] Add CreateTrainingSession (#17891) 2023-10-26 09:22:10 -07:00
proxy-wrapper.ts [js/web/training] Add CreateTrainingSession (#17891) 2023-10-26 09:22:10 -07:00
run-options.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00
session-handler-inference.ts [js/web/training] runTrainStep implementation (#18006) 2023-11-02 08:32:50 -07:00
session-handler-training.ts [js/web/training] runTrainStep implementation (#18006) 2023-11-02 08:32:50 -07:00
session-options.ts [WebNN EP] Support numThreads option for WebNN CPU device (#18054) 2023-11-12 16:45:10 -08:00
wasm-common.ts [js/webgpu] support IO binding (#17480) 2023-09-29 11:24:42 -07:00
wasm-core-impl.ts [js/web/training] runTrainStep implementation (#18006) 2023-11-02 08:32:50 -07:00
wasm-factory.ts Add "glue" between training WASM artifacts and training web (#17474) 2023-10-12 11:16:56 -07:00
wasm-training-core-impl.ts [js/web/training] runTrainStep implementation (#18006) 2023-11-02 08:32:50 -07:00
wasm-utils.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00