https://github.com/comfyanonymous/ComfyUI/blob/9562a6b49e63e63a16f3e45ff4965f72385f51fa/server.py#L270-L271
This code attempts to determine whether the requested file is in the output directory. If not then it returns a 403 error. However, if the requested file is on a different drive to the output dir, then os.commonpath will raise a ValueError, because files on different drives cannot have any common components.
os.commonpath is used in a similar way in various other places.