Spaces:
Runtime error
Runtime error
Sophia Yang
commited on
Commit
•
1b23af3
1
Parent(s):
35aae5f
pipe functions
Browse files
app.py
CHANGED
@@ -24,6 +24,8 @@ else:
|
|
24 |
pipe = pn.state.cache['pipe'] = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
25 |
model_id, torch_dtype=torch.float16
|
26 |
).to("cuda")
|
|
|
|
|
27 |
|
28 |
def normalize_image(value, width):
|
29 |
"""
|
|
|
24 |
pipe = pn.state.cache['pipe'] = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
25 |
model_id, torch_dtype=torch.float16
|
26 |
).to("cuda")
|
27 |
+
pipe.enable_xformers_memory_efficient_attention()
|
28 |
+
pipe.unet.to(memory_format=torch.channels_last)
|
29 |
|
30 |
def normalize_image(value, width):
|
31 |
"""
|