From 102537a70b29e015ea40e98a5a396500e63a2745 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Mon, 4 Mar 2024 00:54:58 -0500 Subject: [PATCH] Remove unused code --- layered_diffusion.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/layered_diffusion.py b/layered_diffusion.py index 1c4fb7f..ad0dfd7 100644 --- a/layered_diffusion.py +++ b/layered_diffusion.py @@ -10,7 +10,6 @@ from comfy.utils import load_torch_file from comfy_extras.nodes_compositing import JoinImageWithAlpha from comfy.conds import CONDRegular from .lib_layerdiffusion.utils import ( - rgba2rgbfp32, load_file_from_url, to_lora_patch_dict, ) @@ -51,7 +50,9 @@ def calculate_weight_adjust_channel(func): ) ): new_shape = [max(n, m) for n, m in zip(weight.shape, w1.shape)] - print(f"Merged with {key} channel changed from {weight.shape} to {new_shape}") + print( + f"Merged with {key} channel changed from {weight.shape} to {new_shape}" + ) new_diff = alpha * comfy.model_management.cast_to_device( w1, weight.device, weight.dtype ) @@ -80,23 +81,6 @@ ModelPatcher.calculate_weight = calculate_weight_adjust_channel( ) -class RGBA2RBGfp32: - @classmethod - def INPUT_TYPES(s): - return { - "required": { - "image": ("IMAGE",), - }, - } - - RETURN_TYPES = ("IMAGE",) - FUNCTION = "rgb2rgb_fp32" - CATEGORY = "layered_diffusion" - - def rgb2rgb_fp32(self, image): - return rgba2rgbfp32(image) - - class LayeredDiffusionDecode: """ Decode alpha channel value from pixel value.