{"slug": "cuda-error-out-of-memory-minimax-only", "title": "CUDA error: out of memory - (Minimax only)", "summary": "A user reports that the MiniMax H3 video generation model fails with a CUDA out-of-memory error while Wan 2.2 runs normally, citing insufficient GPU memory during VAE encoding. The error occurs in the MiniMax H3 pipeline when adding image conditions, despite memory management attempts to pin model data to RAM.", "body_md": "Hi!\n\ni only get the following error message with minimax\n\nWan 2.2 is running normal without any memory error\n\n- To create a public link, set\n`share=True`\n\nin `launch()`\n\n.\n\nLoading Model ‘ckpts\\MiniMax-H3-FL2VA-pruned_rank8_int8_convrot.safetensors’ …\n\nLoading Text Encoder ‘ckpts\\Qwen3-VL-32B-Instruct\\Qwen3-VL-32B-Instruct-layer50_quanto_bf16_int8.safetensors’ …\n\nLoading MiniMax H3 Video VAE ‘ckpts\\MiniMax-H3-video_vae_fp16.safetensors’…\n\n************ Memory Management for the GPU Poor (mmgp 3.7.12) by DeepBeepMeep ************\n\nSwitching to partial pinning since full requirements for pinned models is 51105.5 MB while estimated available reservable RAM is 26184.6 MB. You may increase the value of parameter ‘perc_reserved_\n\nmem_max’ to a value higher than 0.40 to force full pinnning.\n\nPartial pinning of data of ‘transformer’ to reserved RAM\n\nFound 200 tied weights for a total of 0.00 MB, last : blocks.49.attn.q_proj.output_scale ↔ blocks.49.attn.v_proj.output_scale\n\nThe model was partially pinned to reserved RAM: 100 large blocks spread across 18547.98 MB\n\nHooked to model ‘transformer’ (MiniMaxH3Model)\n\nAsync loading plan for model ‘transformer’ : base size of 58.22 MB will be preloaded with a 370.96 MB async circular shuttle\n\nPartial pinning of data of ‘text_encoder’ to reserved RAM\n\nUnable to pin more tensors for this model as the maximum reservable memory has been reached (5331.80).\n\nThe model was partially pinned to reserved RAM: 24 large blocks spread across 5331.80 MB\n\nHooked to model ‘text_encoder’ (Qwen3VLTextModel)\n\nAsync loading plan for model ‘text_encoder’ : base size of 1483.75 MB will be preloaded with a 465.16 MB async circular shuttle\n\nUnable to pin data of ‘vision_encoder’ to reserved RAM as there is no reserved RAM left. Transfer speed from RAM to VRAM may be slower.\n\nHooked to model ‘vision_encoder’ (Qwen3VLVisionModel)\n\nUnable to pin data of ‘vae’ to reserved RAM as there is no reserved RAM left. Transfer speed from RAM to VRAM may be slower.\n\nHooked to model ‘vae’ (ModuleDict)\n\nUnable to pin data of ‘video_encoder’ to reserved RAM as there is no reserved RAM left. Transfer speed from RAM to VRAM may be slower.\n\nHooked to model ‘video_encoder’ (ModuleDict)\n\nUnable to pin data of ‘audio_vae’ to reserved RAM as there is no reserved RAM left. Transfer speed from RAM to VRAM may be slower.\n\nHooked to model ‘audio_vae’ (MiniMaxH3AudioVAE)\n\nTraceback (most recent call last):\n\nFile “C:\\pinokio\\api\\wan.git\\app\\wgp.py”, line 7589, in generate_media\n\nsamples = wan_model.generate(\n\n^^^^^^^^^^^^^^^^^^^\n\nFile “C:\\pinokio\\api\\wan.git\\app\\models\\minimax_h3\\pipeline.py”, line 31, in wrapped\n\nreturn method(self, *args, **kwargs)\n\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “C:\\pinokio\\api\\wan.git\\app\\venv\\Lib\\site-packages\\torch\\utils_contextlib.py”, line 124, in decorate_context\n\nreturn func(*args, **kwargs)\n\n^^^^^^^^^^^^^^^^^^^^^\n\nFile “C:\\pinokio\\api\\wan.git\\app\\models\\minimax_h3\\pipeline.py”, line 407, in generate\n\nself._add_image_condition(image_start, 0, presentation, visual_latents, keyframes)\n\nFile “C:\\pinokio\\api\\wan.git\\app\\models\\minimax_h3\\pipeline.py”, line 267, in _add_image_condition\n\nlatent = self._encode_video(video)\n\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “C:\\pinokio\\api\\wan.git\\app\\models\\minimax_h3\\pipeline.py”, line 231, in _encode_video\n\nreturn self.vae.encode_condition(video.unsqueeze(0).to(device=self.device, dtype=self.vae._model_dtype), keep_all_latents=keep_all_latents).cpu()\n\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “C:\\pinokio\\api\\wan.git\\app\\venv\\Lib\\site-packages\\torch\\utils_device.py”, line 109, in **torch_function**\n\nreturn func(*args, **kwargs)\n\n^^^^^^^^^^^^^^^^^^^^^\n\ntorch.AcceleratorError: CUDA error: out of memory\n\nSearch for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information. CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with `\n\nTORCH_USE_CUDA_DSA` to enable device-side assertions.\n\nError Queue autosaved successfully to error_queue.zip", "url": "https://wpnews.pro/news/cuda-error-out-of-memory-minimax-only", "canonical_source": "https://discuss.huggingface.co/t/cuda-error-out-of-memory-minimax-only/178571#post_1", "published_at": "2026-08-11 06:33:02+00:00", "updated_at": "2026-08-11 06:43:24.164637+00:00", "lang": "en", "topics": ["generative-ai", "ai-tools", "ai-infrastructure"], "entities": ["MiniMax H3", "Wan 2.2", "CUDA", "Qwen3-VL-32B-Instruct", "MiniMax H3 Video VAE", "DeepBeepMeep"], "alternates": {"html": "https://wpnews.pro/news/cuda-error-out-of-memory-minimax-only", "markdown": "https://wpnews.pro/news/cuda-error-out-of-memory-minimax-only.md", "text": "https://wpnews.pro/news/cuda-error-out-of-memory-minimax-only.txt", "jsonld": "https://wpnews.pro/news/cuda-error-out-of-memory-minimax-only.jsonld"}}