lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
40.65k stars 5.68k forks source link

Can We Install Fooocus on Google Drive / Colab just like Auto1111 and ComfyUI #423

Closed Hearcharted closed 9 months ago

Hearcharted commented 1 year ago

Hi, can we install Fooocus on Google Drive / Colab just like Auto1111 and ComfyUI ?

As far as I can see, Foocus is running in this "per Session" base, so when you end the Session you lose every uploaded file...

Many thanks in advance...

@lllyasviel

barepixels commented 1 year ago

You are no longer allowed to use Auto1111 and ComfyUI on Colab

Hearcharted commented 1 year ago

The free tier got nuked, but I'm using the paid one.

barepixels commented 1 year ago

scroll down till you see Fooocus Colab (Official Version) https://github.com/lllyasviel/Fooocus

Hearcharted commented 1 year ago

Got ya, I'm already using it on Google Colab. But, I need to install it on Google Drive, just like you install Comfy and Auto1111. I need it to start "Living Inside Google Drive" Forever and Ever (O_O) Thank you...

TimothyAlexisVass commented 1 year ago

Hearcharted: Then you'll have to modify the Colab as per your requirement, which could be as easy as this:

from google.colab import drive
drive.mount('/content/drive')
%cd /content/drive/MyDrive/
!git clone https://github.com/lllyasviel/Fooocus
!pip install pygit2==1.12.2
!python /content/drive/MyDrive/Fooocus/entry_with_update.py --share
barepixels commented 1 year ago

If you didn't notice camenduru wrote the codes for Colab. Try contacting camenduru at https://github.com/camenduru/Fooocus-colab

Hearcharted commented 1 year ago

@TimothyAlexisVass @barepixels

Thank you, I'm going to save this trick...

KitsonBroadhurst commented 9 months ago

Figured this out. I wrote some code in colab and did a quick tutorial on YouTube

Sjnjerak commented 9 months ago

Thank you, Kitson! I wanted to start running Fooocus on cloud GPUs and this seems like a great way to do it.

MXTcomunica commented 7 months ago

Thank you @KitsonBroadhurst, I duplicated your notebook in Colab, but the following error occurs:

Error Unexpected token '<', " <!DOCTYPE "... is not valid JSON

immagine

And then the runtime crashes warning an error similar to "Not allowed code/operation has been detected"...

What could it be?

mashb1t commented 7 months ago

@MXTcomunica please use the officially supported playbook in https://colab.research.google.com/github/lllyasviel/Fooocus/blob/main/fooocus_colab.ipynb

MXTcomunica commented 7 months ago

Yeah I already used the official Fooocus playbook @mashb1t, but the one provided by @KitsonBroadhurst allows you to mount your Gdrive to have persistent data, so to not lose your generated images, to use your own custom settings/wildcards, and to use your own models/loras without the need to re-download them every time.

It would be nice if the official playbook also provided a similar wrapper.

mashb1t commented 7 months ago

Got it, thx. When you ran https://colab.research.google.com/drive/18zNcbJV9r2Rxkb4UkY0YhjzMvj1wFMy0 you might just have encountered a timeout and the console log may give you more information about the status.