Skip to content

Utilize metadata and cleanup#1

Merged
scraed merged 6 commits intoscraed:mainfrom
w-e-w:utilize-metadata-and-cleanup
Jan 4, 2024
Merged

Utilize metadata and cleanup#1
scraed merged 6 commits intoscraed:mainfrom
w-e-w:utilize-metadata-and-cleanup

Conversation

@w-e-w
Copy link
Copy Markdown
Contributor

@w-e-w w-e-w commented Jan 3, 2024

compact the infotext from this

(CHG) Characteristic Guidance: True, (CHG) Regularization Strength: 0.7, (CHG) Regularization Range Over Time: 0.74, (CHG) Max Num. Characteristic Iteration: 28, (CHG) Num. Basis for Correction: 2, (CHG) Reuse Correction of Previous Iteration: 0.06, (CHG) Log 10 Tolerance for Iteration Convergence: -4.2, (CHG) Iteration Step Size: 0.96, (CHG) Regularization Annealing Speed: 0.3, (CHG) Regularization Annealing Strength: 0.72, (CHG) AA Iteration Memory Size: 3

to this

CHG: "{'Str': 0.7, 'Range': 0.74, 'Max': 28, 'Basis': 2, 'Reuse': 0.06, 'Tolerance': -4.2, 'Step': 0.96, 'Anneal Speed': 0.3, 'Anneal Str': 0.72, 'AA': 3}"
before after
image image

I chose the key names based on what makes sense to me, but as I'm not familiar with the code some of the name choices may not be appropriate, it's possible that you can compact it even more


Implement integration so that the infotext can be read by the UI

2024-01-04.00_54_00_832.chrome.mp4

video description:
here are demonstrated that I first set the extension sliders to arbitrary values
then I loaded in a info text from image I generate before then click read generation parameters button
you can see that the extension sliders are set to the values specified by the infotext


important

becaues you originally set the value of certain elements as int and not float
thise values are save to ui-config.json the values will also be cast to int when casting
passed from infotext
you will have to delete ui-config.json and let webui regenerate it for this reading info text to work
(you could also delete the corresponding keys in ui-config.json)
see set default values to be float
I consider this a bug of web UI and would make a PR to fix this that's for now this is what you have to do
this also means that anyone who has already installed this extension has to also delete ui-config.json to work

I made a PR to webui to fix this AUTOMATIC1111/stable-diffusion-webui#14523 but still the issue still stands for webui <= 1.7

I think I have to mention here that I'm also maintainer of AUTOMATIC1111/stable-diffusion-webui-extensions#253
because of the issue of users that I already installed needing deleting of the existing config file to work
I would prefer that you merge this PR before it gets put on the index

note your extension is working so it can be added to the indexed

I don't want to make it seems that I'm using my position as leverage for you to merge my PR this just to avoid issues down the road


other cahnge

w-e-w added 6 commits January 3, 2024 23:57
format CHG info text as a json string dict with with double quotes replaced with single simple quotes

add infotext_fields for reading the information back using the UI
otherwise if the value int when reading info text the value will be vast to int
@scraed
Copy link
Copy Markdown
Owner

scraed commented Jan 4, 2024

@w-e-w Thank you so much for your contribution! The addition of infotext support is fantastic. I hadn't noticed the issue with the UI's inability to read infotext until you pointed it out. Also, the compacted naming options are a great touch, though a few of them could be more precise. I plan to refine these in a future commit. Besides, that is very nice of you to clean up the code. I will merge this PR to the main branch.

@scraed scraed merged commit ced88a6 into scraed:main Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants