Add resolution slider (from 240 -> 720 in 16-step increments)#158
Add resolution slider (from 240 -> 720 in 16-step increments)#158brandon929 wants to merge 3 commits intolllyasviel:mainfrom
Conversation
…of a dropdown; update bucket options for "any" resolution handling in bucket_tools.
|
I found that the calculated resolution doesn't match the input resolution from UI, so I used a little hack: This increments input value by 16 until the resulting resolution height matches the input. I'm weak at math (and bad at Python programming 😸), so I'd appreciate some advice on how to avoid this awful brute-force loop. upd.: New hack code, added portrait orientation support. |
|
FramePack currently generates videos that, if you have a square image, is roughly 640x640. If you have a different aspect ratio, it alters the actual image resolution to approximate that aspect ratio without really changing the pixel count. This PR maintains that same logic, but lets you adjust the pixel count with the resolution mapping to approximately what the X and Y dimension would be if you have a square image. I think this is a pretty good user experience as you can drop in nearly any photograph and get consistent performance no matter the aspect ratio. |
Oh, I see now. Thank you for the clarification! |
used some code from those PR, thanks to their respective authors : lllyasviel#167 lllyasviel#178 lllyasviel#158
used code from lllyasviel#158
This incorporates the changes from @rkfg in #69 and adds the ability to support "any" resolution instead of a few predefined buckets.
This uses the buckets defined in the original implementation for "640" resolution as the source-of-truth for calculating aspect ratios for other resolution buckets.