The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Remove workaround for old pytorch. (#12480)
comfyanonymous88e6370527db
diff --git a/comfy/ldm/modules/diffusionmodules/model.py b/comfy/ldm/modules/diffusionmodules/model.pyindex 5a22ef030..805592aa5 100644--- a/comfy/ldm/modules/diffusionmodules/model.py+++ b/comfy/ldm/modules/diffusionmodules/model.py@@ -102,19 +102,7 @@ class VideoConv3d(nn.Module):return self.conv(x)def interpolate_up(x, scale_factor):- try:- return torch.nn.functional.interpolate(x, scale_factor=scale_factor, mode="nearest")- except: #operation not implemented for bf16- orig_shape = list(x.shape)- out_shape = orig_shape[:2]- for i in range(len(orig_shape) - 2):- out_shape.append(round(orig_shape[i + 2] * scale_factor[i]))- out = torch.empty(out_shape, dtype=x.dtype, layout=x.layout, device=x.device)- split = 8- l = out.shape[1] // split- for i in range(0, out.shape[1], l):- out[:,i:i+l] = torch.nn.functional.interpolate(x[:,i:i+l].to(torch.float32), scale_factor=scale_factor, mode="nearest").to(x.dtype)- return out+ return torch.nn.functional.interpolate(x, scale_factor=scale_factor, mode="nearest")class Upsample(nn.Module):def __init__(self, in_channels, with_conv, conv_op=ops.Conv2d, scale_factor=2.0):