Spaces:
Runtime error
Runtime error
stanley
commited on
Commit
·
1c71af7
1
Parent(s):
ab328e5
debuggin huggin
Browse files
app.py
CHANGED
@@ -84,10 +84,10 @@ try:
|
|
84 |
except:
|
85 |
pass
|
86 |
|
87 |
-
try:
|
88 |
-
|
89 |
-
except:
|
90 |
-
|
91 |
|
92 |
USE_NEW_DIFFUSERS = True
|
93 |
RUN_IN_SPACE = "RUN_IN_HG_SPACE" in os.environ
|
@@ -887,25 +887,25 @@ def run_outpaint(
|
|
887 |
):
|
888 |
data = base64.b64decode(str(sel_buffer_str))
|
889 |
pil = Image.open(io.BytesIO(data))
|
890 |
-
if interrogate_mode:
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
width, height = pil.size
|
910 |
sel_buffer = np.array(pil)
|
911 |
cur_model = get_model()
|
|
|
84 |
except:
|
85 |
pass
|
86 |
|
87 |
+
# try:
|
88 |
+
# from interrogate import Interrogator
|
89 |
+
# except:
|
90 |
+
# Interrogator = DummyInterrogator
|
91 |
|
92 |
USE_NEW_DIFFUSERS = True
|
93 |
RUN_IN_SPACE = "RUN_IN_HG_SPACE" in os.environ
|
|
|
887 |
):
|
888 |
data = base64.b64decode(str(sel_buffer_str))
|
889 |
pil = Image.open(io.BytesIO(data))
|
890 |
+
# if interrogate_mode:
|
891 |
+
# if "interrogator" not in model:
|
892 |
+
# model["interrogator"] = Interrogator()
|
893 |
+
# interrogator = model["interrogator"]
|
894 |
+
# # possible point to integrate
|
895 |
+
# img = np.array(pil)[:, :, 0:3]
|
896 |
+
# mask = np.array(pil)[:, :, -1]
|
897 |
+
# x, y = np.nonzero(mask)
|
898 |
+
# if len(x) > 0:
|
899 |
+
# x0, x1 = x.min(), x.max() + 1
|
900 |
+
# y0, y1 = y.min(), y.max() + 1
|
901 |
+
# img = img[x0:x1, y0:y1, :]
|
902 |
+
# pil = Image.fromarray(img)
|
903 |
+
# interrogate_ret = interrogator.interrogate(pil)
|
904 |
+
# return (
|
905 |
+
# gr.update(value=",".join([sel_buffer_str]),),
|
906 |
+
# gr.update(label="Prompt", value=interrogate_ret),
|
907 |
+
# state,
|
908 |
+
# )
|
909 |
width, height = pil.size
|
910 |
sel_buffer = np.array(pil)
|
911 |
cur_model = get_model()
|