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

Encountered some issues during the installation and configuration process #4

Open
rnqm opened this issue Apr 3, 2024 · 7 comments
Open

Comments

@rnqm
Copy link

rnqm commented Apr 3, 2024

I really appreciate your work. I have encountered some problems:

  1. In install_dependencies.sh, suggest changing to 'python3.10 -m venv venv', otherwise Python 3.11 version may be used
  2. Missing 'pip install - r requirements all. txt' in README.md
  3. The contradiction between expect==4.9.0 and expect==4.8.0 in requirements_all.txt needs to be resolved by removing the version number
  4. There is an issue with the 'pip install torch==2.1.0+cu118' command in requirements_all.txt. Remove the '+cu118' command to resolve the issue
  5. There is an issue with the 'pip install xformers==0.0.22.post7+cu118' command in requirements_all.txt. Remove the '+cu118' command to resolve the issue
  6. There is an issue with the 'pip install requests==2.25.1' command in requirements_all.txt
    The conflict is caused by:
    The user requested requests==2.25.1
    datasets 2.15.0 depends on requests>=2.19.0
    diffusers 0.23.1 depends on requests
    gradio 4.3.0 depends on requests~=2.0 (conflicts, uninstall and reinstall, if not specify version, default to 4.24.0)
    gradio-client 0.7.0 depends on requests~=2.0 (conflicts, uninstall and reinstall, if not specify version, default to 0.14.0)
    huggingface-hub 0.19.4 depends on requests
    jupyterlab-server 2.25.2 depends on requests>=2.31 (conflict, uninstall but all versions to select have conflicts that cannot be resolved)
    torchattacks 3.5.1 depends on requests~=2.25.1
  7. There is an issue with the 'python-multipart==0.0.6' command in requirements all. txt
    The conflict is caused by:
    The user requested python-multipart==0.0.6
    gradio 4.24.0 depends on python-multipart>=0.0.9 (conflicts, uninstall and reinstall, if not specify version, default to 0.0.9)
  8. Missing 'pip install -e .' in REAME.md, The following commands should be executed using 'wmbench' (according to another issue)
  9. Need to rename folder 'scripts' to 'dev_scripts' to match cli.py
  10. Is there a code for subsample the high-quality 5,000 image subset? I want to subsample 5000 high-quality subset images for DiffusionDB. And for the MS-COCO link, most of the 5000 images do not have prompts. And the DALL·E3 link is invalid.
  11. Could you please explain in detail the use of the wmbench command for each module? Including chmod, decode, metric, reverse, space, status. Is reverse only used for Tree-Ring? For distortions, regeneration, adversarial, do we need to run three modules respectively since thay are not integrated in cli.py?
  12. For detailed documentation on each component, refer to the corresponding README files within each directory. However, I can't find README files within each directory.
  13. Missing set DATA_DIR, MODEL_DIR, TORCH_HOME, HF_HOME, LD_LIBRARY_PATH in REAME.md.
  14. When I run 'wmbench space', I found that it is necessary to configure RESULT_DIR, GITHUB_TOKEN, REPO_URL, and BRANCH_NAME so it is better to add them in README.md. And what should I set these four environment variables to?
  15. When I set DATA_DIR and RESULT_DIR and run 'wmbench status', it report an error saying no such file '-status.json', I want to know how to write -status.json.
  16. May I ask how to use stable_signature.onnx and stega_stamp.onnx?
    Thanks very much!
@johnding1996
Copy link
Collaborator

johnding1996 commented Apr 10, 2024

Very sorry for our late replay. Thank you so much for your patience. Let us first resolve the dependency part. Please useshell_scripts/install_dependencies.sh as the main reference, and feel free to adjust CUDA and PyTorch versions since we do not strictly require CUDA 11.8 and PyTorch 2.1.0. Please do not use requirements_all.txt as it is frozen and generated from a working virtualenv but the requirements are too strict. As indicated in setup.py, please use requirements_cli.txt instead of requirements_all.txt, as a second reference. Are you able to go through the dependency installation part now? We will improve the documentation accordingly.

