slooi / ImageAI-Setup-Guide

This is a step-by-step guide on how to set up ImageAI using Google's free service, Google Collab
BSD 3-Clause "New" or "Revised" License
33 stars 18 forks source link

Does it work now? #1

Closed kameronfox closed 1 year ago

kameronfox commented 1 year ago

It was was working before and it's server just says 503. Any idea dev? Help

gigachuds commented 1 year ago

im having the same problems, always 502 bad geteway

manaheti1 commented 1 year ago

It was was working before and it's server just says 503. Any idea dev? Help NovelAI DMCA strike https://github.com/github/dmca/blob/master/2022/10/2022-10-31-novelai.md

kameronfox commented 1 year ago

It was was working before and it's server just says 503. Any idea dev? Help NovelAI DMCA strike https://github.com/github/dmca/blob/master/2022/10/2022-10-31-novelai.md

is there anyway to use this any other way?

FarroTakeshi commented 1 year ago

It was was working before and it's server just says 503. Any idea dev? Help NovelAI DMCA strike https://github.com/github/dmca/blob/master/2022/10/2022-10-31-novelai.md

wow! bad news for us.Thanks for the information

manaheti1 commented 1 year ago

Nah I was wrong, It maybe was because of pytorch-lightning 1.8.0 (which was released on 1-Nov) (the version we used to use is 1.7.7). I did try to downgrade but it still not work (maybe other modules got updated too, Idk, but it still fixable).

kameronfox commented 1 year ago

Nah I was wrong, It maybe was because of pytorch-lightning 1.8.0 (which was released on 1-Nov) (the version we used to use is 1.7.7). I did try to downgrade but it still not work (maybe other modules got updated too, Idk, but it still fixable).

You are not dev right? it's slooi ? Or are you working on this too? When are you fix it?

manaheti1 commented 1 year ago

I don't think I can fix this. You should wait for slooi or you can check this (ignore the video check the comment by Shahan Mohammad, they got the similar problem to us, and some people actually got it) https://www.youtube.com/watch?v=TyIL7XjMUaw&lc=UgznDfJ-al5qQlLMKWB4AaABAg image

manaheti1 commented 1 year ago

I found the solution: change pytorch-lightning version to 1.7.7 and scikit-image>=0.19 in requirements.txt file before installing. How to do it: paste this:

import fileinput
import sys

def replaceAll(file,searchExp,replaceExp):
    for line in fileinput.input(file, inplace=1):
        if searchExp in line:
            line = line.replace(searchExp,replaceExp)
        sys.stdout.write(line)
replaceAll("requirements.txt","pytorch_lightning","pytorch_lightning==1.7.7")
replaceAll("requirements.txt","scikit-image","scikit-image>=0.19")

