Spaces:
Running
on
T4
Running
on
T4
Commit
·
d9c3123
1
Parent(s):
e336d0c
debug zerogpu
Browse files
model.py
CHANGED
@@ -108,8 +108,8 @@ class Model:
|
|
108 |
def get_prompt(self, prompt: str, additional_prompt: str) -> str:
|
109 |
return additional_prompt if not prompt else f"{prompt}, {additional_prompt}"
|
110 |
|
111 |
-
@spaces.GPU #[uncomment to use ZeroGPU]
|
112 |
-
|
113 |
def run_pipe(
|
114 |
self,
|
115 |
prompt: str,
|
@@ -132,7 +132,7 @@ class Model:
|
|
132 |
image=control_image,
|
133 |
).images
|
134 |
|
135 |
-
|
136 |
@torch.inference_mode()
|
137 |
def process_canny(
|
138 |
self,
|
|
|
108 |
def get_prompt(self, prompt: str, additional_prompt: str) -> str:
|
109 |
return additional_prompt if not prompt else f"{prompt}, {additional_prompt}"
|
110 |
|
111 |
+
# @spaces.GPU #[uncomment to use ZeroGPU]
|
112 |
+
@torch.autocast("cuda")
|
113 |
def run_pipe(
|
114 |
self,
|
115 |
prompt: str,
|
|
|
132 |
image=control_image,
|
133 |
).images
|
134 |
|
135 |
+
@spaces.GPU #[uncomment to use ZeroGPU]
|
136 |
@torch.inference_mode()
|
137 |
def process_canny(
|
138 |
self,
|