yownas / seed_travel

Small script for AUTOMATIC1111/stable-diffusion-webui to create images between two seeds
Other
310 stars 25 forks source link

Slowdown generation close to main seeds #46

Closed Meru closed 1 year ago

Meru commented 1 year ago

Since my misunderstanding of things evolved into a feature request, I figured I might as well make a proper entry here.

My proposal is to implement a feature (or a couple of features) similar to Easy Ease, Ease In, Ease out in After effects. The idea is that instead of linearly scaling from one seed to another, user would be able to select a pre-defined and/or custom curve that will make morphing animation faster at the beginning and slower at the end, or vice-versa, or both. Perhaps this can be better illustrated with the following image: image

Another idea is to make an actual PAUSE at the specified seeds. But since simply duplicating an image is not very entertaining, perhaps an additional value X can be added that will instruct the script to sit on the main seed for some time (Y value, selectable) but deviate randomly forwards and backwards (and sideways if you can :D) by a maximum of X steps, where X is a value from 0 to 1. With 0 being equal to repeated frames, 1 equal to insane ugly randomness and 0.1 - 0.3 - probably a usable range. So after doing this for a specified time (Y), the process would continue traveling to the next seed as before.

yownas commented 1 year ago

Maybe something like this for "easy ease in"?

https://www.wolframalpha.com/input?i=graph+%281-cos%28x%5Es*pi%29%29%2F2+from+0+to+1%2C+s%3D3

That way a strength of 3 would keep almost a static image half the way and then move over to the second seed. Setting s=1 would give you almost the same effect as in loopback. (Anything below 1 and above 3.14 (pi) would make things weird.)

EDIT: About the stopping and wiggling about at each seed. ...Yes, it would technically be possible. You could simply stop at the seed and then "travel" part way to a couple of random seeds and back before continuing to the next real one. Biggest problem is that it would add a bunch of input fields. And it is already cluttered as it is. :( But it sounds like a fun idea, so I'm not rejecting it completely.

yownas commented 1 year ago

This one is probably better. :)

Think it would produce good results between 3.14 to 10. (anything larger than 0 would "work")

yownas commented 1 year ago

Quick test with the "Easy ease", strength 5. Not sure if it is exactly the thing you were looking for, so I'll keep this ticket open. Anyone who have a good suggestion to improvements or new "curves" are free to add them. :)

https://user-images.githubusercontent.com/13150150/227282005-9c5d0c2e-290e-42d3-b3ad-5e19d670a9cb.mp4

yownas commented 1 year ago

Closing this. But if people still want to suggest curves or changes, feel free to post here.