axodox / unpaint

A simple Windows / Xbox app for generating AI images with Stable Diffusion.
Other
263 stars 11 forks source link

Generation failed on my Lenovo T14S device(Windows 11) #50

Open zhanweiw opened 10 months ago

zhanweiw commented 10 months ago

Because it always trigger the exception below, for debugging the issue, I removed the code below:

    catch (...)
    {
      async.update_state(1.f, "Generation failed.");
      return {};
    }

Then I got the below exception call stack. Any idea on how to debug this issue? Thanks in advance! I downloaded the models from 'https://huggingface.co/axodoxian/stable_diffusion_onnx':

>   Unpaint.exe!winrt::terminate() Line 5206    C++
    Unpaint.exe!std::coroutine_traits<winrt::fire_and_forget,winrt::Unpaint::implementation::InferenceViewModel &>::promise_type::unhandled_exception() Line 9623   C++
    Unpaint.exe!`winrt::Unpaint::implementation::InferenceViewModel::GenerateImage$_ResumeCoro$1'::`1'::catch$46() Line 386 C++
    [External Code] 
    Unpaint.exe!winrt::Unpaint::implementation::InferenceViewModel::GenerateImage() Line 332    C++
    [External Code] 
    Unpaint.exe!winrt::impl::resume_background_callback(void * __formal, void * context) Line 8915  C++
    [External Code] 
chrisaudet commented 5 months ago

I experienced this same error on Lenovo ThinkBook 14 G2 laptop (Intel 1165G7 and 24GB RAM). I am also using https://huggingface.co/axodoxian/stable_diffusion_onnx.

I don't have a good understanding of the issue, but after changing the output resolution from the default 768x768 to 512x512 I am able to generate images as expected.

Aside from downloading the model through the "Import model from HuggingFace" menu, and setting resolution to 512x512, all other options have been left at default.

axodox commented 5 months ago

How much VRAM do you have? Maybe it is using the integrated GPU, you could check in settings.

chrisaudet commented 5 months ago

You are correct, my device is using Intel iGPU to run Unpaint (no dedicated GPU).

When I select 512x512 in Unpaint settings, I'm able to generate images and no longer get the error message. But generating images in this size is not a problem for my use case👍

I'm just leaving a comment on the issue, for any future people who may have this problem. Thank you for building Unpaint, it's a great application 🍻