Spaces:
Running
on
Zero
Running
on
Zero
wondervictor
commited on
Commit
·
99d538e
1
Parent(s):
876dc56
update
Browse files
app.py
CHANGED
@@ -27,8 +27,8 @@ with gr.Blocks(css="style.css") as demo:
|
|
27 |
visible=SHOW_DUPLICATE_BUTTON,
|
28 |
)
|
29 |
with gr.Tabs():
|
30 |
-
|
31 |
-
|
32 |
with gr.TabItem("Canny"):
|
33 |
create_demo_canny(model.process_canny)
|
34 |
|
|
|
27 |
visible=SHOW_DUPLICATE_BUTTON,
|
28 |
)
|
29 |
with gr.Tabs():
|
30 |
+
with gr.TabItem("Depth"):
|
31 |
+
create_demo_depth(model.process_depth)
|
32 |
with gr.TabItem("Canny"):
|
33 |
create_demo_canny(model.process_canny)
|
34 |
|
model.py
CHANGED
@@ -114,6 +114,9 @@ class Model:
|
|
114 |
image = resize_image_to_16_multiple(image, 'canny')
|
115 |
W, H = image.size
|
116 |
print(W, H)
|
|
|
|
|
|
|
117 |
condition_img = self.get_control_canny(np.array(image), low_threshold,
|
118 |
high_threshold)
|
119 |
condition_img = torch.from_numpy(condition_img[None, None,
|
|
|
114 |
image = resize_image_to_16_multiple(image, 'canny')
|
115 |
W, H = image.size
|
116 |
print(W, H)
|
117 |
+
self.t5_model.model.to(self.device)
|
118 |
+
self.gpt_model_canny.to(self.device)
|
119 |
+
|
120 |
condition_img = self.get_control_canny(np.array(image), low_threshold,
|
121 |
high_threshold)
|
122 |
condition_img = torch.from_numpy(condition_img[None, None,
|