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

Dealing with carvekit version conflicts when running "sh run.sh" #19

Open
DesarguesC opened this issue Apr 23, 2023 · 7 comments
Open

Comments

@DesarguesC
Copy link

I found it hard to deal with the environment for the fact that the version of 'carvekit' conflicts to toch==1.12.0 (To run 'run.sh', carvekit package needs torch==1.11.0. Torch will be automatically uninstalled when installing carvekit.)
However, it could be a problem with the server environment I'm using. Thus, using the following yaml file may help

name: 3DFuse

channels:

  • pytorch
  • defaults

dependencies:

  • python = 3.8.0
  • pip=20.3
  • cudatoolkit=11.3
  • pytorch=1.11.0
  • torchvision=0.12.0
  • numpy=1.22.4
  • pip:
    • gradio
    • albumentations==1.3.0
    • opencv-contrib-python==4.3.0.36
    • imageio==2.9.0
    • imageio-ffmpeg==0.4.2
    • pytorch-lightning==1.5.0
    • omegaconf==2.1.1
    • test-tube>=0.7.5
    • streamlit==1.12.1
    • einops==0.3.0
    • transformers
    • diffusers==0.11.1
    • webdataset==0.2.5
    • kornia==0.6
    • open_clip_torch==2.0.2
    • invisible-watermark>=0.1.5
    • streamlit-drawable-canvas==0.8.0
    • torchmetrics==0.6.0
    • timm==0.6.12
    • addict==2.4.0
    • yapf==0.32.0
    • prettytable==3.6.0
    • safetensors==0.2.7
    • basicsr==1.4.2
    • pydantic
    • click
    • easydict
    • tabulate
    • plotly
    • accelerate
    • carvekit
@j0seo
Copy link
Collaborator

j0seo commented Apr 23, 2023

I remember that there was an error when installing through "pip install carvekit". Have you tried "pip install git+https://github.com/Ir1d/image-background-remove-tool@2b68f5276d0f2e90f607c7845c60d2bddb79d5ba" as in here?

@DesarguesC
Copy link
Author

I remember that there was an error when installing through "pip carvekit". Have you tried "pip install git+https://github.com/Ir1d/image-background-remove-tool@2b68f5276d0f2e90f607c7845c60d2bddb79d5ba" as in here?

I've installed image-background-remove-tool, and then I install carvekit. And carvekit needs torch==1.11.0, and previous torch were automatically uninstalled, which led to the conflicts to torchvision, torchaudio and cudatoolkit version, thus cause the problem. (My device: CUDA11.7)
So I tried to create torch==1.11.0 environment from scratch.

@j0seo
Copy link
Collaborator

j0seo commented Apr 23, 2023

If I'm correct, the image-background-remove-tool is carvekit, so there's no need to run "pip install carvekit" additionally. Please let me know if I'm mistaken! (https://github.com/Ir1d/image-background-remove-tool/blob/2b68f5276d0f2e90f607c7845c60d2bddb79d5ba/setup.py#L33)

@DesarguesC
Copy link
Author

If I'm correct, the image-background-remove-tool is carvekit, so there's no need to run "pip install carvekit" additionally. Please let me know if I'm mistaken! (https://github.com/Ir1d/image-background-remove-tool/blob/2b68f5276d0f2e90f607c7845c60d2bddb79d5ba/setup.py#L33)

Module 'carvekit' do can be found in image-background-remove-tool, now 3DFuse normally works on torch==1.11.0.
That problem first occurred when I tried to run 'run.sh' (I remember I've installed image tool), the error 'no module named carvekit' was raised at that time. Maybe it's because something went wrong when installing image-background-remove-tool.

@j0seo
Copy link
Collaborator

j0seo commented Apr 23, 2023

This will be helpful to other users who are experiencing the same issue with CUDA 11.7. Thank you!

Additionally, it might be worth mentioning that running "pip install carvekit" instead of installing the forked version with "pip install git+https://github.com/Ir1d/image-background-remove-tool@2b68f5276d0f2e90f607c7845c60d2bddb79d5ba" like requirement.txt could cause issues like #6 .

In the case of CUDA 11.3 env., I just confirmed that directly installing the forked version from git does not trigger a PyTorch downgrade. https://colab.research.google.com/drive/1y8VUOekkd6cjsc7hm8iimuR4bgwMhlWK?usp=sharing

@DesarguesC
Copy link
Author

This will be helpful to other users who are experiencing the same issue with CUDA 11.7. Thank you!

Additionally, it might be worth mentioning that running "pip install carvekit" instead of installing the forked version with "pip install git+https://github.com/Ir1d/image-background-remove-tool@2b68f5276d0f2e90f607c7845c60d2bddb79d5ba" like requirement.txt could cause issues like #6 .

In the case of CUDA 11.3 env., I just confirmed that directly installing the forked version from git in https://colab.research.google.com/drive/1y8VUOekkd6cjsc7hm8iimuR4bgwMhlWK?usp=sharing does not trigger a PyTorch downgrade.

Got it, I'll continue to update the issue after retrying on CUDA11.7. Thanks for your reply.

@DesarguesC
Copy link
Author

Recently I've tried to deal with the environment on CUDA11.7, finding the method on Installation section is correct!
I infer that the problem I met before is probably caused by my wrongly dealing with some raised errors.
Anyway, 3DFuse also runs normally with torch==1.11.0 on CUDA11.3 by using yaml file given on the top of the issue.

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

2 participants