diff --git a/comfy/model_base.py b/comfy/model_base.py index 4539f6495..94449b69b 100644 --- a/comfy/model_base.py +++ b/comfy/model_base.py @@ -1790,7 +1790,7 @@ class Kandinsky5Image(Kandinsky5): def concat_cond(self, **kwargs): return None - + class Kandinsky5ImageToImage(Kandinsky5): def __init__(self, model_config, model_type=ModelType.FLOW, device=None): super().__init__(model_config, model_type, device=device) @@ -1811,4 +1811,4 @@ class Kandinsky5ImageToImage(Kandinsky5): cross_attn = kwargs.get("cross_attn", None) if cross_attn is not None: out["c_crossattn"] = comfy.conds.CONDRegular(cross_attn) - return out \ No newline at end of file + return out diff --git a/comfy_extras/nodes_kandinsky5.py b/comfy_extras/nodes_kandinsky5.py index 111cfbb61..89c752053 100644 --- a/comfy_extras/nodes_kandinsky5.py +++ b/comfy_extras/nodes_kandinsky5.py @@ -96,7 +96,7 @@ class Kandinsky5ImageToImage(io.ComfyNode): encoded = vae.encode(start_image[:, :, :, :3]) out_latent = {"samples": encoded.repeat(batch_size, 1, 1, 1)} return io.NodeOutput(out_latent, start_image) - + def adaptive_mean_std_normalization(source, reference, clump_mean_low=0.3, clump_mean_high=0.35, clump_std_low=0.35, clump_std_high=0.5): source_mean = source.mean(dim=(1, 3, 4), keepdim=True) # mean over C, H, W