Files
Meisoftcoltd-comfyui-sequen…/__init__.py
T
Meisoftcoltd 1c90c848e2 feat: implement deep VRAM defragmentation and PyTorch memory allocator fix
- Enforced a strict memory cleanup sequence in `MeisoftVRAMDefragmenter` (including IPC cleanup and CUDA synchronization).
- Injected `PYTORCH_CUDA_ALLOC_CONF="max_split_size_mb:128"` in `__init__.py` to prevent VRAM micro-fragmentation.
- Added `unload_detector` option to `VideoAnalyzerWithAudio` to eagerly destroy the face detector model and free VRAM.
2026-04-08 11:56:02 +00:00

48 lines
1.7 KiB
Python

import os
# Inyección algorítmica para evitar micro-fragmentación de VRAM en WanVideo
if "PYTORCH_CUDA_ALLOC_CONF" not in os.environ:
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:128"
__version__ = "1.5.1"
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
def register_node(c, display_name=None):
NODE_CLASS_MAPPINGS[c.__name__] = c
NODE_DISPLAY_NAME_MAPPINGS[c.__name__] = display_name or c.__name__
return c
# Importar tools
from . import image, loop, video, tools, vram_node
from .switch_node import MasterSwitch
NODE_CLASS_MAPPINGS.update({
"MasterSwitch": MasterSwitch,
})
NODE_DISPLAY_NAME_MAPPINGS.update({
"MasterSwitch": "🔀 Master Switch",
"MeisoftVRAMDefragmenter": "🧹 VRAM Defragmenter",
"SessionImageReceiver": "📥 Session Image Receiver",
"SessionImageSender": "📤 Session Image Sender",
"IncrementalVideoStitcher": "🎞️ Incremental Auto-Stitcher",
"VideoAnalyzerWithAudio": "🕵️ Video Analyzer Face detector + Audio",
"AutoLoopCalculator": "📊 Auto Loop Calculator",
"AutoLoopCalculatorWan": "📊 Auto Loop Calculator (WanVideo 3dVAE)",
"AutoLoopCalculatorLTX": "📊 Auto Loop Calculator (LTX 2.3)",
"SequentialLoopStart": "🏁 Loop Start (Index)",
"SequentialLoopTrigger": "🚀 Loop Trigger (Auto-Queue)",
# Tools
"AutoFPSLimiter": "⏱️ Auto FPS Limiter",
"ResTool8x": "📐 ResTool 8x (SD1.5)",
"ResTool16x": "📏 ResTool 16x (SDXL)",
"ResTool32x": "🎞️ ResTool 32x (WanVideo)",
"ResTool64x": "🎬 ResTool 64x (Hunyuan)",
"ResTool64xLTX": "🌌 ResTool 64x (LTX 2.3)",
"ConditionalAudioRouter": "🎛️ Conditional Audio Router (Bypass)",
})
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']