Every isolation code path in ComfyUI core is fenced behind
args.use_process_isolation or PYISOLATE_CHILD env checks. This commit
contains all scatter hooks across nodes.py, server.py, cuda_malloc.py,
comfy/hooks.py, comfy/samplers.py, comfy/model_base.py,
comfy/model_management.py, and comfy/k_diffusion/sampling.py.
Zero behavioral change when --use-process-isolation is not passed.
Integrate comfy-aimdo 0.2 which takes a different approach to
installing the memory allocator hook. Instead of using the complicated
and buggy pytorch MemPool+CudaPluggableAlloctor, cuda is directly hooked
making the process much more transparent to both comfy and pytorch. As
far as pytorch knows, aimdo doesnt exist anymore, and just operates
behind the scenes.
Remove all the mempool setup stuff for dynamic_vram and bump the
comfy-aimdo version. Remove the allocator object from memory_management
and demote its use as an enablment check to a boolean flag.
Comfy-aimdo 0.2 also support the pytorch cuda async allocator, so
remove the dynamic_vram based force disablement of cuda_malloc and
just go back to the old settings of allocators based on command line
input.