H3 AIMDO Residency Limiter:
The H3AIMDOResidencyLimiter node is designed to optimize the memory management of the MiniMax H3 model by capping the persistent VBAR (Virtual Block Address Range) residency after each dynamic model load. This node is particularly useful for managing GPU memory efficiently, as it limits the residency of low-address VBAR pages to a specified number of block-equivalents. By doing so, it ensures that higher-address weights continue to use ComfyUI's normal streaming buffers, thereby optimizing the use of available GPU resources. This node does not affect activations, temporary streaming buffers, force-loaded weights, or the total GPU memory, making it a targeted solution for specific memory management needs. Its primary goal is to enhance the performance of dynamic VRAM (Video Random Access Memory) operations by controlling the residency of model weights, which can be crucial for maintaining smooth and efficient AI model operations.
H3 AIMDO Residency Limiter Input Parameters:
model
This parameter represents the AI model that you want to apply the residency limiter to. It is essential for the node's operation as it determines which model's memory management will be optimized. There are no specific minimum or maximum values for this parameter, as it is dependent on the model being used.
residency
The residency parameter allows you to specify the VBAR residency budget, which determines how many block-equivalents of the model's memory will be persistently resident. The options available are stock, 0 blocks, 1 block, 2 blocks, and 4 blocks, with the default being 2 blocks. Choosing stock leaves the AIMDO residency management unchanged, while the numeric options cap the low-address VBAR prefix to the specified number of largest H3 block page footprints. This parameter is crucial for controlling the memory footprint of the model and requires DynamicVRAM and async weight offloading to function effectively.
H3 AIMDO Residency Limiter Output Parameters:
model
The output parameter is the modified AI model with the applied residency limits. This output is important as it reflects the changes made to the model's memory management, ensuring that the specified residency budget is enforced. The output model will have optimized memory usage, which can lead to improved performance in dynamic VRAM scenarios.
H3 AIMDO Residency Limiter Usage Tips:
- Ensure that DynamicVRAM and async weight offloading are enabled to fully utilize the capabilities of the H3AIMDOResidencyLimiter node.
- Experiment with different
residencysettings to find the optimal balance between memory usage and model performance, especially if you are working with limited GPU resources.
H3 AIMDO Residency Limiter Common Errors and Solutions:
unknown AIMDO residency budget
- Explanation: This error occurs when an invalid residency budget is specified.
- Solution: Ensure that the
residencyparameter is set to one of the valid options:stock,0 blocks,1 block,2 blocks, or4 blocks.
H3 AIMDO Residency Limiter requires async weight offloading
- Explanation: This error indicates that async weight offloading is not enabled, which is necessary for the residency limiter to function.
- Solution: Enable async weight offloading in your setup to allow the residency limiter to operate correctly.
AIMDO applied watermark <actual_pages> pages; expected <expected_pages>
- Explanation: This error suggests a mismatch between the applied and expected watermark pages, indicating a potential issue with the residency cap.
- Solution: Verify the configuration of the residency limiter and ensure that the model supports the specified residency budget.
AIMDO residency covers <len(residency)> of <native_pages> native pages
- Explanation: This error occurs when the residency does not cover all native pages, which may lead to inefficient memory usage.
- Solution: Check the residency settings and ensure that they are appropriate for the model's memory requirements.
AIMDO left <len(resident_above)> H3 VBAR page(s) resident above the limiter watermark
- Explanation: This error indicates that some VBAR pages remain resident above the specified watermark, which could affect memory management.
- Solution: Adjust the residency budget to ensure that all pages are managed within the specified limits.
