kohya-ss / kohya-ss/sd-scripts

Error installing requirements.txt: tensorflow 2.13.0 requires protobuf!=4.21.0 (etc.), but you have protobuf 3.19.6 which is incompatible

Open
#876 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

I'm trying to run the `main` branch on Google Colab, but I'm hitting issues with installing requirements.txt.

My installation commands:

```
!pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118
requirements_file = os.path.join(repo_dir, "requirements.txt")
!pip install --upgrade -r {requirements_file}
!pip install xformers==0.0.20
```

…and the errors I am getting:

```
Installing collected packages: voluptuous, tokenizers, tensorboard-plugin-wit, sentencepiece, safetensors, library, easygui, tensorboard-data-server, protobuf, opencv-python, lightning-utilities, ftfy, einops, huggingface-hub, transformers, google-auth-oauthlib, diffusers, tensorboard, torchmetrics, timm, accelerate, pytorch-lightning, open-clip-torch
Running setup.py develop for library
Attempting uninstall: tensorboard-data-server
Found existing installation: tensorboard-data-server 0.7.1
Uninstalling tensorboard-data-server-0.7.1:
Successfully uninstalled tensorboard-data-server-0.7.1
Attempting uninstall: protobuf
Found existing installation: protobuf 3.20.3
Uninstalling protobuf-3.20.3:
Successfully uninstalled protobuf-3.20.3
Attempting uninstall: opencv-python
Found existing installation: opencv-python 4.8.0.76
Uninstalling opencv-python-4.8.0.76:
Successfully uninstalled opencv-python-4.8.0.76
Attempting uninstall: google-auth-oauthlib
Found existing installation: google-auth-oauthlib 1.0.0
Uninstalling google-auth-oauthlib-1.0.0:
Successfully uninstalled google-auth-oauthlib-1.0.0
Attempting uninstall: tensorboard
Found existing installation: tensorboard 2.13.0
Uninstalling tensorboard-2.13.0:
Successfully uninstalled tensorboard-2.13.0
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.
tensorflow 2.13.0 requires protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3, but you have protobuf 3.19.6 which is incompatible.
tensorflow 2.13.0 requires tensorboard<2.14,>=2.13, but you have tensorboard 2.10.1 which is incompatible.
tensorflow-datasets 4.9.3 requires protobuf>=3.20, but you have protobuf 3.19.6 which is incompatible.
tensorflow-metadata 1.14.0 requires protobuf<4.21,>=3.20.3, but you have protobuf 3.19.6 which is incompatible.
```

I'm hoping to use the scripts for SDXL training, but I can't figure out a way around this protobuf version mismatch :(

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with requirements.txt and reproduce the Google Colab installation commands shown in the issue, paying attention to the TensorFlow, tensorboard, and protobuf conflicts. Done means the requirements install without the reported dependency errors and the SDXL training scripts can be used.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch, tensorflow
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.