mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-09 13:49:48 +00:00
Revert unresolved changes in Bias initialization
it should be zeros_ or parameterized in future properly.
This commit is contained in:
@@ -75,7 +75,7 @@ class HypernetworkModule(torch.nn.Module):
|
|||||||
w, b = layer.weight.data, layer.bias.data
|
w, b = layer.weight.data, layer.bias.data
|
||||||
if weight_init == "Normal" or type(layer) == torch.nn.LayerNorm:
|
if weight_init == "Normal" or type(layer) == torch.nn.LayerNorm:
|
||||||
normal_(w, mean=0.0, std=0.01)
|
normal_(w, mean=0.0, std=0.01)
|
||||||
normal_(b, mean=0.0, std=0.005)
|
normal_(b, mean=0.0, std=0)
|
||||||
elif weight_init == 'XavierUniform':
|
elif weight_init == 'XavierUniform':
|
||||||
xavier_uniform_(w)
|
xavier_uniform_(w)
|
||||||
zeros_(b)
|
zeros_(b)
|
||||||
|
Reference in New Issue
Block a user