Skip to content

Commit

Permalink
Prevent division by 0 on denoise factor 0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SeargeDP committed Jul 12, 2023
1 parent 9cd8570 commit d6d7e46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions searge_sdxl_sampler_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def INPUT_TYPES(s):
def sample(self, base_model, base_positive, base_negative, refiner_model, refiner_positive, refiner_negative, latent_image, noise_seed, steps, cfg, sampler_name, scheduler, base_ratio, denoise):
base_steps = int(steps * base_ratio)

if denoise < 0.01:
return (latent_image, )

if base_steps >= steps:
return nodes.common_ksampler(base_model, noise_seed, steps, cfg, sampler_name, scheduler, base_positive, base_negative, latent_image, denoise=denoise, disable_noise=False, start_step=0, last_step=steps, force_full_denoise=True)

Expand Down

0 comments on commit d6d7e46

Please sign in to comment.