mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-30 20:33:06 -08:00
Merge 62da1aaf28 into fd68e0c384
This commit is contained in:
commit
30baec8915
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue