Skip to content

Commit

Permalink
Skip SAG when latent is too small.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jan 10, 2024
1 parent 1a57423 commit b4e915e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions comfy_extras/nodes_sag.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def post_cfg_function(args):
sigma = args["sigma"]
model_options = args["model_options"]
x = args["input"]
if min(cfg_result.shape[2:]) <= 4: #skip when too small to add padding
return cfg_result

# create the adversarially blurred image
degraded = create_blur_map(uncond_pred, uncond_attn, sag_sigma, sag_threshold)
Expand Down

0 comments on commit b4e915e

Please sign in to comment.