Replies: 2 comments 3 replies
-
Use the scripts tutorial in the wiki. There you can easily change UI elements, just check the other scripts for reference. This is a great idea, I also programmed an aesthetic scorer, and I just generated a couple hundred thousand images to test the correlation between step 1 gen and step 20, and it seems to have a limit at score 4. So in my code if the gen scores 4 or less at step 1, it moves to next prompt+seed to not waste time w trash. With your code if aesthetic score test 1 passes, and score test 2 passes (score above 7.7 for best pics), and if convergence already approximated 0, then stop. Do calculate what is the 2 sigma from the mean on your convergence function, so you know a good limit and test it across a couple 1000 samples. |
Beta Was this translation helpful? Give feedback.
-
I'm just going to mark this as completed since I solved the problem by creating a simple custom script, and it's going to take a lot more work to make an actually good convergence feature. |
Beta Was this translation helpful? Give feedback.
-
I modified the sd_samplers.py file so that every time store_latent() is called, it compares the current and last latent tensors. The changes that Stable Diffusion makes to the image gets less and less over time, so the similarity between successive images should get higher and higher until they become the same or almost the same. I've mostly implemented that functionality.
I don't know how to add gradio elements to the ui.py file (not as a custom script) and make them change values in the program. The code is really complex, and I have no idea how to do this. Everything I have tried has not worked. Also, for whatever reason, it seems like the ui.py code does not allow elements that have float values (which is kind of necessary for this. (or at least floats never work for me) (So how do I add a slider or number box that can have a float value)
I have 3 values:
go_to_convergence - a checkbox to turn on convergence mode
reduce_convergence_tolerance_step - the step at which to increase (the name is a bit misleading) the convergence tolerance (the difference between images (no difference is 0) that the program considers to be fully converged.
reduced_convergence_tolerance - the aforementioned increased (reduced) convergence tolerance (is a percentage)
I'm also new-ish to GitHub (I've never done a pull request before), so help will be greatly appreciated. I'll attach the code later.
TL;DR: UI is big and confusing. How do I add stuff to it without changing everything and all things that depend on it?
Beta Was this translation helpful? Give feedback.
All reactions