Giter Site home page Giter Site logo

Comments (5)

ggerganov avatar ggerganov commented on May 16, 2024 4

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

from stable-diffusion.cpp.

rahuldshetty avatar rahuldshetty commented on May 16, 2024 3

@Joinhack , if you're using Emscripten then try adding these flags and values during compilation:
-s INITIAL_MEMORY=1000MB -s MAXIMUM_MEMORY=4GB -s STACK_SIZE=11524288 -s ALLOW_MEMORY_GROWTH

This should get around the memory limitations. Example Script: https://github.com/rahuldshetty/ggml.js/blob/master/build-ggml.sh

from stable-diffusion.cpp.

dmikey avatar dmikey commented on May 16, 2024

@ggerganov any chance you could give us some pointers? :) Much obliged.

from stable-diffusion.cpp.

Joinhack avatar Joinhack commented on May 16, 2024

yes, it work, but other error occur.

image

from stable-diffusion.cpp.

Joinhack avatar Joinhack commented on May 16, 2024

thanks.

from stable-diffusion.cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.