Add fp8 for sd unet

This commit is contained in:
Kohaku-Blueleaf
2023-10-19 13:56:17 +08:00
parent 861cbd5636
commit 7c128bbdac
11 changed files with 36 additions and 32 deletions

View File

@@ -18,9 +18,9 @@ class NetworkModuleFull(network.NetworkModule):
def calc_updown(self, orig_weight):
output_shape = self.weight.shape
updown = self.weight.to(orig_weight.device, dtype=orig_weight.dtype)
updown = self.weight.to(orig_weight.device)
if self.ex_bias is not None:
ex_bias = self.ex_bias.to(orig_weight.device, dtype=orig_weight.dtype)
ex_bias = self.ex_bias.to(orig_weight.device)
else:
ex_bias = None