magicfixeseverything
commited on
Commit
·
93fe395
1
Parent(s):
0bec732
Upload 2 files
Browse files- ai_image_creation.zip +2 -2
- app.py +17 -13
ai_image_creation.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2df6b9c164617cb0b1049c1e54f22b8c0cafb92c8e2b87b31c1bfa3c273a5e21
|
3 |
+
size 25018
|
app.py
CHANGED
@@ -591,19 +591,6 @@ number_of_reserved_tokens = 2
|
|
591 |
###############################################################################
|
592 |
###############################################################################
|
593 |
|
594 |
-
hugging_face_hub_is_offline = 0
|
595 |
-
|
596 |
-
if (
|
597 |
-
("HF_HUB_OFFLINE" in os.environ) and
|
598 |
-
(int(os.environ["HF_HUB_OFFLINE"]) == 1)
|
599 |
-
):
|
600 |
-
|
601 |
-
hugging_face_hub_is_offline = 1
|
602 |
-
|
603 |
-
if hugging_face_hub_is_offline == 0:
|
604 |
-
|
605 |
-
print ("Note: The Hugging Face cache directory does not automatically delete older data. Over time, it could eventually grow to use all the space on the drive it is on. You either need to manually clean out the folder occasionally or see Instructons.txt on how to not automatically update data once you have downloaded everything you need.")
|
606 |
-
|
607 |
|
608 |
|
609 |
try:
|
@@ -632,6 +619,23 @@ If you would like to download this app to run offline on a Windows computer that
|
|
632 |
|
633 |
|
634 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
if device == "cuda":
|
636 |
|
637 |
PYTORCH_CUDA_ALLOC_CONF = {
|
|
|
591 |
###############################################################################
|
592 |
###############################################################################
|
593 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
594 |
|
595 |
|
596 |
try:
|
|
|
619 |
|
620 |
|
621 |
|
622 |
+
hugging_face_hub_is_offline = 0
|
623 |
+
|
624 |
+
if script_being_run_on_hugging_face == 0:
|
625 |
+
|
626 |
+
if (
|
627 |
+
("HF_HUB_OFFLINE" in os.environ) and
|
628 |
+
(int(os.environ["HF_HUB_OFFLINE"]) == 1)
|
629 |
+
):
|
630 |
+
|
631 |
+
hugging_face_hub_is_offline = 1
|
632 |
+
|
633 |
+
if hugging_face_hub_is_offline == 0:
|
634 |
+
|
635 |
+
print ("Note: The Hugging Face cache directory does not automatically delete older data. Over time, it could eventually grow to use all the space on the drive it is on. You either need to manually clean out the folder occasionally or see Instructons.txt on how to not automatically update data once you have downloaded everything you need.")
|
636 |
+
|
637 |
+
|
638 |
+
|
639 |
if device == "cuda":
|
640 |
|
641 |
PYTORCH_CUDA_ALLOC_CONF = {
|