zero01101 / openOutpaint

local offline javascript and html canvas outpainting gizmo for stable diffusion webUI API 🐠
MIT License
499 stars 43 forks source link

Refresh List of Models Without Refreshing Entire UI #167

Closed Maki9009 closed 1 year ago

Maki9009 commented 1 year ago

it would be nice to have the ability to use Scripts such as loopback and also to be able to refresh the model list since.. if i merge a new inpaint model i would have to refresh the entire webui

zero01101 commented 1 year ago

moved to main repo as it's not specifically related to the extension, changing title due to following:

as you've noticed, scripts are being considered but currently there's no way to query the API for the scripts nor their parameters, and hardcoding individual scripts is essentially unmaintainable, so any script usage is going to rely on querying their existence and attributes first.

refreshing model list from the openOutpaint UI should totally be doable, i'll certainly check into that

Maki9009 commented 1 year ago

also it would be nice if we have the ability to just drop an image into the canvas rather than just use the upload button please. and 1 more request idk if its possible or not but would it be possible to add fast squarize button. with a technique like this https://github.com/nicolai256/squarize-images ? it auto detects images and inpaints / outpaints the image into a perfect square shape based on the prompt?

zero01101 commented 1 year ago

at the moment, you can already drop an image directly onto the stamp tool resource browser without using the upload button, or you can also just paste an image directly onto the canvas from your clipboard if your browser supports the clipboard API (i.e. chrome). dropping an image directly onto the canvas can be looked into but it'll be low priority given the existing functionality.

re: squarize, openOutpaint doesn't do any python at all, except for the minimum needed to create the extension tab and buttons to send images to the openOutpaint tab; beyond that, this doesn't even appear to be an A1111 extension or script at all yet so it's doubly outside the scope of this project... besides, it's also kinda what the dream tool does ;)

seijihariki commented 1 year ago

Squarize could probably be a thing, but it was made for relatively small initial images, and so we would need to decide what happens to large canvases;

Do we resize the cursor and explode the VRAM of the user, do we scale the cursor, making the completed canvas potentially very blurry, or do we queue many tiled dream calls that may or may not end up completing each other at all; the tiled approach could barely work by auto accepting the first received image and running the next dream on top of that.

There is a lot that would need to be decided, but implementation is not... Impossible. Just very hard to get good results with.

zero01101 commented 1 year ago

model refresh added in https://github.com/zero01101/openOutpaint/commit/72f4e2720552880971ec6ce44a12cccd7bd31f13