Skip to content

feat: multi-mip sharded downsampling#192

Merged
william-silversmith merged 25 commits intomasterfrom
wms_ds_sharded_multi
Aug 20, 2025
Merged

feat: multi-mip sharded downsampling#192
william-silversmith merged 25 commits intomasterfrom
wms_ds_sharded_multi

Conversation

@william-silversmith
Copy link
Copy Markdown
Contributor

@william-silversmith william-silversmith commented Feb 19, 2025

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.

@william-silversmith william-silversmith self-assigned this Feb 19, 2025
@william-silversmith william-silversmith force-pushed the wms_ds_sharded_multi branch 2 times, most recently from 508a2f3 to 8ee7d4a Compare August 19, 2025 20:21
@william-silversmith william-silversmith marked this pull request as ready for review August 20, 2025 00:34
@william-silversmith william-silversmith merged commit 089616e into master Aug 20, 2025
4 checks passed
@william-silversmith william-silversmith deleted the wms_ds_sharded_multi branch August 20, 2025 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant