fix: prioritize VRAM over RAM in Colab, preventing out of memory issues (#1710)
* colab: balance the use of RAM enables the use of VRAM memory so as not to saturate the system RAM * feat: use --always-high-vram by default for Colab, adjust readme --------- Co-authored-by: Manuel Schmid <manuel.schmid@odt.net>
This commit is contained in:
parent
d57afc88a4
commit
532401df76
@ -12,7 +12,7 @@
|
|||||||
"%cd /content\n",
|
"%cd /content\n",
|
||||||
"!git clone https://github.com/lllyasviel/Fooocus.git\n",
|
"!git clone https://github.com/lllyasviel/Fooocus.git\n",
|
||||||
"%cd /content/Fooocus\n",
|
"%cd /content/Fooocus\n",
|
||||||
"!python entry_with_update.py --share\n"
|
"!python entry_with_update.py --share --always-high-vram\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -115,16 +115,18 @@ See also the common problems and troubleshoots [here](troubleshoot.md).
|
|||||||
|
|
||||||
### Colab
|
### Colab
|
||||||
|
|
||||||
(Last tested - 2023 Dec 12)
|
(Last tested - 2024 Mar 11)
|
||||||
|
|
||||||
| Colab | Info
|
| Colab | Info
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
[](https://colab.research.google.com/github/lllyasviel/Fooocus/blob/main/fooocus_colab.ipynb) | Fooocus Official
|
[](https://colab.research.google.com/github/lllyasviel/Fooocus/blob/main/fooocus_colab.ipynb) | Fooocus Official
|
||||||
|
|
||||||
In Colab, you can modify the last line to `!python entry_with_update.py --share` or `!python entry_with_update.py --preset anime --share` or `!python entry_with_update.py --preset realistic --share` for Fooocus Default/Anime/Realistic Edition.
|
In Colab, you can modify the last line to `!python entry_with_update.py --share --always-high-vram` or `!python entry_with_update.py --share --always-high-vram --preset anime` or `!python entry_with_update.py --share --always-high-vram --preset realistic` for Fooocus Default/Anime/Realistic Edition.
|
||||||
|
|
||||||
Note that this Colab will disable refiner by default because Colab free's resources are relatively limited (and some "big" features like image prompt may cause free-tier Colab to disconnect). We make sure that basic text-to-image is always working on free-tier Colab.
|
Note that this Colab will disable refiner by default because Colab free's resources are relatively limited (and some "big" features like image prompt may cause free-tier Colab to disconnect). We make sure that basic text-to-image is always working on free-tier Colab.
|
||||||
|
|
||||||
|
Using `--always-high-vram` shifts resource allocation from RAM to VRAM and achieves the overall best balance between performance, flexibility and stability on the default T4 instance.
|
||||||
|
|
||||||
Thanks to [camenduru](https://github.com/camenduru)!
|
Thanks to [camenduru](https://github.com/camenduru)!
|
||||||
|
|
||||||
### Linux (Using Anaconda)
|
### Linux (Using Anaconda)
|
||||||
|
Loading…
Reference in New Issue
Block a user