ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Fix custom node blocker for multi-GPU inference using multi-processing

Open SolitaryThinker opened this issue 6 months ago • 1 comments

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

SolitaryThinker avatar May 24 '25 22:05 SolitaryThinker

Hello. Did you tried to modify PYTHONPATH environment variable for that, does it helps in your case?

bigcat88 avatar May 25 '25 05:05 bigcat88

Hey @SolitaryThinker , is this still an issue for your custom nodes to work? If so, I can take a look this weekend.

Kosinkadink avatar Aug 21 '25 22:08 Kosinkadink

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

SolitaryThinker avatar Aug 21 '25 23:08 SolitaryThinker