castorini / daam

Diffusion attentive attribution maps for interpreting Stable Diffusion.
MIT License
689 stars 63 forks source link

Requires-Python >=3.10 error #5

Closed amrrs closed 1 year ago

amrrs commented 1 year ago

I'm running Python 3.8 and also tried to install daam on Google Colab, but I'm facing this error

daemon commented 1 year ago

Is it possible for Colab users to upgrade to Python 3.10? If not, I can look into downgrading the codebase to 3.8 and also provide a Colab notebook; it wouldn't be difficult.

amrrs commented 1 year ago

@daemon Thanks. Does it work well for you directly from PyPI on Python 3.10?

daemon commented 1 year ago

Yep, make sure to do pip install -U daam to get the latest version.

Trisanu-007 commented 1 year ago

I think downgrading can be a good option, upgrading python in Colab is hell.

daemon commented 1 year ago

@Trisanu-007 does this work? https://www.youtube.com/watch?v=J2WtkA1Xfew

As well as https://github.com/amrrs/stable-diffusion-interpretation-colab

resnant commented 1 year ago

Hi, @daemon Thanks for the nice work! I also tried to use DAAM but gave up because it would take a whole day to set up Python 3.10 in my environment. Considering Python 3.8 is still used in major official Docker images incl. pytorch/pytorch and nvcr.io/nvidia/pytorch not only Google Colab, I think supporting python >=3.8 is a good option.

As well as https://github.com/amrrs/stable-diffusion-interpretation-colab

This notebook didn't work for me. 😢

Edit: I built a docker image and it worked. Here is my Dockerfile:

FROM python:3.10

RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
RUN pip install scikit-image diffusers==0.3.0 spacy gradio ftfy transformers==4.24.0 pandas numba nltk inflect joblib jupyterlab ipython daam
daemon commented 1 year ago

Okay, got it. I'll be downgrading it to 3.8 in the next major release. Thanks for bringing it up!

Trisanu-007 commented 1 year ago

@daemon Thanks for reply. I am sorry for the late response. Yes, the links are alright, but we are running this via offline device, considering which python 3.8 (>=) might be a good idea. I see that you have decieded to downgrade. Thank you very much !

daemon commented 1 year ago

Now downgraded to Python 3.8.