mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-12 12:37:01 +00:00
Stable Cascade Stage B.
This commit is contained in:
@@ -84,7 +84,7 @@ class GlobalResponseNorm(nn.Module):
|
||||
def forward(self, x):
|
||||
Gx = torch.norm(x, p=2, dim=(1, 2), keepdim=True)
|
||||
Nx = Gx / (Gx.mean(dim=-1, keepdim=True) + 1e-6)
|
||||
return self.gamma * (x * Nx) + self.beta + x
|
||||
return self.gamma.to(x.device) * (x * Nx) + self.beta.to(x.device) + x
|
||||
|
||||
|
||||
class ResBlock(nn.Module):
|
||||
|
Reference in New Issue
Block a user