big-sleep icon indicating copy to clipboard operation
big-sleep copied to clipboard

Only possible run in colab or in Ubuntu droplet?

Open johnfelipe opened this issue 3 years ago • 16 comments

johnfelipe avatar Jul 02 '21 21:07 johnfelipe

I can run it on a local desktop. Needs a fairly powerful gpu to run though.

wolfgangmeyers avatar Jul 02 '21 22:07 wolfgangmeyers

I have windows with 3070 how can run it? Can u share cheatsheet??

El vie., 2 de jul. de 2021, 5:06 p. m., Wolfgang Meyers < @.***> escribió:

I can run it on a local desktop. Needs a fairly powerful gpu to run though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucidrains/big-sleep/issues/107#issuecomment-873277933, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFB2IZERP4DHQIAGILTTVYZ4VANCNFSM47XL27QA .

johnfelipe avatar Jul 02 '21 22:07 johnfelipe

Your card is plenty powerful enough to handle big sleep. Here is how I would proceed:

Install python: https://www.python.org/downloads/ Make sure the path to the python executable is in your PATH environment variable

For the following steps I usually run them in powershell:

Install pytorch with Cuda 11 support:

pip3 install --user torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

Install big sleep:

pip3 install --user big-sleep

Note that if you already tried installing using big-sleep before the custom pytorch install, you'll need to uninstall pytorch and reinstall using the snippet above.

You can test if it worked by using something like the following:

dream "A glowing blue orb" --max-cutouts=32 --epochs=1 --lr=0.6 --iterations=1000

That should open up an explorer window that gives you a live view of the image as it develops. Big Sleep will sometimes crash because Windows locks the file for reading when it refreshes the thumbnail that displays in explorer, so if that becomes a problem for you, you can just close the explorer window or use the --open-folder=false flag.

You can also just omit all of the command line flags to go with the defaults. Hopefully that works!

wolfgangmeyers avatar Jul 02 '21 22:07 wolfgangmeyers

If your using a python terminal: First pip install big-sleep And pip3 install --user torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

Second from big_sleep import Imagine

Third dream = Imagine( text = "(the prompt you want)", lr = 5e-2, save_every = 25, save_progress = True )

Fourth dream()

The image should save in the directory you are in as the prompt but spaces are replaced with "_"

In an IDE is similar

Install big-sleep torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 and pytorch however you do in that IDE

Put in `from big_sleep import Imagine

dream = Imagine( text = "fire in the sky", lr = 5e-2, save_every = 25, save_progress = True )

dream()` Or adapt that code to what you want it to do

EDIT: install dependencies

galaxyentity904 avatar Jul 02 '21 22:07 galaxyentity904

Is possible share a video or gif animated with steps is for my students...

El vie., 2 de jul. de 2021, 5:31 p. m., galaxyentity904 < @.***> escribió:

If your using a python terminal: First pip install big-sleep

Second from big_sleep import Imagine

Third dream = Imagine( text = "(the prompt you want)", lr = 5e-2, save_every = 25, save_progress = True )

Fourth dream()

The image should save in the directory you are in as the prompt but spaces are replaced with "_"

In an IDE is similar

Install "big-sleep" however you do in that IDE

Put in `from big_sleep import Imagine

dream = Imagine( text = "fire in the sky", lr = 5e-2, save_every = 25, save_progress = True )

dream()` Or adapt that code to what you want it to do

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucidrains/big-sleep/issues/107#issuecomment-873286334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFDMOQBEQT34KYKJVLDTVY44JANCNFSM47XL27QA .

johnfelipe avatar Jul 02 '21 22:07 johnfelipe

Yes but it would be best run in the colab as that's where everything is already sorted out for you First make a copy, then when you are in that copy you can run it like normal, then copy all the output images in the terminal to save to your device and turn into a gif. An easier was to do this is just change the last line from display(image) to image.save . keep in mind I have not tested this code. Translation Primero haga una copia, luego, cuando esté en esa copia, puede ejecutarla como de costumbre, luego copiar todas las imágenes de salida en la terminal para guardarlas en su dispositivo y convertirlas en un gif. Una forma más fácil de hacer esto es simplemente cambie la última línea de display(image) a image.save . tenga en cuenta que no he probado este código.

galaxyentity904 avatar Jul 02 '21 23:07 galaxyentity904

Can u share a video I'm new in your code

El vie., 2 de jul. de 2021, 6:49 p. m., galaxyentity904 < @.***> escribió:

