mikael-alafriz-deel / lucid-sonic-dreams

MIT License
775 stars 158 forks source link

python setup.py egg_info did not run successfully #46

Open gusailov opened 1 year ago

gusailov commented 1 year ago

I had this in Lucid Sonic Dreams - Tutorial Notebook can someone help? ! pip install lucidsonicdreams

Collecting lucidsonicdreams
  Downloading lucidsonicdreams-0.4.tar.gz (11 kB)
  Preparing metadata (setup.py) ... done
INFO: pip is looking at multiple versions of lucidsonicdreams to determine which version is compatible with other requirements. This could take a while.
  Downloading lucidsonicdreams-0.3.tar.gz (11 kB)
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
cleancoindev commented 1 year ago

I have discoverd the root of many issues regarding lucid dreams but we'd need to actually update via the author to v5 so they can be corrected. I have found the root of the fusion bias issues many people ran into with it. I am making a post on pollination's version of it since they are responsive. I will cross link it here.

cleancoindev commented 1 year ago

Actually i tried to post an issue on theirs and i am not seeing the button for Issues, so i am going to post here.

Basically, there's a change in tensorflow v1. This package is based on tf1 as a base. It needs to be either:

A - Upgraded to Tf2. B - what the others in the community have done as a workaround: Make a pytorch version.

What this did was created a traffic jam in many workflows because many artists had done work on runway or SG2 or SG2-ADA that they wanted to continue with making video work.

They cannot because SG1 and SG2 and SG2-ADA is all TF1 based, however there was official versions released with PyTorch working.

Later, Pollinations fork also integrated SG-XL which allows the old pkl to be used, however, it cannot load or make videos with the old SG2-ADA/SG2 stuff because of the TF1 compatibility issue in luciddreams repo.

The base has to learn to aim to a new TF1 to fix the repo here and other forks of it.

My prior solution on this pollinations implimented but it also broke some things due to my lack of understandint the above.

Once i had gotten a local running version of LSD in PT2, it was able to try to load my SG2-ada pickle for example? But it would give Fusion Bias errors.

This is an entirely separate issue. I will post more below in 2nd reply.

cleancoindev commented 1 year ago

2nd issue:

Incompatibility of Runway and SG2 style pkls trained in TF1.

Solved by: Use Legacy.py.

I have a working colab for anyone if requested to post it if you need examples.

What i was able to do ws fix the VisionaryArt.pkl which is one of my favorite public models used with LSD and i was able to get a new working version in PT2. Pytorch2 was able to work with pollination's version for SG_XL once legacy converted i was able to get a notebook to output frames again.

Now LucidDreams just needs to fix the base packages based on these comprehensions! Or someone else need to post a luciddreamsv5 on NPM so it can be called from the original demo notebook.

Otherwise it has to be loaded either with or without a docker container into a Colab custom notebook at this time No Solution exists for the localized one due to the v4 of LSD being faulty due to Colab Locking down TF1 so no more tensorflow 1 can work on Colab.

cleancoindev commented 1 year ago

As for Pollinations? You guys need to upload the new model i got for VisionaryArt and you can get it working again on your version of lucid! Currrently you point to IPFS in setup to the old TF1 instead of the converted PT version via legacy.py.

cleancoindev commented 1 year ago

This was incorrect updates, and need to be regressed and undone and i can fix it to get it fully working perhaps.

https://github.com/DeFi-Coder-News-Letter/lucidsonicdreams/pull/1

IniasSomers commented 12 months ago

2nd issue:

Incompatibility of Runway and SG2 style pkls trained in TF1.

Solved by: Use Legacy.py.

I have a working colab for anyone if requested to post it if you need examples.

What i was able to do ws fix the VisionaryArt.pkl which is one of my favorite public models used with LSD and i was able to get a new working version in PT2. Pytorch2 was able to work with pollination's version for SG_XL once legacy converted i was able to get a notebook to output frames again.

Now LucidDreams just needs to fix the base packages based on these comprehensions! Or someone else need to post a luciddreamsv5 on NPM so it can be called from the original demo notebook.

Otherwise it has to be loaded either with or without a docker container into a Colab custom notebook at this time No Solution exists for the localized one due to the v4 of LSD being faulty due to Colab Locking down TF1 so no more tensorflow 1 can work on Colab.

