lemonaddie
commited on
Commit
•
6837c13
1
Parent(s):
3ea3f8a
Update app1.py
Browse files
app1.py
CHANGED
@@ -126,7 +126,7 @@ def run_demo_server(pipe):
|
|
126 |
minimum=1,
|
127 |
maximum=20,
|
128 |
step=1,
|
129 |
-
value=
|
130 |
)
|
131 |
denoise_steps = gr.Slider(
|
132 |
label="Number of denoising steps",
|
@@ -406,7 +406,7 @@ def main():
|
|
406 |
|
407 |
from pipeline.depth_normal_pipeline_clip_cfg import DepthNormalEstimationPipeline
|
408 |
|
409 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
410 |
pipe = DepthNormalEstimationPipeline.from_pretrained(CHECKPOINT)
|
411 |
|
412 |
try:
|
@@ -415,14 +415,13 @@ def main():
|
|
415 |
except:
|
416 |
pass # run without xformers
|
417 |
|
418 |
-
pipe = pipe.to(device)
|
419 |
try:
|
420 |
import xformers
|
421 |
pipe.enable_xformers_memory_efficient_attention()
|
422 |
except:
|
423 |
pass # run without xformers
|
424 |
|
425 |
-
pipe = pipe.to(
|
426 |
prefetch_hf_cache(pipe)
|
427 |
run_demo_server(pipe)
|
428 |
|
|
|
126 |
minimum=1,
|
127 |
maximum=20,
|
128 |
step=1,
|
129 |
+
value=1,
|
130 |
)
|
131 |
denoise_steps = gr.Slider(
|
132 |
label="Number of denoising steps",
|
|
|
406 |
|
407 |
from pipeline.depth_normal_pipeline_clip_cfg import DepthNormalEstimationPipeline
|
408 |
|
409 |
+
#device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
410 |
pipe = DepthNormalEstimationPipeline.from_pretrained(CHECKPOINT)
|
411 |
|
412 |
try:
|
|
|
415 |
except:
|
416 |
pass # run without xformers
|
417 |
|
|
|
418 |
try:
|
419 |
import xformers
|
420 |
pipe.enable_xformers_memory_efficient_attention()
|
421 |
except:
|
422 |
pass # run without xformers
|
423 |
|
424 |
+
pipe = pipe.to('cuda')
|
425 |
prefetch_hf_cache(pipe)
|
426 |
run_demo_server(pipe)
|
427 |
|