Spaces:
Running
on
Zero
Running
on
Zero
test
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def ui():
|
|
31 |
cache_dir=CACHE_DIR,
|
32 |
)
|
33 |
|
34 |
-
pipeline =
|
35 |
pretrained_model_name_or_path=model_file,
|
36 |
unet_model_name_or_path=unet_file,
|
37 |
controlnet_model_name_or_path=controlnet_file,
|
@@ -43,6 +43,8 @@ def ui():
|
|
43 |
use_safetensors=True,
|
44 |
enable_xformers_memory_efficient_attention=True,
|
45 |
)
|
|
|
|
|
46 |
|
47 |
preprocessors = ['canny']
|
48 |
schedulers = ['Euler A', 'UniPC', 'Euler', 'DDIM', 'DDPM']
|
|
|
31 |
cache_dir=CACHE_DIR,
|
32 |
)
|
33 |
|
34 |
+
pipeline = tools.get_pipeline(
|
35 |
pretrained_model_name_or_path=model_file,
|
36 |
unet_model_name_or_path=unet_file,
|
37 |
controlnet_model_name_or_path=controlnet_file,
|
|
|
43 |
use_safetensors=True,
|
44 |
enable_xformers_memory_efficient_attention=True,
|
45 |
)
|
46 |
+
with spaces.GPU:
|
47 |
+
pipeline = pipeline.to(dtype=torch.float16)
|
48 |
|
49 |
preprocessors = ['canny']
|
50 |
schedulers = ['Euler A', 'UniPC', 'Euler', 'DDIM', 'DDPM']
|