-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stable diffusion not work in WASM #47
Comments
@ggerganov any chance you could give us some pointers? :) Much obliged. |
Hard to tell - could be some problem with the WASM code. It's not very well tested. Try this patch and see what happens: diff --git a/src/ggml.c b/src/ggml.c
index d2a9dab..8a11f7c 100644
--- a/src/ggml.c
+++ b/src/ggml.c
@@ -12260,9 +12260,7 @@ static void ggml_compute_forward_soft_max_f32(
}
}
- assert(sum > 0.0);
-
- sum = 1.0/sum;
+ sum = sum > 0.0 ? 1.0/sum : 1.0;
ggml_vec_scale_f32(nc, dp, sum);
#ifndef NDEBUG |
@Joinhack , if you're using Emscripten then try adding these flags and values during compilation: This should get around the memory limitations. Example Script: https://github.com/rahuldshetty/ggml.js/blob/master/build-ggml.sh |
thanks. |
Hello, I compile this project to wasm, but when I run it crash.
The text was updated successfully, but these errors were encountered: