From b1fdbeb9a71ca3b51e594ba457c1d5f001359c92 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:18:16 -0700 Subject: [PATCH 1/5] Fix blur and sharpen nodes not working with fp16 intermediates. (#13181) --- comfy_extras/nodes_post_processing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/comfy_extras/nodes_post_processing.py b/comfy_extras/nodes_post_processing.py index 06626f9dd..9037c3d20 100644 --- a/comfy_extras/nodes_post_processing.py +++ b/comfy_extras/nodes_post_processing.py @@ -67,11 +67,11 @@ class Blend(io.ComfyNode): def g(cls, x): return torch.where(x <= 0.25, ((16 * x - 12) * x + 4) * x, torch.sqrt(x)) -def gaussian_kernel(kernel_size: int, sigma: float, device=None): +def gaussian_kernel(kernel_size: int, sigma: float, device=None, dtype=torch.float32): x, y = torch.meshgrid(torch.linspace(-1, 1, kernel_size, device=device), torch.linspace(-1, 1, kernel_size, device=device), indexing="ij") d = torch.sqrt(x * x + y * y) g = torch.exp(-(d * d) / (2.0 * sigma * sigma)) - return g / g.sum() + return (g / g.sum()).to(dtype) class Blur(io.ComfyNode): @classmethod @@ -99,7 +99,7 @@ class Blur(io.ComfyNode): batch_size, height, width, channels = image.shape kernel_size = blur_radius * 2 + 1 - kernel = gaussian_kernel(kernel_size, sigma, device=image.device).repeat(channels, 1, 1).unsqueeze(1) + kernel = gaussian_kernel(kernel_size, sigma, device=image.device, dtype=image.dtype).repeat(channels, 1, 1).unsqueeze(1) image = image.permute(0, 3, 1, 2) # Torch wants (B, C, H, W) we use (B, H, W, C) padded_image = F.pad(image, (blur_radius,blur_radius,blur_radius,blur_radius), 'reflect') @@ -200,7 +200,7 @@ class Sharpen(io.ComfyNode): image = image.to(comfy.model_management.get_torch_device()) kernel_size = sharpen_radius * 2 + 1 - kernel = gaussian_kernel(kernel_size, sigma, device=image.device) * -(alpha*10) + kernel = gaussian_kernel(kernel_size, sigma, device=image.device, dtype=image.dtype) * -(alpha*10) kernel = kernel.to(dtype=image.dtype) center = kernel_size // 2 kernel[center, center] = kernel[center, center] - kernel.sum() + 1.0 From 225c52f6a4fb4e4591ee1fa648bbb8d4266b324a Mon Sep 17 00:00:00 2001 From: Jin Yi Date: Fri, 27 Mar 2026 14:13:29 +0900 Subject: [PATCH 2/5] fix: register image/svg+xml MIME type for .svg files (#13186) The /view endpoint returns text/plain for .svg files on some platforms because Python's mimetypes module does not always include SVG by default. Explicitly register image/svg+xml so tags can render SVGs correctly. Amp-Thread-ID: https://ampcode.com/threads/T-019d2da7-6a64-726a-af91-bd9c44e7f43c --- utils/mime_types.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/mime_types.py b/utils/mime_types.py index 916e963c5..a173ad109 100644 --- a/utils/mime_types.py +++ b/utils/mime_types.py @@ -24,6 +24,7 @@ def init_mime_types(): # Web types (used by server.py for static file serving) mimetypes.add_type('application/javascript; charset=utf-8', '.js') mimetypes.add_type('image/webp', '.webp') + mimetypes.add_type('image/svg+xml', '.svg') # Model and data file types (used by asset scanning / metadata extraction) mimetypes.add_type("application/safetensors", ".safetensors") From 85b74951355d272d3da6c2eefe79b46c1d5619ca Mon Sep 17 00:00:00 2001 From: ComfyUI Wiki Date: Sat, 28 Mar 2026 01:13:02 +0800 Subject: [PATCH 3/5] chore: update workflow templates to v0.9.39 (#13196) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d780b2f50..6f0659a00 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ comfyui-frontend-package==1.42.8 -comfyui-workflow-templates==0.9.38 +comfyui-workflow-templates==0.9.39 comfyui-embedded-docs==0.4.3 torch torchsde From 6a2cdb817dfee967c02f65eddd9fd85a1d7bf53e Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Fri, 27 Mar 2026 21:11:41 +0200 Subject: [PATCH 4/5] fix(api-nodes-nanobana): raise error when not output image is present (#13167) Signed-off-by: bigcat88 --- comfy_api_nodes/nodes_gemini.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/comfy_api_nodes/nodes_gemini.py b/comfy_api_nodes/nodes_gemini.py index 25d747e76..2b77a022e 100644 --- a/comfy_api_nodes/nodes_gemini.py +++ b/comfy_api_nodes/nodes_gemini.py @@ -201,6 +201,16 @@ async def get_image_from_response(response: GeminiGenerateContentResponse, thoug returned_image = await download_url_to_image_tensor(part.fileData.fileUri) image_tensors.append(returned_image) if len(image_tensors) == 0: + if not thought: + # No images generated --> extract text response for a meaningful error + model_message = get_text_from_response(response).strip() + if model_message: + raise ValueError(f"Gemini did not generate an image. Model response: {model_message}") + raise ValueError( + "Gemini did not generate an image. " + "Try rephrasing your prompt or changing the response modality to 'IMAGE+TEXT' " + "to see the model's reasoning." + ) return torch.zeros((1, 1024, 1024, 4)) return torch.cat(image_tensors, dim=0) From 3a56201da58c24d7b8048b200ef01e285b5f2b8a Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Fri, 27 Mar 2026 17:36:26 -0700 Subject: [PATCH 5/5] Allow flux conditioning without a pooled output. (#13198) --- comfy/model_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_base.py b/comfy/model_base.py index 70aff886e..94579fa3e 100644 --- a/comfy/model_base.py +++ b/comfy/model_base.py @@ -890,7 +890,7 @@ class Flux(BaseModel): return torch.cat((image, mask), dim=1) def encode_adm(self, **kwargs): - return kwargs["pooled_output"] + return kwargs.get("pooled_output", None) def extra_conds(self, **kwargs): out = super().extra_conds(**kwargs)