From bfb52de866ce659c281a6c243c8485109e4d8b8b Mon Sep 17 00:00:00 2001 From: fgdfgfthgr-fox <60460773+fgdfgfthgr-fox@users.noreply.github.com> Date: Sat, 3 Aug 2024 02:29:03 +1200 Subject: [PATCH] Lower SAG scale step for finer control (#4158) * Lower SAG step for finer control Since the introduction of cfg++ which uses very low cfg value, a step of 0.1 in SAG might be too high for finer control. Even SAG of 0.1 can be too high when cfg is only 0.6, so I change the step to 0.01. * Lower PAG step as well. * Update nodes_sag.py --- comfy_extras/nodes_pag.py | 2 +- comfy_extras/nodes_sag.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy_extras/nodes_pag.py b/comfy_extras/nodes_pag.py index aec78bd8..eb28196f 100644 --- a/comfy_extras/nodes_pag.py +++ b/comfy_extras/nodes_pag.py @@ -12,7 +12,7 @@ class PerturbedAttentionGuidance: return { "required": { "model": ("MODEL",), - "scale": ("FLOAT", {"default": 3.0, "min": 0.0, "max": 100.0, "step": 0.1, "round": 0.01}), + "scale": ("FLOAT", {"default": 3.0, "min": 0.0, "max": 100.0, "step": 0.01, "round": 0.01}), } } diff --git a/comfy_extras/nodes_sag.py b/comfy_extras/nodes_sag.py index 010e9974..5e15b99e 100644 --- a/comfy_extras/nodes_sag.py +++ b/comfy_extras/nodes_sag.py @@ -96,7 +96,7 @@ class SelfAttentionGuidance: @classmethod def INPUT_TYPES(s): return {"required": { "model": ("MODEL",), - "scale": ("FLOAT", {"default": 0.5, "min": -2.0, "max": 5.0, "step": 0.1}), + "scale": ("FLOAT", {"default": 0.5, "min": -2.0, "max": 5.0, "step": 0.01}), "blur_sigma": ("FLOAT", {"default": 2.0, "min": 0.0, "max": 10.0, "step": 0.1}), }} RETURN_TYPES = ("MODEL",)