Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,8 +15,8 @@ import random
|
|
| 15 |
|
| 16 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained("timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None)
|
| 17 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
| 22 |
|
|
|
|
| 15 |
|
| 16 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained("timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None)
|
| 17 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 18 |
+
pipe.enable_xformers_memory_efficient_attention()
|
| 19 |
+
pipe.unet.to(memory_format=torch.channels_last)
|
| 20 |
|
| 21 |
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
| 22 |
|