Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5040a1b5c | ||
|
|
035cb39e22 | ||
|
|
a54984bb98 |
+3
-3
@@ -34,7 +34,7 @@ class AdaptiveGuider(object):
|
||||
|
||||
def predict_noise(self, x, timestep, model_options={}, seed=None):
|
||||
ts = timestep[0].item()
|
||||
if ts >= self.cfg_start_timestep or self.threshold_timestep > ts or self.cfg == 1.0:
|
||||
if ts > self.cfg_start_timestep or self.threshold_timestep > ts or self.cfg == 1.0:
|
||||
if self.uz_scale > 0.0:
|
||||
model_options = model_options.copy()
|
||||
model_options["sampler_cfg_function"] = self.zero_cond
|
||||
@@ -53,12 +53,12 @@ class Guider_AdaptiveGuidance(AdaptiveGuider, comfy.samplers.CFGGuider):
|
||||
def calc_conds(self, x, timestep, model_options):
|
||||
cond = self.conds.get("positive")
|
||||
uncond = self.conds.get("negative")
|
||||
return comfy.samplers.calc_cond_batch(self.inner_model, [uncond, cond], x, timestep, model_options)
|
||||
return comfy.samplers.calc_cond_batch(self.inner_model, [cond, uncond], x, timestep, model_options)
|
||||
|
||||
def calc_cfg(self, conds, x, timestep, model_options):
|
||||
cond = self.conds.get("positive")
|
||||
uncond = self.conds.get("negative")
|
||||
uncond_pred, cond_pred = conds
|
||||
cond_pred, uncond_pred = conds
|
||||
|
||||
return comfy.samplers.cfg_function(
|
||||
self.inner_model,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-adaptive-guidance"
|
||||
description = "An implementation of adaptive guidance for ComfyUI\nSee https://bcv-uniandes.github.io/adaptiveguidance-wp/"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
license = { text = "GNU General Public License v3.0" }
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user