Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inference_IMAGdressing_controlnetinpainting.py Error in Google Colab #16

Open
devinross opened this issue Jul 22, 2024 · 2 comments
Open

Comments

@devinross
Copy link

Thank you for publishing this repo...
Running this project in the Google Colab environment with a GPU. I've successfully ran inference_IMAGdressing.py, but inference_IMAGdressing_controlnetinpainting.py is another story.

!python inference_IMAGdressing_controlnetinpainting.py --cloth_path ../tee.jpg --model_path ../person.png --model_ckpt ../drive/MyDrive/IMAGDressing-v1_512.pt

Yields the following error:

RuntimeError: Device type CUDA is not supported for torch.Generator() api.

/usr/local/lib/python3.10/site-packages/diffusers/utils/outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  torch.utils._pytree._register_pytree_node(
/usr/local/lib/python3.10/site-packages/diffusers/utils/outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  torch.utils._pytree._register_pytree_node(
Traceback (most recent call last):
  File "/content/IMAGDressing/inference_IMAGdressing_controlnetinpainting.py", line 179, in <module>
    pipe, generator = prepare(args)
  File "/content/IMAGDressing/inference_IMAGdressing_controlnetinpainting.py", line 63, in prepare
    generator = torch.Generator(device=args.device).manual_seed(42)
RuntimeError: Device type CUDA is not supported for torch.Generator() api.

Any idea on how to fix this?

Outside of installing the requirements, I've had to also install

!pip install torchvision
!pip install onnxruntime
!pip install opencv-python
!pip install matplotlib
!pip install scipy
!pip install scikit-image
!conda install pytorch torchvision cudatoolkit=11.8 -c pytorch

It would be helpful if this was included in the README.

@muzishen
Copy link
Owner

pytorch version > 2.0 ?

@awais-nayyar
Copy link

@devinross now is it running on google colab?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants