divamgupta / divamgupta/diffusionbee-stable-diffusion-ui
Supplied `build.sh` builds for CPU only and ignores GPU
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 727
- PR merge metrics
- No merged PRs in 30d
Description
Below is the steps I've executed, on a clean MacOS install with Xcode developer tools and Homebrew. `python3` refers to Python 3.10.7, downloaded from Python.org. **Not** using Conda/Anaconda.
```
git clone https://github.com/divamgupta/diffusionbee-stable-diffusion-ui
cd diffusionbee-stable-diffusion-ui/backends/stable_diffusion_tf
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements_m1.txt
python3 -m pip install pyinstaller
sh build.sh
```
Snippets from output:
```
422 WARNING: Unable to copy metadata for tensorflow: The 'tensorflow' distribution was not found and is required by the application
...
21557 WARNING: Unable to determine requirements for tensorflow: The 'tensorflow' distribution was not found and is required by the application
21562 WARNING: Unable to copy metadata for tensorflow-plugins: The 'tensorflow-plugins' distribution was not found and is required by the application
21667 WARNING: Unable to determine requirements for tensorflow-plugins: The 'tensorflow-plugins' distribution was not found and is required by the application
...
62622 INFO: Analyzing hidden import 'tensorflow.__internal__'
62622 ERROR: Hidden import 'tensorflow.__internal__' not found
62622 INFO: Analyzing hidden import 'tensorflow.__internal__.autograph'
62622 ERROR: Hidden import 'tensorflow.__internal__.autograph' not found
62622 INFO: Analyzing hidden import 'tensorflow.__internal__.decorator'
62622 ERROR: Hidden import 'tensorflow.__internal__.decorator' not found
62622 INFO: Analyzing hidden import 'tensorflow.__internal__.dispatch'
62622 ERROR: Hidden import 'tensorflow.__internal__.dispatch' not found
62622 INFO: Analyzing hidden import 'tensorflow.__internal__.distribute'
62622 ERROR: Hidden import 'tensorflow.__internal__.distribute' not found
62622 INFO: Analyzing hidden import 'tensorflow.__internal__.distribute.combinations'
62622 ERROR: Hidden import 'tensorflow.__internal__.distribute.combinations' not found
62622 INFO: Analyzing hidden import 'tensorflow.__internal__.distribute.interim'
62622 ERROR: Hidden import 'tensorflow.__internal__.distribute.interim' not found
62622 INFO: Analyzing hidden import 'tensorflow.__internal__.distribute.multi_process_runner'
62623 ERROR: Hidden import 'tensorflow.__internal__.distribute.multi_process_runner' not found
62623 INFO: Analyzing hidden import 'tensorflow.__internal__.eager_context'
62623 ERROR: Hidden import 'tensorflow.__internal__.eager_context' not found
...
(hundreds of similar lines)
...
PyInstaller.utils.osx.IncompatibleBinaryArchError: /Users/samuel/git/diffusionbee-stable-diffusion-ui/backends/stable_diffusion_tf/venv/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-darwin.so is incompatible with target arch arm64 (has arch: x86_64)!
```
The final error looks to be caused by the default version of protobuf from PIP being built for x86, so I replace it with one built from source:
```
python3 -m pip uninstall protobuf
python3 -m pip install --no-binary :all: protobuf==3.19.4 --ignore-installed
```
and re-run: `sh build.sh`
This time I get a binary. But when testing the binary - by starting it in terminal and using the test prompt:
```
b2py t2im {"prompt":"cat"}
```
It logs out that it's using CPU, not GPU, and is ~5x slower than the provided binary in the repo - i.e. 5.5s/it instead of 1s/it.
Any ideas anyone? This is blocking many people from contributing to the project.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.