-
-
Notifications
You must be signed in to change notification settings - Fork 407
Experimental render core with keyframe redistribution logic for Parseq. #978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Tok
wants to merge
156
commits into
deforum-art:automatic1111-webui
Choose a base branch
from
Tok:automatic1111-webui
base: automatic1111-webui
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…into separate methods and regrouped data accordingly into new tuples. Replaced some comments with samely named method calls. Prefixed some booleans with "is_" for better readability. Reorganized imports. Marked some initialization code that seems dead and added a few TODOs for further consideration and optimization.
… vars to avoid reassignments and consolidate calls.
…oper initialization.
…new module in dedicated package.
… package to render_data because, really it's all just data.
…ce side effects and to limit scopes.
… isolate and group side effects. More stuff moved to static context.
…d renamed the render package to avoid conflicts and confusion with the render module.
…d stuff and added more TODOs.
…on a button-click in PyCharm (Interpreter path pointing to standard Windows powershell dir by default, all other paths provided relative).
… prepare for reduction of complexities in method calls. render_animation method torn appart to ensure tightly scoped args and also unfroze the AnimationMode class again to allow for the late initialization of prev_flow for now.
…s that broke in the last commit. All original arguments have been taken out of scope for now. More TODOs added.
…uggled some bools.
Refactor
…s in some cases with PARSEQ_ONLY setup. Parse table printout reactivated.
…'s not confused with diffusion steps.
…xisting Parseq tab. Moved new property to parseq namespace. Reverted render core back to original and added a switch for using the new core.
…es. Conversion between PIL and numpy images extracted.
Feature/integration
…tical flows, but handling it as an experimental feature by printing a warning as it doesn't quite behave as one shoul expect and may also be quetionable in general when used in a variable cadence context.
…ess to opt_utils.
… more TODOs. Key frame data separated.
…ons on prev.image. More cleanup.
…a new bool to turn it on or off and disabled it by default.
…p to be used together with hybrid video and updated the UI text.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contains a new
rendering
package with a refactored version ofrender.py
module that may be used as an alternative to the existing render core in some conditions. It was mostly created with Parseq in mind and provides a new function to align keyframes in a way that allows for fast generation at high cadence.The conditions of whether the new core is used are defined in
render.py
at the beginning of the 'render_animation' method (this would be a good place to start reviewing the code).If the new core is used, everything is delegated to /rendering/experimental_core.py.
One of the conditions is that a new 'keyframe redistribution mode' is activated in a new dropdown on the Parseq UI tab.
If the new distribution mode is set to "off" (default setting), then the experimental render core is not called and everything else in render.py proceeds as usual.
The aim of creating the new core was mostly to reduce complexity by separating it into smaller parts and to bring it to a state where I would be able to replace the two nested main loops (frames and tween frames) and their indexes by another main loop that is doing the same thing, but by processing a collection of frame-objects that can have a variable number of (inbe)tween-frames that aren't actually diffused.
This makes it possible to realign the frames-to-actually-diffuse with the keyframes provided by the Parseq manifest. The new code related to keyframe redistribution can be found in
/rendering/data/frame/key_frame_distribution.py
For a more detailed description and some progsplaining about refactoring and stuff, you may also check this slightly outdated README that I left on an older branch: https://github.com/Tok/sd-webui-deforum/tree/feature/integration
Other things
If you have any questions, please ask away. I may also be around on discord sometimes.
I agree that my work will be granted copyright to Deforum LLC and be licensed under the terms of the GNU Affero General Public License version 3.