-
Notifications
You must be signed in to change notification settings - Fork 222
Conditional frames support update #265
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
base: master
Are you sure you want to change the base?
Conversation
This update adds optional_cond_strength to the LTXVBaseSampler which overrides strength if used, it keeps strength in there for backwards compatibility. It also adds support for optional conditional frames to the extend sampler.
The hybrid sampler allows for both being used as a base sampler and as a extend sampler, this enables an infinite video workflow that is more controllable than the LoopingSampler while still being simpler than having two separate workflows
Added the denoised created only latents as output in a way that they can be upsampled for reference purposes
This PR is working great. Much cleaner than chaining LTXVAddGuide nodes. Thank you @onzag for your contribution. |
@btakita I have some more improvements coming, but I've been testing for quite a while, I'd consider this PR outdated now until I clean up the new version which has an upscaler mechanism based on the chunk_info from the hybrid sampler. Note that there's a bug in the calculation of the Hybrid sampler in this PR which I forgot the first single frame, this is not causing errors in this specific PR but in what I was planning to follow up for upscaling. I noticed the LoopingSampler was causing quality degradation but it was truly the only way to generate longer than 30s videos, otherwise I was getting OOM errors, so I created an upscaler sampler which uses the information coming from the hybrid sampler and determines an approach for upscale depending on the size of the latents and the chunks. That saying the hybrid sampler on this PR works fine for creation and extending, it's just the output, chunk info, generated idxs, etc... The final purpose of fixing and building this workflow like that is because I am planning a future integration with opensource GIMP in order to do a small course in my community; so once I am done with this (I am almost), I will move on creating nodes for external integration in comfy, and then building a plugin for GIMP that allows comfyui integration within itself. |
This update adds optional_cond_strength to the LTXVBaseSampler which overrides strength if used, it keeps strength in there for backwards compatibility.
It also adds support for optional conditional frames to the extend sampler.
This makes it so that the functionality is better than the current LTXVLoopingSampler as it can be made step by step and deeply controlled.
I have some video output examples where I put a source video, and then a frame that goes at the end to extend the video with, this means that it achieves virtually infinite frame controlled video.
I am making this PR with the objective of review since I am puzzled with the optional_guiding_latents and why they needed to delete the overlap, it seemed unecessary as I'd assume the guiding latents to be the size of the new frames plus the overlap, however I needed to change the way the calculation was done because otherwise the output was extremely noisy and chaotic, and once I did it started working; I tested with distilled FP8 due to limitations of my setup, and guiding latents have never worked very well for me, however I plan to expand the documentation further.
I am also a bit puzzled about why the overlap is done the way it does, but the way it was done before, it caused lots of distortions once I set up a reference image.
Standard workflows should be unaffected.
This work in progress would help towards fixing issue #264
As the LoopingSampler is virtually a combination of these two samplers, with this new optional arguments, one could update and make a supercharged LoopingSampler as it would be able to take multiple conditional images accross the tiles; which allows, something very powerful, controlled animation with a storyboard based approach.
However it may be more worth it to use the base sampler and extend with a meticulous approach; as this would allow finer control than the LoopedSampler does, because you can choose what you like and what you don't in each temporal tile rather than generating all at once.
Let's work together as there's an imporant educational objective to be achieved here, trying to bring this tool to the classroom.