After thorough testing of generation directly, I verified that it can handle tile sizes of 8. If this tile size is not met, animation does now work correctly because the images coming out of generation don't match the specified dimensions, making the prev_img wrong, which makes animation warping wrong.
Previous tile size of 64 was legacy, from notebook, and old auto1111 I believe. But, the pipeline can handle divisors of 8, verified. However, still not sure if the images produced are as good as when you use the 64 tile size, which is the size of the latent representation.
In any case, there was no limit on this before, and with these changes, it will assure that animation is always accurate. Suggest leaving slider at increments of 64. But, now if they select a dimension manually, it will be properly forced to tile size of 8, to ensure proper sizing through the engine.
Overlay mask working properly with static mask or video mask.
- made new masks.py file that we can use to consolidate other mask functions from main render code
- Overlay mask NOW WORKS WITH CADENCE. I made the function switchable between PIL rgb and np bgr and inject the function during cadence and for normal saves
- I didn't use old code. I just made this work myself.
Fixed one-off issue with hybrid video where the first frame was duplicated. (it became obvious when doing overlay video masking)
re-commented a few lines, removed some whitespace
This was an afterthought, and after further testing, I don't think it's working quite right. I'm not sure why, but removing for now. Will re-examine later.
I accidentally had color matching against video on instead of LAB at first when I was testing, so I didn't see it. Maybe I just need to convert to BGR?
Anyway, this restores the previous behavior of color matching, where if it resumes, it just matches against the prev_img.
Now requires at least two actual frames to resume, but it works.
So,
at cadence 1, you need 2 frames
at cadence 3, you need 3 frames
at cadence 10, you need 10 frames
etc.
It gets the first and last frames, reads them, and feeds them to cadence cycle properly for turbo_prev_img AND turbo_next_img, then it recreates the last frame cycle.
It automatically accounts for cadence interruptions, like if you ran out of disk space during cadence or it got interrupted. (or you delete the last few frames or whatever)
Basically, I can't make it fail now, no matter how many times I resume, or how many random frames I delete going backwards before resuming.
Try it out!
I did consider saving out any frames that were recreated, but then realized that has it's own issues with possible duplicates as well, and after testing, I just don't think it's necessary either. It works, every time, as far as I can tell.