Spaces:
Runtime error
Runtime error
cashtaan
commited on
Commit
·
9bb113d
1
Parent(s):
9f71ed7
cuda check
Browse files
app.py
CHANGED
@@ -45,12 +45,13 @@ pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained(
|
|
45 |
|
46 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
47 |
|
48 |
-
|
49 |
-
#
|
50 |
-
#
|
51 |
-
|
|
|
52 |
|
53 |
-
pipe.to('cuda')
|
54 |
|
55 |
# Functions
|
56 |
|
|
|
45 |
|
46 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
47 |
|
48 |
+
if torch.cuda.is_available():
|
49 |
+
# Remove if you do not have xformers installed
|
50 |
+
# see https://huggingface.co/docs/diffusers/v0.13.0/en/optimization/xformers#installing-xformers
|
51 |
+
# for installation instructions
|
52 |
+
pipe.enable_xformers_memory_efficient_attention()
|
53 |
|
54 |
+
pipe.to('cuda')
|
55 |
|
56 |
# Functions
|
57 |
|