upd
Browse files
app.py
CHANGED
@@ -12,7 +12,9 @@ from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDisc
|
|
12 |
model_id = "timbrooks/instruct-pix2pix"
|
13 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16") #, safety_checker=None)
|
14 |
pipe.to("cuda")
|
15 |
-
pipe.enable_attention_slicing()
|
|
|
|
|
16 |
|
17 |
counter = 0
|
18 |
|
|
|
12 |
model_id = "timbrooks/instruct-pix2pix"
|
13 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16") #, safety_checker=None)
|
14 |
pipe.to("cuda")
|
15 |
+
#pipe.enable_attention_slicing()
|
16 |
+
pipe.enable_xformers_memory_efficient_attention()
|
17 |
+
pipe.unet.to(memory_format=torch.channels_last)
|
18 |
|
19 |
counter = 0
|
20 |
|