mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-05-06 20:09:06 +08:00
Merge 62da1aaf280f9094ad20361299d34293c36aa66a into 2174ce5afea90ca489d222f539988dcef59f1027
This commit is contained in:
commit
f124becab0
@ -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