between %cd /content/naifu and !pip install virtualenv && bash ./setup.sh in cell 1 (I can't provide image because my PC prohibit it). Extra: In case this repo got shutdown by DMCA: Back up source code of this repo (It likes 4KB) In case 2 files (naifu.tar and animefull-latest.tar) host expired: Back up them, you can upload it on your own host.

kameronfox commented 1 year ago

I found the solution: change pytorch-lightning version to 1.7.7 and scikit-image>=0.19 in requirements.txt file before installing. How to do it: paste this:

import fileinput import sys

def replaceAll(file,searchExp,replaceExp): for line in fileinput.input(file, inplace=1): if searchExp in line: line = line.replace(searchExp,replaceExp) sys.stdout.write(line) replaceAll("requirements.txt","pytorch_lightning","pytorch_lightning==1.7.7") replaceAll("requirements.txt","scikit-image","scikit-image>=0.19")

between %cd /content/naifu and !pip install virtualenv && bash ./setup.sh in cell 1 (I can't provide image because my PC prohibit it). Extra: In case this repo got shutdown by DMCA: Back up source code of this repo (It likes 4KB) In case 2 files (naifu.tar and animefull-latest.tar) host expired: Back up them, you can upload it on your own host.

Ummm... I'm completely new to this coding stuff. Can you be more detailed? Like any video guide would be helpful.

Step by step tutorial pls.

manaheti1 commented 1 year ago

It just only paste nothing much: Step 1: follow main page introduction until Step 3 (Enable GPU) image Step 2: paste the code between %cd /content/naifu and !pip install virtualenv && bash ./setup.sh REMEMBER TO ARRANGE CODE TO LOOK EXACT LIKE THE IMAGE (Python is strict in this problem) image Step 3: follow main page introduction from Step 4 onward image

kameronfox commented 1 year ago

It just only paste nothing much: Step 1: follow main page introduction until Step 3 (Enable GPU) image Step 2: paste the code between %cd /content/naifu and !pip install virtualenv && bash ./setup.sh REMEMBER TO ARRANGE CODE TO LOOK EXACT LIKE THE IMAGE (Python is strict in this problem) image Step 3: follow main page introduction from Step 4 onward image

Wow this actually work! Thanks you so much mate!

Thanks for detailed instuction. Well it was super easy XDD. But couldn't figure where to find those texts.

hahaxddd18 commented 1 year ago

Nice. I've made a backup of the colab and the naifu/animefull-latest archives on my gdrive.
It seems like it will be gone soon, judging from the other dmca'd repos.

kameronfox commented 1 year ago

Nice. I've made a backup of the colab and the naifu/animefull-latest archives on my gdrive. It seems like it will be gone soon, judging from the other dmca'd repos.

  1. Can i have access to that colab?
  2. AAlso if possible can you run it by myself just like you? backing up on my gdrive and run later? If so how to do it?
  3. Can you run it on your pc?
  4. What is it exactly? T.T i've no idea what it is other than it generates images, Is it a exe or where it downloads those 7gb file etc.
manaheti1 commented 1 year ago

Here is how to backup repo image then this image Your old repository’s clone URL: URL of this repo: https://github.com/slooi/ImageAI-Setup-Guide/ Repository Name: something that no one will notice I think you must set repo privacy to public in order to run it on Google collab.

Link to download 2 files: novelAI: https://pub-2fdef7a2969f43289c42ac5ae3412fd4.r2.dev/naifu.tar model: https://pub-2fdef7a2969f43289c42ac5ae3412fd4.r2.dev/animefull-latest.tar

Run it on PC Yes you can, just execute code of this repo on your PC (on cell 1 you don't need download part since it already on your PC, but you still need Modules for Python (only once)) after that you only needed to run cell 2. But you need a strong GPU.

Second Plan The guys who uploaded NovelAI on github that got DMCA striked actually not that sorry. https://www.youtube.com/watch?v=TyIL7XjMUaw&t=225s In this video he send us a txt file that got encrypted and a tool to decrypt decrypt that txt file into ipynb and we can run his version of novelAICollab.

If anything unclear, you should ask your IT friends, they can help you with this.

Redir1 commented 1 year ago

Hello, is it possible make ai draw better hands? also any way to make nai work with stable 1.5? or it's already updated?

manaheti1 commented 1 year ago

Hello, is it possible make ai draw better hands? also any way to make nai work with stable 1.5? or it's already updated? put "bad hand" into Undesired tag. try looking on reddit NovelAI thread for prompts like "finely detail beautiful hand" like that, maybe it will help. This version is the leak version and not up to date with current version running on NovelAI official website. "work with stable 1.5" you mean running diffusionAI with NovelAI models? It just existed yesterday but the result is terrible so the creator delete it.

hahaxddd18 commented 1 year ago

I didn't make a backup of the github repo as this repo only stores the ipynb file, which you can just make a backup of on google drive itself. It's like 5kb or something. But what the other person did also works fine. I first used this https://colab.research.google.com/drive/1LF2a4tY-bnyWJEbUeblv21nVuNDopNzQ to download the two .tar files onto a brand new google account instead of downloading it and then uploading it manually. That notebook does it for you.
Save it anywhere, it doesn't matter. Make the accessibility for naifu.tar and animefull-latest.tar to open so your colab can download it. Don't share it though, the file will get rate limited, just make your own copy.
Then install gdown using !pip install gdown Then use gdown to download the file from your drive as following: !gdown https://drive.google.com/u/2/uc?id=xxx !gdown https://drive.google.com/u/2/uc?id=yyy. instead of using aria2c (you can comment that part out or delete it). (more on gdown here) Everything else will be the same. The download speeds were from 70MB/s all the way upto 200MB/s. Average being around 110MB/s. Now if I could only figure out how to use Localtunnel instead of using Cloudflare.

I could edit the naifu.tar file and change the requirements.txt too but thats honestly too much work. Using the code above (ty) is much easier lol
Screenshots: The code will look something like this Screenshot (5)

Naifu SS Screenshot (4)

lumibliss commented 1 year ago

I didn't make a backup of the github repo as this repo only stores the ipynb file, which you can just make a backup of on google drive itself. It's like 5kb or something. But what the other person did also works fine. I first used this https://colab.research.google.com/drive/1LF2a4tY-bnyWJEbUeblv21nVuNDopNzQ to download the two .tar files onto a brand new google account instead of downloading it and then uploading it manually. That notebook does it for you. Save it anywhere, it doesn't matter. Make the accessibility for naifu.tar and animefull-latest.tar to open so your colab can download it. Don't share it though, the file will get rate limited, just make your own copy. Then install gdown using !pip install gdown Then use gdown to download the file from your drive as following: !gdown https://drive.google.com/u/2/uc?id=xxx !gdown https://drive.google.com/u/2/uc?id=yyy. instead of using aria2c (you can comment that part out or delete it). (more on gdown here) Everything else will be the same. The download speeds were from 70MB/s all the way upto 200MB/s. Average being around 110MB/s. Now if I could only figure out how to use Localtunnel instead of using Cloudflare.

I could edit the naifu.tar file and change the requirements.txt too but thats honestly too much work. Using the code above (ty) is much easier lol Screenshots: The code will look something like this Screenshot (5)

Naifu SS Screenshot (4)

You guys are amazing, thanks so much for sharing!!

I'm also interested to know, instead of using cloud flare link, to use own local host network...

If someone knows , please share

manaheti1 commented 1 year ago

"instead of using cloud flare link, to use own local host network...' Nope you are using the Google Collab host to run the script not the PC you are using, unless you download the script and run the code on your PC then you can use localhost network. But it not optimal.

manaheti1 commented 1 year ago

I didn't make a backup of the github repo as this repo only stores the ipynb file, which you can just make a backup of on google drive itself. It's like 5kb or something. But what the other person did also works fine. I first used this https://colab.research.google.com/drive/1LF2a4tY-bnyWJEbUeblv21nVuNDopNzQ to download the two .tar files onto a brand new google account instead of downloading it and then uploading it manually. That notebook does it for you. Save it anywhere, it doesn't matter. Make the accessibility for naifu.tar and animefull-latest.tar to open so your colab can download it. Don't share it though, the file will get rate limited, just make your own copy. Then install gdown using !pip install gdown Then use gdown to download the file from your drive as following: !gdown https://drive.google.com/u/2/uc?id=xxx !gdown https://drive.google.com/u/2/uc?id=yyy. instead of using aria2c (you can comment that part out or delete it). (more on gdown here) Everything else will be the same. The download speeds were from 70MB/s all the way upto 200MB/s. Average being around 110MB/s. Now if I could only figure out how to use Localtunnel instead of using Cloudflare.

I could edit the naifu.tar file and change the requirements.txt too but thats honestly too much work. Using the code above (ty) is much easier lol Screenshots: The code will look something like this

Wow I didn't know google drive can download that fast, Thank you. Now I can use NovelAI until the end of time.

hahaxddd18 commented 1 year ago

Wow I didn't know google drive can download that fast, Thank you. Now I can use NovelAI until the end of time.

No worries, I only learnt about it when I was using koboldai.

Hopefully this repo wont dmca'd (it probably will) EDIT: Maybe there's a slight problem lol....gdrive won't let me download the file again. I guess i'm being rate limited. Getting another host is probably a good solution for continuous usage.

EDIT2: OR just do this instead of gdown as it will cause the file to get rate limited.

from google.colab import drive
drive.mount('/content/drive')
%cd /content/drive/My Drive/naifu/

!echo "Decompressing..."
!tar xf naifu.tar --directory /content/
!echo "Done."

There is no download bar but it downloads. Don't forget to remove the rm statement so it wont just delete it from your gdrive like it did for me cause i'm stupid. Basically code will look like this in the end: final code Much safer than whatever the hell I said earlier and it makes much more sense too. Although the code is still hacky lol

lumibliss commented 1 year ago

What is the difference between the NAIFU file and anime latest? Do we really need them both?

Redir1 commented 1 year ago

Hello, is it possible make ai draw better hands? also any way to make nai work with stable 1.5? or it's already updated? put "bad hand" into Undesired tag. try looking on reddit NovelAI thread for prompts like "finely detail beautiful hand" like that, maybe it will help. This version is the leak version and not up to date with current version running on NovelAI official website. "work with stable 1.5" you mean running diffusionAI with NovelAI models? It just existed yesterday but the result is terrible so the creator delete it.

Damn, sad to hear, will leaked version gets update someday?

slooi commented 1 year ago

I don't think I can fix this. You should wait for slooi or you can check this (ignore the video check the comment by Shahan Mohammad, they got the similar problem to us, and some people actually got it) https://www.youtube.com/watch?v=TyIL7XjMUaw&lc=UgznDfJ-al5qQlLMKWB4AaABAg image I recently updated the repo with that solution