EdVince / Stable-Diffusion-NCNN

Stable Diffusion in NCNN with c++, supported txt2img and img2img
BSD 3-Clause "New" or "Revised" License
1k stars 95 forks source link

Can it run SDXL? #41

Open Sovenok-Hacker opened 1 year ago

EdVince commented 1 year ago

Thanks for your interest in my work. I have no plans to update this project. At first I just did it to show the possibility of running SD on mobile. For SDXL you can try to convert it yourself. You can refer to this repo: diffusers-ncnn

Sovenok-Hacker commented 1 year ago

Thanks, I`ll try to do it.

marcpre commented 1 year ago

How would you conceptionally do it? Just convert the sdxl or dreamshaper model to ncnn and integrate it in your code?

Appreciate your reply!

Sovenok-Hacker commented 1 year ago

I want to run SDXL model on my PC. I don`t have a GPU, but I have a powerful CPU and a lot of RAM.

EdVince commented 1 year ago

Replacing SDXL is tedious because it is a completely different model. You need to change “text encoder”, “unet”, “vae”.

marcpre commented 1 year ago

Replacing SDXL is tedious because it is a completely different model. You need to change “text encoder”, “unet”, “vae”.

What makes it so much different?

Would you only change the diffuser?

Is SD 1.0/1.5 so much different from SDXL?

Sovenok-Hacker commented 1 year ago

Replacing SDXL is tedious because it is a completely different model. You need to change “text encoder”, “unet”, “vae”.

Is it so difficult to convert three models to NCNN?

JohnClaw commented 1 year ago

Is it so difficult to convert three models to NCNN?

Привет, Совёнок. Пожалуйста, конвертируй в NCNN стандартные модели SD 1.4, SD 1.5 и SD 2.1.

Sovenok-Hacker commented 1 year ago

Is it so difficult to convert three models to NCNN?

Привет, Совёнок. Пожалуйста, конвертируй в NCNN стандартные модели SD 1.4, SD 1.5 и SD 2.1.

Извини, сам ещё не разобрался. Sorry, I am learning how to do it now.

earonesty commented 11 months ago

you might want to try this: https://github.com/autocyz/pytorch2ncnn. cuz theoretically, you should be able to autoconvert. pytorch models are just code, and so is c++/ncnn. so a codegen pipe should work