Gerschel / sd_web_ui_preset_utils

Preset Manager moved private
252 stars 20 forks source link

Extension Description #1

Closed ClashSAN closed 1 year ago

ClashSAN commented 1 year ago

What should the description be?

Gerschel commented 1 year ago

My goal with this project is to manage presets for custom scripts, but I can't gaurantee that I can achieve that, maybe for some.
It would have a create, delete, and edit. I kind of attached the word utils because I pictured it as a utility box when others are working on their scripts, they can manage presets when testing and have a quick restart button in reach.

ClashSAN commented 1 year ago

manage presets for custom scripts, but I can't gaurantee that I can achieve that, maybe for some

that's good enough, I'm happy somebody is giving it a try!

For older non-updated custom scripts in the wiki, many can work/run as an extensions. I thought about making some of them a bundle that people can autodownload these scripts.. I don't know how it would work. I haven't done anything with the idea yet. But you might be able to.

I fully support what you're trying to do.

Gerschel commented 1 year ago

Is there a way I can run a function after the scripts are preloaded. I can grab the components from the custom scripts but it feels like scope of the values get locked in during my change instantiation. I'd either have to refactor so I can mutate it, or find a way for my script to act last in the stack. From my playing, sometimes it feels like the change method locks in the width of the list comprehension. From my save method, if I call my components container directly, I can get a length that includes the components from a custom script, but when it's sent through the change method, everything is there except the custom script components.
But I need it through the change method, because component.value isn't updated (change method pulls the correct values).

vis223 commented 1 year ago

Well done 'utils' great! idea. You could add a great deal of value in that area, I'm sure How hard is it to make a 'prompt history'?
Bare bones. just a chronological list maybe? Preferably with any dynamic prompts recorded how they were coded ie '{medium\photography\lighting|medium\photography\lens}' and not just the 'results' from their output ie. For this prompt, ping info reports 'Lumen Reflections, F/2.8' but all the hard work goes into the dynamic prompt which currently isn't saved

ClashSAN commented 1 year ago

@vis223 we do have styles already for saving your prompts, did you try it?

ClashSAN commented 1 year ago

find a way for my script to act last in the stack

i'm not sure, and I hadn't known about which gets loaded first.

Gerschel commented 1 year ago

I noticed that the order in the scripts dropdown, are the same order of filename, not title.

ClashSAN commented 1 year ago

so apparently it needs to be a custom script, not extension, and named zzz.py? that's probably not the best idea but it would be simple to automatically move the file with install.py to scripts folder. It was done over here https://github.com/dr413677671/PromptGallery-stable-diffusion-webui/blob/main/install.py

Gerschel commented 1 year ago

I figured out the sort order.
script_data = always enabled scripts, custom scripts sorted alphabetically, extensions sorted by alpha of *.py file, built-in extensions

Gerschel commented 1 year ago

Can you check my post and give an opinion. https://github.com/Gerschel/sd_web_ui_preset_utils/discussions/29#discussioncomment-4704061