ComfyUI
ComfyUI copied to clipboard
Fix custom node blocker for multi-GPU inference using multi-processing
Why these changes are needed
We have created a set of custom ComfyUI nodes around FastVideo, a framework for multi-GPU video generation using sequence parallelism.
This fixes import failures that were occurring when child processes attempted to import modules, since spawned processes get their own Python interpreter and don't inherit the same import context as the parent process.
Custom Node: https://github.com/kevin314/ComfyUI-FastVideo
Changes
Adds the directory containing main.py to Python's module search path to ensure spawned processes from multiprocessing can correctly find and import local modules.
We don't want to have users install a comfyui fork so would like to upstream this fix
Thanks
Hello. Did you tried to modify PYTHONPATH environment variable for that, does it helps in your case?
Hey @SolitaryThinker , is this still an issue for your custom nodes to work? If so, I can take a look this weekend.
Hi thanks, we've since found a workaround for the issue. Our multi-gpu node can be found here: https://github.com/hao-ai-lab/FastVideo/tree/main/comfyui