Great work!! can you share your working colab? I brain is dead currently trying to get lucid sonic working again.. , have a great day!! :)

joh-sch commented 10 months ago

@IniasSomers I'm also trying to get LSD running again after having played with it a couple years ago. Have you managed to fix the old Colab?

IniasSomers commented 10 months ago

@IniasSomers I'm also trying to get LSD running again after having played with it a couple years ago. Have you managed to fix the old Colab?

Yes I had finally after some weeks of debugging and searching for solutions I have managed to get it working by using a mix of different solution. I found out that it original worked only on tensorflow 1.15 and the new colab is using tensorflow 2 and above so It is needed to go back to an old version of python and use tensforflow 1.15. The way I found to do this in colab was to create a virtual env using miniconda in google colab :) Here is the full code that I am using to run it. the code when you run the final part it will give errors of pytorch but it will still works and do what it needs to do ^^

Full code that I run in google colab:

%env PYTHONPATH = # /env/python

!wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh !chmod +x Miniconda3-py38_4.12.0-Linux-x86_64.sh !./Miniconda3-py38_4.12.0-Linux-x86_64.sh -b -f -p /usr/local !conda update conda

import sys sys.path.append('/usr/local/lib/python3.8/site-packages')

!conda create --name sonicstylegan-pt4 python=3.7

%%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 pip install tensorflow==1.15

%%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 git clone https://github.com/nerdyrodent/lucid-sonic-dreams.git cd lucid-sonic-dreams python setup.py install pip install tqdm pip install scipy pip install torch pip install Pillow pip install scikit-image pip install librosa==0.8.0 pip install moviepy pip install pygit2 pip install pandas pip install gdown pip install mega.py pip install click

%%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 cd lucid-sonic-dreams python lucidrun.py #(<------This is your python file you need to edit or make yourself, you can use and edit this file from the #luciddreams repo that is cloned sg2-ada-pt-song-spleeter.py)

(if you want to use the virtual env in google colab you always need to make sure you activate it again or it will not work using this line: conda activate sonicstylegan-pt4 (sonicstylegan-pt4 <--- this name can be changed in the code above if you want, it is the name of your virtual env you create in miniconda)

Goodluck and have fun! :)

cleancoindev commented 10 months ago

I found this code to not work for me due to colab errors with conda relating to not being able to initialize it but then when you run the init it works? Not sure if it need shell or what, i can share my colab so far for troubleshooting. Let me know, Inias! Thanks for your help!

please can you help me figure out what needs to be tweaked?

https://colab.research.google.com/drive/1tcJkC8P_QWNj-DbNMx1jRvqHCHcc-Dce?usp=sharing

On Fri, Jan 19, 2024 at 6:34 AM Inias Somers @.***> wrote:

@IniasSomers https://github.com/IniasSomers I'm also trying to get LSD running again after having played with it a couple years ago. Have you managed to fix the old Colab?

Yes I had finally after some weeks of debugging and searching for solutions I have managed to get it working by using a mix of different solution. I found out that it original worked only on tensorflow 1.15 and the new colab is using tensorflow 2 and above so It is needed to go back to an old version of python and use tensforflow 1.15. The way I found to do this in colab was to create a virtual env using miniconda in google colab :) Here is the full code that I am using to run it. the code when you run the final part it will give errors of pytorch but it will still works and do what it needs to do ^^

Full code that I run in google colab: %env PYTHONPATH = # /env/python !wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh !chmod +x Miniconda3-py38_4.12.0-Linux-x86_64.sh !./Miniconda3-py38_4.12.0-Linux-x86_64.sh -b -f -p /usr/local !conda update conda import sys sys.path.append('/usr/local/lib/python3.8/site-packages') !conda create --name sonicstylegan-pt4 python=3.7 %%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 pip install tensorflow==1.15 %%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 git clone https://github.com/nerdyrodent/lucid-sonic-dreams.git cd lucid-sonic-dreams python setup.py install pip install tqdm pip install scipy pip install torch pip install Pillow pip install scikit-image pip install librosa==0.8.0 pip install moviepy pip install pygit2 pip install pandas pip install gdown pip install mega.py pip install click %%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 cd lucid-sonic-dreams python lucidrun.py #(<------This is your python file you need to edit or make yourself, you can use and edit this file from the #luciddreams repo that is cloned sg2-ada-pt-song-spleeter.py)