@rnqm
Copy link
Author

rnqm commented Apr 11, 2024

Thanks for your reply. For the dependency part, I removed the venv directory and run bash shell_scripts/install_dependencies.sh again, but there are still two errors:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchattacks 3.5.1 requires requests~=2.25.1, but you have requests 2.31.0 which is incompatible.
jupyterlab-server 2.26.0 requires requests>=2.31, but you have requests 2.25.1 which is incompatible.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xformers 0.0.25.post1+cu118 requires torch==2.2.2, but you have torch 2.1.0 which is incompatible.
torchaudio 2.1.0+cu118 requires torch==2.1.0, but you have torch 2.2.2+cu118 which is incompatible.
torchvision 0.16.0+cu118 requires torch==2.1.0, but you have torch 2.2.2+cu118 which is incompatible.

However, all instructions can be successfully executed, but I'm not sure if there will be any problems after that.
For the second error, I found that -U will download the latest version of xformers 0.0.25.post1+cu118. If I modify the torch version to adapt to xformers 0.0.25.post1+cu118, other problems will arise. So I change to pip install xformers==0.0.22.post7 --index-url https://download.pytorch.org/whl/cu118 according to requirements_all.txt. Therefore the second error was solved.
For the first error, I don't know if it's better to set the requests version to 2.31.0 to adapt to jupyterlab-server 2.26.0 or set the requests version to 2.25.1 to adapt to torchattacks 3.5.1. According to requirements_all.txt, the version of jupyterlab-server is 2.25.2 but also requires requests>=2.31. I think we should adjust the jupyterlab-server version, but I'm not sure what version to set it to.
And fortunately, I ran pip install -r requirements_cli.txt without encountering any errors.

@johnding1996
Copy link
Collaborator

Grad to know that you can run pip install -r requirements_cli.txt without error, this requirements_cli.txt encompass all requirements for cli while requirements_all.txt may contain more requirements that is not needed. Please use requirements_cli.txt instead of requirements_all.txt.

@rnqm
Copy link
Author

rnqm commented Apr 12, 2024

Before I run pip install -r requirements_cli.txt, I ran bash shell_scripts/install_dependencies.sh and there were two errors I'm not sure if there will be any problems after that. I changed the xformers version to 0.0.22.post7 and I don't know what version of torchattacks, jupyterlab-server and requests should be used to solve the errors in my last comment. Meanwhile, are there any solutions about 8 to 16 in my first comment? Thanks!

@johnding1996
Copy link
Collaborator

Sorry for our delay in response. Sorry, our xformers version is hard-coded, please freely adjust that to accommodate your CUDA and PyTorch versions.

Regarding the 8th point. Yes after installing with pip install -e ., you can run with wmbench <command_name> and please use wmbench --help and read the cli.py for available commands and features. We will improve the documentation to address this.

Regarding the 16th point. The stable_signature.onnx and stega_stamp.onnx are ONNX versions of the watermark decoder of Stable Signature and StegaStamp watermarked. We did not train those decoders, but convert from the official checkpoints for ease of application. You can find how we use those models in scripts/decode.py as a reference.

@rnqm
Copy link
Author

rnqm commented Apr 25, 2024

OK. Thank you. I got it.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchattacks 3.5.1 requires requests~=2.25.1, but you have requests 2.31.0 which is incompatible.
jupyterlab-server 2.25.2 requires requests>=2.31, but you have requests 2.25.1 which is incompatible.

Should I ignore this error?

@johnding1996
Copy link
Collaborator

Yes, you can safely ignore this error. If you are not using jupyterlab, you can also uninstall jupyterlab-server.

Thanks for letting us know about the detailed dependency and documentation problems. Following your suggestions, we will try to simplify the installation and add more relevant instructions.

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