kiri-art / stable-diffusion-react-nextjs-mui-pwa

PWA Web App front end for Stable Diffusion, on React/NextJS with Material UI
https://kiri.art/
MIT License
127 stars 32 forks source link

Upsampling no work in "https://kiri.art/" or docker api? #45

Open xuechengjinxiu opened 1 year ago

xuechengjinxiu commented 1 year ago

error: return "Body excee..." , but I fix it by "export const config = { api: { bodyParser: { sizeLimit: '4mb' } } };"in pages/api/banana-upsample.ts. Then next error: no this model of "RealESRGAN_x4plus"

gadicc commented 1 year ago

Hey @xuechengjinxiu, welcome.

Firstly, congrats on getting so far :sweat_smile: I know that currently the docs aren't so clear and the code is a bit of a mess :/ Most of my focus is currently on the docker api and kiri.art site, I hope in a few months to spend more time on making the stable-diffusion-react code base more clear and open for general cases.

Secondly, nice catch on the body size limit... I guess I've been sending smaller pics for up-sampling until now :sweat_smile:

Are you just playing locally or are you deploying somewhere too?

Unfortunately the upsampling code requires a different docker image than docker-diffusers-api (which only wraps HuggingFace's "diffusers" library for diffusion-based models). The diffusion-based upsampling may already be possible, I just haven't spent much time with it yet).

There's a https://github.com/kiri-art/banana-upsample repo which has a docker image with RealESRGAN and FPGAN for upsampling and face restoration, respectively. It deploys to banana too. It's working on kiri.art but it's very slow, because banana can't currently optimize images with multiple models, so cold starts are very slow. And I haven't had any time to try workaround that :(

Anyway, hope that all makes sense! Let me know if anything is not clear or if you have any other questions. And thanks for your post :pray: