ahrm / UnstableFusion

A Stable Diffusion desktop frontend with inpainting, img2img and more!
GNU General Public License v3.0
1.26k stars 86 forks source link

Connect to Automatic1111's implementation as back end? #9

Open mikebind opened 2 years ago

mikebind commented 2 years ago

I've been successfully running stable diffusion locally using Automatic1111's webui (https://github.com/AUTOMATIC1111/stable-diffusion-webui) and wanted to try your front end (which looks cool). So, I already have the weights downloaded and have tinkered with things like textual inversion which generate additional embedding models. When I try to run UnstableFusion, I am asked for a huggingface token, which I imagine means you are going to download the model weights again. Is there a way to just point your code at the weights I already have? Or, better yet, is there a way to treat Automatic's implementation as a backend hosted on localhost? There is all kinds of innovation which has been implemented there (increasing/decreasing attention, prompt switching partway through generation, etc) which it would be great to be able to take advantage of while still using your nice innovations on the front end.

TheSeanLavery commented 2 years ago

Would really like this too. There is so much happening with SD, I don't want to have like 10 projects, each requiring a huge model file.

ahrm commented 2 years ago

Well our project uses the default SD installation that you would have if you run almost any other notebook. It is webui that is doing its own thing.

TheSeanLavery commented 2 years ago

I'm trying to run this without using my Hugging face info.

Is there a simple way I can do so?

I'm using some non standard trained weights of SD.

ahrm commented 2 years ago

You could run a your own server locally which handles /generate, /inpaint, and /reimagine post requests with the appropriate response. (See diffusionserver.py for an example). It is not going to be straightforward though.

ndemar commented 2 years ago

We would like to run this locally. Our internal hardware has the overhead and goes 90% idle while waiting for a queue.

codefaux commented 2 years ago

For the record, Windows users can create NTFS Junctions (like a symlink) to use one model file in multiple locations, using the mklink command from an elevated command prompt.

I'm using it to run for separate Stable Diffusion interfaces which don't use the official downloader, and I only use one copy of the SD model, GAN networks etc. It takes up nearly no extra space since it's a symlink.

ZeroCool22 commented 2 years ago

For the record, Windows users can create NTFS Junctions (like a symlink) to use one model file in multiple locations, using the mklink command from an elevated command prompt.

I'm using it to run for separate Stable Diffusion interfaces which don't use the official downloader, and I only use one copy of the SD model, GAN networks etc. It takes up nearly no extra space since it's a symlink.

A very convenient Symlink Creator with GUI: https://github.com/amd989/Symlinker

687474703a2f2f616c656a616e64726f2e6d642f7075626c6973682f53796d6c696e6b65722f73637265656e73686f742e6a7067

Using it since a long time, works great.

y0himba commented 2 years ago

For the record, Windows users can create NTFS Junctions (like a symlink) to use one model file in multiple locations, using the mklink command from an elevated command prompt. I'm using it to run for separate Stable Diffusion interfaces which don't use the official downloader, and I only use one copy of the SD model, GAN networks etc. It takes up nearly no extra space since it's a symlink.

A very convenient Symlink Creator with GUI: https://github.com/amd989/Symlinker

687474703a2f2f616c656a616e64726f2e6d642f7075626c6973682f53796d6c696e6b65722f73637265656e73686f742e6a7067

Using it since a long time, works great.

Can you define 'Link Folder', what to name the link, then 'Destination folder' and type of link? I'd like to use the models this way since I use multiple UIs for different features. I'm trying to understand what each field means so I can create Symlinks.

Can I link to files on other physical drives? Sorry, I'm old and a newb at the same time...