Update src/pipeline.py
Browse files- src/pipeline.py +2 -0
src/pipeline.py
CHANGED
|
@@ -30,6 +30,8 @@ def load_pipeline() -> Pipeline:
|
|
| 30 |
text_encoder_2=text_encoder_2,
|
| 31 |
torch_dtype=dtype,
|
| 32 |
)#.to("cuda")
|
|
|
|
|
|
|
| 33 |
|
| 34 |
# Optimize after moving to GPU
|
| 35 |
pipeline.vae = torch.compile(pipeline.vae) # compile after moving to device
|
|
|
|
| 30 |
text_encoder_2=text_encoder_2,
|
| 31 |
torch_dtype=dtype,
|
| 32 |
)#.to("cuda")
|
| 33 |
+
pipeline.transformer.to(memory_format=torch.channels_last)
|
| 34 |
+
pipeline.text_encoder.to(memory_format=torch.channels_last)
|
| 35 |
|
| 36 |
# Optimize after moving to GPU
|
| 37 |
pipeline.vae = torch.compile(pipeline.vae) # compile after moving to device
|