HelixNGC7293 / DeforumStableDiffusionLocal

Local version of Deforum Stable Diffusion, supports txt settings file input and animation features!
MIT License
713 stars 115 forks source link

Run Settings Documentation #4

Open StrikeNP opened 2 years ago

StrikeNP commented 2 years ago

Where can I find documentation on what each of the run settings does? Many of the options are obvious or at least semi-obvious, but many of them are also rather ambiguous. Is there documentation for these somewhere, or a parent repo that may describe them?

Veniema commented 2 years ago

If you found an answer please let me know, I cant find anything either.

StrikeNP commented 2 years ago

I haven't found an answer, but through experimentation and trial/error I've learned some things. The run settings appear to be built around the concept of frames, e.g. the parameter animation_prompts takes a dict of prompts. The number used as the key, e.g. 0,10,20 in the sample, is the frame/img that the prompt will switch/take over. That prompt will then be used until it is replaced again or until you hit the max_frames limit.

0:(#.#) Values

There are other parameters that can be listed out similarly, but they seem to take a custom comma seperated string format rather than the dict format. E.g. the sample prompt "strength_schedule":"0:(0.65)", could be lengthened to "strength_schedule":"0:(0.65),10:(0.1),11:(0.6),20:(0.1),21:(0.6)", strength schedule seems to be similar to the CFG used in traditional Stable Diffusion txt2img or the denoise factor of img2img in that it helps control how much creativity the model is permitted. Values closer to zero lead to greater changes in images, and vice versa. The strength_schedule I listed above can be used to help create new scenes. Values around 0.6 seem to be good at providing frames that look similar, but if you want to change the scene you can set the first frame to 0.1 (or some other low value) and then go back to 0.6 for the rest of that scene/prompt. This can be useful to try and generate a short and simple story such as a person standing, and then a person walking.

Zoom, Translation, and Rotation

Zoom, translation, and rotation all appear to do exactly what you'd think. I believe it works by simply moving or distorting the image to simulate movement as if a person was moving a painting around in front of a camera, and then letting the AI figure out the new perspective. It's a little confuzing which dimension correlates to which type of movement, e.g. why is there a z translation and a zoom? For those familiar with photography, note the zoom this is a digital zoom/crop. I've found it best to just fiddle with them until I get what I want.

These are the only values I've had time to play with and learn about so far. I'm looking forward to playing with this project a bit more, it looks like a lot of fun.

Veniema commented 2 years ago

Awesome, I was doing the same thing but I didn't realize the schedules were exactly that "schedules" and you could string the numbers along.

HelixNGC7293 commented 2 years ago

Good one! I'm working on a documentation for settings file

nikkwong commented 2 years ago

Can you explain the masks file or link to something that defines how to create/use them?

everyoneishappy commented 2 years ago

It's a little confusing which dimension correlates to which type of movement, e.g. why is there a z translation and a zoom?

@StrikeNP I believe zoom & angle are only applicable in 2D animation mode (but you can think of them as functionally similar to translate z and rotate z in 3D mode)

StrikeNP commented 2 years ago

@StrikeNP I believe zoom & angle are only applicable in 2D animation mode (but you can think of them as functionally similar to translate z and rotate z in 3D mode)

Interesting, I haven't messed with the other animation modes yet

StrikeNP commented 2 years ago

I can see there's a reference to variable definitions, however, when I go there, I can't seem to find any descriptions of the parameters.

You can refer to the Colab page for definition of all the variables

Zedsquared commented 2 years ago

There's a pretty good write up of the parameters here: https://dreamingcomputers.com/deforum-stable-diffusion/deforum-stable-diffusion-settings/

StrikeNP commented 2 years ago

There's a pretty good write up of the parameters here: https://dreamingcomputers.com/deforum-stable-diffusion/deforum-stable-diffusion-settings/

This is phenomenal. Thanks!!