In this article
A small compressed EXR can require a large decoded allocation; file size is not a reliable training-worker memory estimate.
Budget for decoded data
A compressed render output can be small on disk while expanding into large pixel arrays. Training input workers may hold several decoded samples, transformed copies and queued batches at once. Estimate that working set before increasing worker count to keep a GPU busy. Distinguish process RAM from device memory: a model can fit on the GPU while its image-decoding stage fails in host memory before a batch reaches the device.
Inspect metadata before a full read
The Python module reference documents a header-only read that avoids allocating full pixel arrays. Inspect dimensions, part count, channel types and storage characteristics before deciding to decode a sample. Header inspection is a planning step, not an exact peak-memory measurement. Deep sample counts, decompression buffers and later transformations can add allocations beyond an estimate based only on the flat image dimensions and expected model input shape.
Use dimension limits appropriate to the deployment
The same reference describes Python dimension-limit controls introduced in version 3.5. Check the installed binding before using them. The C++ I/O guide documents corresponding image and tile limits. Configure limits before reads and keep them appropriate to legitimate data. A width-and-height ceiling does not guarantee that every accepted multipart or deep file will fit into a worker’s total memory budget under concurrent loading.
Account for representation changes
The technical introduction distinguishes channel types and image storage modes. A later conversion can increase element size or create additional arrays even when the decoded source is manageable. Include normalization, resizing, contiguous tensor copies and prefetch queues in the measurement. Avoid inferring the full cost from the final tensor alone, since temporary host allocations may coexist with decoded channels and batches waiting for transfer.
Validate under realistic concurrency
Measure peak host memory and input throughput with the intended number of workers and representative large samples. Repeat with a sample near the configured dimension boundary. The guides to render capacity and renderer compatibility provide related operational context. A useful loader configuration combines metadata preflight, documented acceptance limits and a measured concurrency budget; increasing readers should be justified by actual GPU feeding performance rather than the apparent smallness of compressed files.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.