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 <patrickvonplaten@users.noreply.huggingface.co>
62 unmodified lines6364656667686970717273747562 unmodified linesself.pipe.unet.to(memory_format=torch.channels_last)self.pipe.unet = torch.compile(self.pipe.unet, mode="reduce-overhead", fullgraph=True)self.super_res_1_pipe.unet.to(memory_format=torch.channels_last)self.super_res_1_pipe.unet = torch.compile(self.super_res_1_pipe.unet, mode="reduce-overhead", fullgraph=True)if not DISABLE_SD_X4_UPSCALER:self.super_res_2_pipe.to(self.device)self.super_res_2_pipe.unet.to(memory_format=torch.channels_last)self.super_res_2_pipe.unet = torch.compile(self.super_res_2_pipe.unet, mode="reduce-overhead", fullgraph=True)else:self.pipe.enable_model_cpu_offload()self.super_res_1_pipe.enable_model_cpu_offload()62 unmodified lines636465666768697062 unmodified linesself.pipe.unet.to(memory_format=torch.channels_last)self.pipe.unet = torch.compile(self.pipe.unet, mode="reduce-overhead", fullgraph=True)if not DISABLE_SD_X4_UPSCALER:self.super_res_2_pipe.to(self.device)else:self.pipe.enable_model_cpu_offload()self.super_res_1_pipe.enable_model_cpu_offload()
model.py-5