Yes but it would be best run in the colab as that's where everything is already sorted out for you First make a copy, then when you are in that copy you can run it like normal, then copy all the output images in the terminal to save to your device and turn into a gif. An easier was to do this is just change the last line from display(image) to image.save . keep in mind I have not tested this code. Translation Primero haga una copia, luego, cuando esté en esa copia, puede ejecutarla como de costumbre, luego copiar todas las imágenes de salida en la terminal para guardarlas en su dispositivo y convertirlas en un gif. Una forma más fácil de hacer esto es simplemente cambie la última línea de display(image) a image.save . tenga en cuenta que no he probado este código.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucidrains/big-sleep/issues/107#issuecomment-873306974, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFATE2RXDVPCJCEOZJDTVZGBJANCNFSM47XL27QA .

johnfelipe avatar Jul 03 '21 00:07 johnfelipe

Pls share a cheatsheet video with steps is for workshop for my students...

johnfelipe avatar Jul 06 '21 05:07 johnfelipe

SNAG-0735

what i missing here?

johnfelipe avatar Jul 06 '21 17:07 johnfelipe

https://colab.research.google.com/drive/11EqIEH2TqEnfHZSSrgw-GKnmcp9fq31-?usp=sharing im completlly lose here Can u pls explain how can use your code for a workshop in my college, tnks

johnfelipe avatar Jul 06 '21 17:07 johnfelipe

Here is a notebook I edited from the Simplified Notebook to generate a gif from the images generated https://colab.research.google.com/drive/1gNcAiZtUls2evySMI4L7O6FUkdvPWUb_?usp=sharing Important Notes: SAVE_EVERY Should be 1 or around 1 (2, 3, etc) if you want to see dramatic changes Wait until it has finished before touching it after starting, or you may end up with a crowded files view and no GIF To get the GIF, open the files view it is the fourth tab down, and looks like a files button Screenshot_2021-07-06_18-36-17 Here is a GIF generated by this file

galaxyentity904 avatar Jul 07 '21 00:07 galaxyentity904

But my interest is put something like this:

A hub with innovation tree

How can do that in colab?

El mar., 6 de jul. de 2021, 7:42 p. m., galaxyentity904 < @.***> escribió:

Here is a notebook I edited from the Simplified Notebook to generate a gif from the images generated

https://colab.research.google.com/drive/1gNcAiZtUls2evySMI4L7O6FUkdvPWUb_?usp=sharing Important Notes: SAVE_EVERY Should be 1 or around 1 (2, 3, etc) if you want to see dramatic changes Wait until it has finished before touching it after starting, or you may end up with a crowded files view and no GIF To get the GIF, open the files view it is the fourth tab down, and looks like a files button [image: Screenshot_2021-07-06_18-36-17] https://user-images.githubusercontent.com/77765105/124682917-3110c300-de89-11eb-9a64-3860b9af2d36.png Here is a GIF generated by this [image: file] https://user-images.githubusercontent.com/77765105/124683244-d75cc880-de89-11eb-993a-f1ffeb1c63e4.gif

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucidrains/big-sleep/issues/107#issuecomment-875179300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFDIHGOLE4M5AHB7OCTTWOPHTANCNFSM47XL27QA .

johnfelipe avatar Jul 07 '21 01:07 johnfelipe

I believe you mean the prompt? just put it right here in TEXT: Screenshot_2021-07-06_19-05-13

galaxyentity904 avatar Jul 07 '21 01:07 galaxyentity904

There can put any dream text?

El mar., 6 de jul. de 2021, 8:06 p. m., galaxyentity904 < @.***> escribió:

I believe you mean the prompt? just put it right here in TEXT: [image: Screenshot_2021-07-06_19-05-13] https://user-images.githubusercontent.com/77765105/124684829-3c65ed80-de8d-11eb-805e-e0f25f28fdad.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucidrains/big-sleep/issues/107#issuecomment-875189859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFG4BUKE4IDBBTLINIDTWOSBNANCNFSM47XL27QA .

johnfelipe avatar Jul 07 '21 01:07 johnfelipe

Yes?

galaxyentity904 avatar Jul 07 '21 02:07 galaxyentity904

Here is a notebook I edited from the Simplified Notebook to generate a gif from the images generated https://colab.research.google.com/drive/1gNcAiZtUls2evySMI4L7O6FUkdvPWUb_?usp=sharing Important Notes: SAVE_EVERY Should be 1 or around 1 (2, 3, etc) if you want to see dramatic changes Wait until it has finished before touching it after starting, or you may end up with a crowded files view and no GIF To get the GIF, open the files view it is the fourth tab down, and looks like a files button Screenshot_2021-07-06_18-36-17 Here is a GIF generated by this file

How can download GIF or wich steps for do that?

SNAG-0006

sorry for stupid question, but i need solve this asap Stay alert

johnfelipe avatar Sep 09 '21 18:09 johnfelipe