mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-03-09 15:09:50 +00:00
revise
This commit is contained in:
@@ -82,6 +82,6 @@ def fp16_fix(x):
|
||||
# Source: https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/1114
|
||||
# Related: https://github.com/comfyanonymous/ComfyUI/blob/f1d6cef71c70719cc3ed45a2455a4e5ac910cd5e/comfy/ldm/flux/layers.py#L180
|
||||
|
||||
if x.dtype == torch.float16:
|
||||
return x.clip(-16384.0, 16384.0)
|
||||
if x.dtype in [torch.float16]:
|
||||
return x.clip(-32768.0, 32768.0)
|
||||
return x
|
||||
|
||||
Reference in New Issue
Block a user