Skip to content

Commit

Permalink
Doesn't really make sense for cfg_pp sampler to call regular one.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Sep 11, 2024
1 parent b5d0f2a commit 9f4daca
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions comfy/k_diffusion/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,13 +1103,10 @@ def post_cfg_function(args):
return x
@torch.no_grad()
def sample_dpmpp_2s_ancestral_cfg_pp(model, x, sigmas, extra_args=None, callback=None, disable=None, eta=1., s_noise=1., noise_sampler=None):
if isinstance(model.inner_model.inner_model.model_sampling, comfy.model_sampling.CONST):
return sample_dpmpp_2s_ancestral_RF(model, x, sigmas, extra_args, callback, disable, eta, s_noise, noise_sampler)

"""Ancestral sampling with DPM-Solver++(2S) second-order steps."""
extra_args = {} if extra_args is None else extra_args
noise_sampler = default_noise_sampler(x) if noise_sampler is None else noise_sampler

temp = [0]
def post_cfg_function(args):
temp[0] = args["uncond_denoised"]
Expand Down

0 comments on commit 9f4daca

Please sign in to comment.