Recently, the field of artificial intelligence has experienced significant growth, with approaches for procedural generation of images and videos based on a given description attracting a great deal of attention. In 2022, an open-source model called Stable Diffusion was released. This master's thesis addresses the implementation of the model as a web application that runs on the client side in a web browser using the ONNX framework. The study compares execution speeds and output image quality for models with different weight precisions (16 and 8 bits). The results show that execution using WebAssembly and the central processing unit is feasible but slower compared to traditional methods that utilize server-side solutions and more powerful graphics processing units. Despite current challenges in supporting inference in browsers using graphics processing units, the ONNX framework offers promising possibilities for broader accessibility and the use of advanced artificial intelligence technologies in everyday web applications. The outcome of the thesis is the developed implementation of the Stable Diffusion 2.1 model as a web application and a comparison of execution times and output image quality with existing solutions.
|