Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only possible run in colab or in Ubuntu droplet? #107

Open
johnfelipe opened this issue Jul 2, 2021 · 16 comments
Open

Only possible run in colab or in Ubuntu droplet? #107

johnfelipe opened this issue Jul 2, 2021 · 16 comments

Comments

@johnfelipe
Copy link

No description provided.

@wolfgangmeyers
Copy link

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

@johnfelipe
Copy link
Author

johnfelipe commented Jul 2, 2021 via email

@wolfgangmeyers
Copy link

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!

@galaxyentity904
Copy link

galaxyentity904 commented Jul 2, 2021

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

@johnfelipe
Copy link
Author

johnfelipe commented Jul 2, 2021 via email

@galaxyentity904
Copy link

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.

@johnfelipe
Copy link
Author

johnfelipe commented Jul 3, 2021 via email

@johnfelipe
Copy link
Author

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

@johnfelipe
Copy link
Author

SNAG-0735

what i missing here?

@johnfelipe
Copy link
Author

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

@galaxyentity904
Copy link

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

@johnfelipe
Copy link
Author

johnfelipe commented Jul 7, 2021 via email

@galaxyentity904
Copy link

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

@johnfelipe
Copy link
Author

johnfelipe commented Jul 7, 2021 via email

@galaxyentity904
Copy link

Yes?

@johnfelipe
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants