From 5d2475ef8052bb76747954461c2e01495db8dcd5 Mon Sep 17 00:00:00 2001 From: Hongbo <12580159+ya0guang@users.noreply.github.com> Date: Tue, 27 Feb 2024 21:04:19 -0500 Subject: [PATCH] Add `"score"` as a supported `model_type` Originally, `"score"` is not an allowed model type. However, the documentation supports `"score"` and the method has code related to it. This commit adds it back. --- comfy/extra_samplers/uni_pc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/extra_samplers/uni_pc.py b/comfy/extra_samplers/uni_pc.py index a30d1d03..dede323b 100644 --- a/comfy/extra_samplers/uni_pc.py +++ b/comfy/extra_samplers/uni_pc.py @@ -344,7 +344,7 @@ def model_wrapper( noise_uncond, noise = noise_pred_fn(x_in, t_in, cond=c_in).chunk(2) return noise_uncond + guidance_scale * (noise - noise_uncond) - assert model_type in ["noise", "x_start", "v"] + assert model_type in ["noise", "x_start", "v", "score"] assert guidance_type in ["uncond", "classifier", "classifier-free"] return model_fn @@ -872,4 +872,4 @@ def sample_unipc(model, noise, sigmas, extra_args=None, callback=None, disable=F return x def sample_unipc_bh2(model, noise, sigmas, extra_args=None, callback=None, disable=False): - return sample_unipc(model, noise, sigmas, extra_args, callback, disable, variant='bh2') \ No newline at end of file + return sample_unipc(model, noise, sigmas, extra_args, callback, disable, variant='bh2')