ModuleNotFoundError: No module named 'torch.distributed.algorithms.join'

Hello Everyone,

I am trying to install and execute damo-vilab/text-to-video-ms-1.7b model on Windows EC2 Machine.

I have conda setup. I have executed following commands for the same.

  • mkdir learn_model
  • cd .\learn_model\
  • conda create -n learn python==3.8 anaconda
  • conda activate learn
  • pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  • pip install git+https://github.com/huggingface/diffusers transformers accelerate
  • pip install git+https://github.com/huggingface/transformers

I am trying to run the sample code provided with model here.

But I am facing the following error:

Traceback (most recent call last):
  File "one.py", line 2, in <module>
    from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
  File "<frozen importlib._bootstrap>", line 1039, in _handle_fromlist
  File "C:\ProgramData\anaconda3\envs\learn_model\lib\site-packages\diffusers\utils\import_utils.py", line 701, in __getattr__
    value = getattr(module, name)
  File "C:\ProgramData\anaconda3\envs\learn_model\lib\site-packages\diffusers\utils\import_utils.py", line 700, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\ProgramData\anaconda3\envs\learn_model\lib\site-packages\diffusers\utils\import_utils.py", line 712, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.pipeline_utils because of the following error (look up to see its traceback):
No module named 'torch.distributed.algorithms.join'

I am not able to figure out how to solve this.

It will be great if someone could guide here.

2 Likes

hello, Have you solved this question? I’ve coming up with the same question with you, It’s weird. :thinking:

Nope. I was not able to find anything on this.

I noticed that in pytorch2.2 version - the join.py file is located properly.
For me - upgrading to pytorch2.2 solved the issue