mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-04-04 03:29:00 +08:00
Merge 62da1aaf280f9094ad20361299d34293c36aa66a into 374bb6cc384d2a19422c0b07d69de0a41d1f3f4d
This commit is contained in:
commit
d91dab05d5
@ -188,7 +188,7 @@ class LoadStateDictOnMeta(ReplaceHelper):
|
||||
|
||||
if param.is_meta:
|
||||
dtype = sd_param.dtype if sd_param is not None else param.dtype
|
||||
module._parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad)
|
||||
module._parameters[name] = torch.nn.parameter.Parameter(torch.empty_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad)
|
||||
|
||||
for name in module._buffers:
|
||||
key = prefix + name
|
||||
|
Loading…
x
Reference in New Issue
Block a user