Spaces:
Sleeping
Sleeping
Commit
·
ee9e7ab
1
Parent(s):
300339e
debug zerogpu
Browse files
README.md
CHANGED
@@ -21,4 +21,8 @@ pip install gradio
|
|
21 |
pip install controlnet-aux
|
22 |
|
23 |
## local authen
|
24 |
-
huggingface-cli login
|
|
|
|
|
|
|
|
|
|
21 |
pip install controlnet-aux
|
22 |
|
23 |
## local authen
|
24 |
+
huggingface-cli login
|
25 |
+
|
26 |
+
## on using Huggingface ZeroGPU
|
27 |
+
need to import spaces and the corresponding decorator
|
28 |
+
https://huggingface.co/docs/hub/spaces-zerogpu
|
model.py
CHANGED
@@ -101,6 +101,7 @@ class Model:
|
|
101 |
def get_prompt(self, prompt: str, additional_prompt: str) -> str:
|
102 |
return additional_prompt if not prompt else f"{prompt}, {additional_prompt}"
|
103 |
|
|
|
104 |
@torch.autocast("cuda")
|
105 |
def run_pipe(
|
106 |
self,
|
@@ -123,7 +124,6 @@ class Model:
|
|
123 |
image=control_image,
|
124 |
).images
|
125 |
|
126 |
-
@spaces.GPU #[uncomment to use ZeroGPU]
|
127 |
@torch.inference_mode()
|
128 |
def process_canny(
|
129 |
self,
|
|
|
101 |
def get_prompt(self, prompt: str, additional_prompt: str) -> str:
|
102 |
return additional_prompt if not prompt else f"{prompt}, {additional_prompt}"
|
103 |
|
104 |
+
@spaces.GPU #[uncomment to use ZeroGPU]
|
105 |
@torch.autocast("cuda")
|
106 |
def run_pipe(
|
107 |
self,
|
|
|
124 |
image=control_image,
|
125 |
).images
|
126 |
|
|
|
127 |
@torch.inference_mode()
|
128 |
def process_canny(
|
129 |
self,
|