(if you want to use the virtual env in google colab you always need to make sure you activate it again or it will not work using this line: conda activate sonicstylegan-pt4 (sonicstylegan-pt4 <--- this name can be changed in the code above if you want, it is the name of your virtual env you create in miniconda)

Goodluck and have fun! :)

— Reply to this email directly, view it on GitHub https://github.com/mikael-alafriz-deel/lucid-sonic-dreams/issues/46#issuecomment-1900732240, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPPOKT55PCE2RD7Y4ZGIQLYPKOBXAVCNFSM6AAAAAA3XCMRAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQG4ZTEMRUGA . You are receiving this because you commented.Message ID: @.***>

IniasSomers commented 10 months ago

I found this code to not work for me due to colab errors with conda relating to not being able to initialize it but then when you run the init it works? Not sure if it need shell or what, i can share my colab so far for troubleshooting. Let me know, Inias! Thanks for your help! please can you help me figure out what needs to be tweaked? https://colab.research.google.com/drive/1tcJkC8P_QWNj-DbNMx1jRvqHCHcc-Dce?usp=sharing On Fri, Jan 19, 2024 at 6:34 AM Inias Somers @.> wrote: @IniasSomers https://github.com/IniasSomers I'm also trying to get LSD running again after having played with it a couple years ago. Have you managed to fix the old Colab? Yes I had finally after some weeks of debugging and searching for solutions I have managed to get it working by using a mix of different solution. I found out that it original worked only on tensorflow 1.15 and the new colab is using tensorflow 2 and above so It is needed to go back to an old version of python and use tensforflow 1.15. The way I found to do this in colab was to create a virtual env using miniconda in google colab :) Here is the full code that I am using to run it. the code when you run the final part it will give errors of pytorch but it will still works and do what it needs to do ^^ Full code that I run in google colab: %env PYTHONPATH = # /env/python !wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh !chmod +x Miniconda3-py38_4.12.0-Linux-x86_64.sh !./Miniconda3-py38_4.12.0-Linux-x86_64.sh -b -f -p /usr/local !conda update conda import sys sys.path.append('/usr/local/lib/python3.8/site-packages') !conda create --name sonicstylegan-pt4 python=3.7 %%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 pip install tensorflow==1.15 %%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 git clone https://github.com/nerdyrodent/lucid-sonic-dreams.git cd lucid-sonic-dreams python setup.py install pip install tqdm pip install scipy pip install torch pip install Pillow pip install scikit-image pip install librosa==0.8.0 pip install moviepy pip install pygit2 pip install pandas pip install gdown pip install mega.py pip install click %%shell eval "$(conda shell.bash hook)" conda activate sonicstylegan-pt4 cd lucid-sonic-dreams python lucidrun.py #(<------This is your python file you need to edit or make yourself, you can use and edit this file from the #luciddreams repo that is cloned sg2-ada-pt-song-spleeter.py) (if you want to use the virtual env in google colab you always need to make sure you activate it again or it will not work using this line: conda activate sonicstylegan-pt4 (sonicstylegan-pt4 <--- this name can be changed in the code above if you want, it is the name of your virtual env you create in miniconda) Goodluck and have fun! :) — Reply to this email directly, view it on GitHub <#46 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPPOKT55PCE2RD7Y4ZGIQLYPKOBXAVCNFSM6AAAAAA3XCMRAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQG4ZTEMRUGA . You are receiving this because you commented.Message ID: @.>

Oh no problem! I suggest just use exactly the code I provided above and place it in different cells. Then the last part change the name of the sg2-ada-pt-song-spleeter.py inside the lucidsonicdreams folder file to --> lucidrun.py and change the content to this:

(using the last cell is the way to make the lucidrun.py file to run and the code)

from lucidsonicdreams import LucidSonicDream

L = LucidSonicDream(song = '/content/juan1.mp3', #mp3 here style = '/content/gdrive/MyDrive/sonic/VisionaryArtm.pkl') #pkl path here

L.hallucinate(file_name = '/content/test.mp4', #output path here start = 0, duration=80,
speed_fpm = 20, pulse_percussive = True, pulse_harmonic= False, pulse_react = 0.2, motion_harmonic = True, motion_percussive = False, motion_react = 0.2, fps = 24, )


You only need to change to the path to your song and your pkl file for the style :)

Good luck and have fun, if it still don't works then I will try to help you out :)