From 22ec02afc0c900ee86ba6f0387bfd9dc0e34fb83 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 19 Aug 2024 05:19:59 -0400 Subject: [PATCH 1/2] Handle subnormal numbers in float8 rounding. --- comfy/float.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/comfy/float.py b/comfy/float.py index 9822ae482..51ae9872a 100644 --- a/comfy/float.py +++ b/comfy/float.py @@ -32,8 +32,12 @@ def manual_stochastic_round_to_float8(x, dtype): result = sign * (2.0 ** (exponent - EXPONENT_BIAS)) * (1.0 + mantissa) # Handle zero case - result = torch.where(abs_x == 0, torch.zeros_like(result), result) + zero_mask = (abs_x == 0) + result = torch.where(zero_mask, torch.zeros_like(result), result) + # Handle subnormal numbers + min_normal = 2.0 ** (-EXPONENT_BIAS + 1) + result = torch.where((abs_x < min_normal) & (~zero_mask), torch.round(x / (2.0 ** (-EXPONENT_BIAS + 1 - MANTISSA_BITS))) * (2.0 ** (-EXPONENT_BIAS + 1 - MANTISSA_BITS)), result) return result.to(dtype=dtype) From b29b3b86c5be1d95737fe966598400ea09f63900 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 19 Aug 2024 07:12:32 -0400 Subject: [PATCH 2/2] Update README to include frontend section (#4468) * Update README to include frontend section * nit --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index c96514a41..ecd2fbc27 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,47 @@ Use `--tls-keyfile key.pem --tls-certfile cert.pem` to enable TLS/SSL, the app w See also: [https://www.comfy.org/](https://www.comfy.org/) +## Frontend Development + +As of August 15, 2024, we have transitioned to a new frontend, which is now hosted in a separate repository: [ComfyUI Frontend](https://github.com/Comfy-Org/ComfyUI_frontend). This repository now hosts the compiled JS (from TS/Vue) under the `web/` directory. + +### Reporting Issues and Requesting Features + +For any bugs, issues, or feature requests related to the frontend, please use the [ComfyUI Frontend repository](https://github.com/Comfy-Org/ComfyUI_frontend). This will help us manage and address frontend-specific concerns more efficiently. + +### Using the Latest Frontend + +The new frontend is now the default for ComfyUI. However, please note: + +1. The frontend in the main ComfyUI repository is updated weekly. +2. Daily releases are available in the separate frontend repository. + +To use the most up-to-date frontend version: + +1. For the latest daily release, launch ComfyUI with this command line argument: + + ``` + --front-end-version Comfy-Org/ComfyUI_frontend@latest + ``` + +2. For a specific version, replace `latest` with the desired version number: + + ``` + --front-end-version Comfy-Org/ComfyUI_frontend@1.2.2 + ``` + +This approach allows you to easily switch between the stable weekly release and the cutting-edge daily updates, or even specific versions for testing purposes. + +### Accessing the Legacy Frontend + +If you need to use the legacy frontend for any reason, you can access it using the following command line argument: + +``` +--front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest +``` + +This will use a snapshot of the legacy frontend preserved in the [ComfyUI Legacy Frontend repository](https://github.com/Comfy-Org/ComfyUI_legacy_frontend). + # QA ### Which GPU should I buy for this?