From 2c6588ead46db4be64e64c42414d784616664b52 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Tue, 13 Jun 2023 16:13:15 -0400 Subject: [PATCH] Update sampler_tonemap.py to latest comfyui. --- sampler_tonemap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sampler_tonemap.py b/sampler_tonemap.py index d2f8cbd..14f732e 100644 --- a/sampler_tonemap.py +++ b/sampler_tonemap.py @@ -14,7 +14,10 @@ class ModelSamplerTonemapNoiseTest: def patch(self, model, multiplier): - def sampler_tonemap_reinhard(cond, uncond, cond_scale): + def sampler_tonemap_reinhard(args): + cond = args["cond"] + uncond = args["uncond"] + cond_scale = args["cond_scale"] noise_pred = (cond - uncond) noise_pred_vector_magnitude = (torch.linalg.vector_norm(noise_pred, dim=(1)) + 0.0000000001)[:,None] noise_pred /= noise_pred_vector_magnitude