diff --git a/backend/utils.py b/backend/utils.py index 335ffa73..44f9eab0 100644 --- a/backend/utils.py +++ b/backend/utils.py @@ -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