{"record":{"id":"e2d774e1031d4f68","repo":"unslothai/unsloth","slug":"minimax-h3-needs-about-required-host-gb-0f-gb-a","errorCode":null,"errorMessage":"MiniMax-H3 needs about {required_host_gb:.0f} GB available system RAM at this VRAM tier; {host_capacity_gb:.1f} GB is available. Load the GGUF artifact instead.","messagePattern":"MiniMax-H3 needs about (.+?) GB available system RAM at this VRAM tier; (.+?) GB is available\\. Load the GGUF artifact instead\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/inference/video.py","lineNumber":5068,"sourceCode":"\n                        import psutil\n\n                        process_rss = psutil.Process().memory_info().rss\n                        host_capacity_gb = (\n                            psutil.virtual_memory().available + process_rss\n                        ) / 1_000_000_000\n                        # Same engaged components as the VRAM floor above. Sizing one from what\n                        # the load holds and the other from the released pair refuses exactly the\n                        # configuration the quantized components exist for.\n                        required_host_gb = estimate_h3_diffusers_host_ram_gb(\n                            available_vram_gb,\n                            text_encoder_gb = h3_te_resident_gb(\n                                state.text_encoder_quant, bf16_gb = H3_TEXT_ENCODER_BF16_GB\n                            ),\n                            transformer_gb = h3_transformer_resident_gb(state.transformer_quant),\n                        )\n                        if host_capacity_gb + 0.5 < required_host_gb:\n                            raise RuntimeError(\n                                f\"MiniMax-H3 needs about {required_host_gb:.0f} GB available \"\n                                f\"system RAM at this VRAM tier; {host_capacity_gb:.1f} GB is \"\n                                \"available. Load the GGUF artifact instead.\"\n                            )\n\n                # MPS seeds from the CPU generator too: diffusers reproduces a Metal seed only\n                # that way, and the pipelines move the noise to the device themselves.\n                generator_device = (\n                    \"cpu\" if fam.modular_workflow or str(state.device) == \"mps\" else state.device\n                )\n                generator = torch.Generator(device = generator_device)\n                if seed is None:\n                    seed = int(generator.seed()) % (2**53)\n                generator = generator.manual_seed(int(seed))\n\n                # The RESOLVED request, snapshotted the moment it is known, so a failure logs what\n                # actually ran rather than the caller's Nones. Without it the whole server-side\n                # record of a failed video is the exception string: #8225 reported an OOM whose","sourceCodeStart":5050,"sourceCodeEnd":5086,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/video.py#L5050-L5086","documentation":"Raised when the host-RAM floor for MiniMax-H3 in Diffusers exceeds what the machine can supply at the current VRAM tier. The required host RAM is derived from available VRAM (less VRAM means more components spill to CPU) using the same engaged component sizes as the VRAM check; capacity is psutil available memory plus this process's RSS, with a 0.5 GB tolerance. The comment explains the design: sizing one floor from what the load holds and the other from the released pair would refuse exactly the configuration quantized components exist for.","triggerScenarios":"Calling MiniMax-H3 video generation in Diffusers on a machine where psutil.virtual_memory().available + process RSS is below estimate_h3_diffusers_host_ram_gb(available_vram_gb, ...) — typically a small-VRAM GPU forcing heavy CPU offload on a host with limited free RAM, with dense (bf16) components.","commonSituations":"Running the bf16 artifact on an 8-12 GB GPU with 32 GB RAM (offload pushes the floor past capacity); leaky long-lived server processes eating available RAM; containers with low memory limits; swapping headroom miscounted because capacity includes only this process's RSS.","solutions":["Load the GGUF artifact as the message instructs — quantized resident sizes shrink both floors and the offload footprint.","Free system RAM: stop other model-holding processes or restart the studio backend so psutil available rises.","Move to a machine (or container) with more RAM for this tier.","Reduce other resident models before generating (unload unused pipelines)."],"exampleFix":"// before: dense MiniMax-H3 on 12 GB GPU / 32 GB RAM host\nengine.generate_video(prompt=\"...\", width=1280, height=720, frames=129)\n// raises: needs ~48 GB system RAM; 31.4 GB available\n\n// after: load the GGUF artifact for the same model\nengine.load_model(\"minimax-h3\", artifact=\"gguf\")\nengine.generate_video(prompt=\"...\", width=1280, height=720, frames=129)","handlingStrategy":"validation","validationCode":"import psutil\n\nHOST_SLACK_GB = 0.5\n\ndef host_ram_fits(available_vram_gb: float) -> tuple[bool, float, float]:\n    rss = psutil.Process().memory_info().rss\n    capacity_gb = (psutil.virtual_memory().available + rss) / 1e9\n    required_gb = estimate_h3_diffusers_host_ram_gb(\n        available_vram_gb,\n        text_encoder_gb=h3_te_resident_gb(state.text_encoder_quant, bf16_gb=H3_TEXT_ENCODER_BF16_GB),\n        transformer_gb=h3_transformer_resident_gb(state.transformer_quant),\n    )\n    return capacity_gb + HOST_SLACK_GB >= required_gb, required_gb, capacity_gb\n\nok, required, capacity = host_ram_fits(current_free_vram_gb)\nif not ok:\n    raise HTTPException(400, f\"needs ~{required:.0f} GB system RAM, {capacity:.1f} GB available; load the GGUF artifact\")","typeGuard":"null","tryCatchPattern":"try:\n    result = engine.generate_video(...)\nexcept RuntimeError as e:\n    if \"available system RAM\" in str(e):\n        switch_to_gguf_artifact()  # quantized components shrink both floors\n    else:\n        raise","preventionTips":["Run the host-RAM estimator whenever the VRAM tier is small (heavy offload) before submitting.","Prefer the GGUF artifact on machines under ~64 GB RAM for MiniMax-H3.","Restart the backend periodically in long-lived servers so psutil available reflects reality.","Give containers a memory limit above the estimator's worst-case floor for the loaded quant tiers."],"tags":["system-ram","minimax-h3","video-generation","preflight","diffusers","psutil"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}