feat: multi-mip sharded downsampling#192
Merged
william-silversmith merged 25 commits intomasterfrom Aug 20, 2025
Merged
Conversation
508a2f3 to
8ee7d4a
Compare
ec0aa81 to
a483495
Compare
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
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.
Multi-mip sharded downsampling. Previously, only a single mip could be generated at a time.
The previous algorithm read 1-2 z chunks at a time, downsampled, and built a single shard. This allowed for reasonable memory consumption.
This new algorithm reads 1-2 chunks at a time, downsamples them, and stores them compressed in a dictionary. With more mip levels, the amount of image data grows tremendously, but for lossy compressed images or segmentation, compression will give a sufficient compression factor for this to be reasonable. E.g. segmentation can compress hundreds of times, lossy images can compress maybe 4-5x.
For losslessly compressed images, expect very large memory usage if using num_mips > 2. E.g. 16 + 4 + 1 = 21 shards * 0.7 = 14.7x.