divamgupta / stable-diffusion-tensorflow

Stable Diffusion in TensorFlow / Keras
Other
1.57k stars 227 forks source link

how to resolve depency issues? #1

Closed pi43r closed 1 year ago

pi43r commented 1 year ago

Sorry for the noob question. But is there a requirements.txt somewhere?

Running the setup.py is not working for me. How do I install all the required packages for an M1 mac?

pi43r commented 1 year ago

mhh.. this didn't work for me either :(

with conda install -c conda-forge --file requirements.txt I get the following error:

Pinned packages:
  - python 3.10.*

Encountered problems while solving:
  - nothing provides requested grpcio 1.49.0
  - nothing provides requested idna 3.4
  - nothing provides requested importlib-metadata 4.12.0
  - nothing provides requested opt-einsum 3.3.0
  - nothing provides requested protobuf 3.19.5
  - nothing provides requested tensorboard-data-server 0.6.1
  - nothing provides requested tensorflow-addons 0.17.1
  - nothing provides requested tensorflow-estimator 2.10.0
  - nothing provides requested tensorflow-io-gcs-filesystem 0.27.0
  - nothing provides requested urllib3 1.26.12
  - package qt-main-5.15.2-ha2d02b5_7 requires libclang >=12.0.0,<13.0a0, but none of the providers can be installed

with pip it gets stuck at

ERROR: Could not find a version that satisfies the requirement tensorflow-io-gcs-filesystem==0.27.0 (from versions: none)
ERROR: No matching distribution found for tensorflow-io-gcs-filesystem==0.27.0
ns23k commented 1 year ago

@pi43r what is your os?

ns23k commented 1 year ago

@pi43r you can try pip install git+https://github.com/tensorflow/io.git

pi43r commented 1 year ago

I'm using OSX Monterey on an M1 Macbook Pro with miniconda. I tried python version 3.8, 3.9 and 3.10 and none of them resolved. It seems to be an issue with tensorflow https://github.com/tensorflow/io/issues/1643

But as @divamgupta claims it's running faster on a Mac with low memory, he seems to be able to install all packages.

Edit: I could install this https://developer.apple.com/metal/tensorflow-plugin/ (Still missing some deps e.g. transformers, but trying to resolve one by one)

Edit2: Now it seems I'm getting mismatched packages... When running the imports from the notebook I get an error:

RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
...
---> 19 from tensorflow.python.client._pywrap_tf_session import *
     20 from tensorflow.python.client._pywrap_tf_session import _TF_SetTarget
     21 from tensorflow.python.client._pywrap_tf_session import _TF_SetConfig

ImportError: initialization failed

I'm giving up for now. If anyone has a working env for M1 mac I would highly appreciate their environment.yaml

sergey-rubtsov commented 1 year ago

I've created the PR with working requirements here https://github.com/divamgupta/stable-diffusion-tensorflow/pull/5