Spaces:
Paused
Paused
Commit
·
f0738d3
1
Parent(s):
eb6be39
Remove compile for stage2 and 3 (#139)
Browse files- Remove compile for stage2 and 3 (bcc86c65b32f3751244c857b98be741b15ac7d7f)
Co-authored-by: Patrick von Platen <[email protected]>
model.py
CHANGED
|
@@ -63,13 +63,8 @@ class Model:
|
|
| 63 |
self.pipe.unet.to(memory_format=torch.channels_last)
|
| 64 |
self.pipe.unet = torch.compile(self.pipe.unet, mode="reduce-overhead", fullgraph=True)
|
| 65 |
|
| 66 |
-
self.super_res_1_pipe.unet.to(memory_format=torch.channels_last)
|
| 67 |
-
self.super_res_1_pipe.unet = torch.compile(self.super_res_1_pipe.unet, mode="reduce-overhead", fullgraph=True)
|
| 68 |
-
|
| 69 |
if not DISABLE_SD_X4_UPSCALER:
|
| 70 |
self.super_res_2_pipe.to(self.device)
|
| 71 |
-
self.super_res_2_pipe.unet.to(memory_format=torch.channels_last)
|
| 72 |
-
self.super_res_2_pipe.unet = torch.compile(self.super_res_2_pipe.unet, mode="reduce-overhead", fullgraph=True)
|
| 73 |
else:
|
| 74 |
self.pipe.enable_model_cpu_offload()
|
| 75 |
self.super_res_1_pipe.enable_model_cpu_offload()
|
|
|
|
| 63 |
self.pipe.unet.to(memory_format=torch.channels_last)
|
| 64 |
self.pipe.unet = torch.compile(self.pipe.unet, mode="reduce-overhead", fullgraph=True)
|
| 65 |
|
|
|
|
|
|
|
|
|
|
| 66 |
if not DISABLE_SD_X4_UPSCALER:
|
| 67 |
self.super_res_2_pipe.to(self.device)
|
|
|
|
|
|
|
| 68 |
else:
|
| 69 |
self.pipe.enable_model_cpu_offload()
|
| 70 |
self.super_res_1_pipe.enable_model_cpu_offload()
|