The middle prompt should be treated more as a negative prompt.

This commit is contained in:
comfyanonymous 2024-04-07 14:34:43 -04:00
parent 80bda6c163
commit c9fc242e2c
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ from comfy.k_diffusion import sampling as k_diffusion_sampling
import latent_preview import latent_preview
import torch import torch
import comfy.utils import comfy.utils
import node_helpers
class BasicScheduler: class BasicScheduler:
@ -433,6 +434,7 @@ class Guider_DualCFG(comfy.samplers.CFGGuider):
self.cfg2 = cfg2 self.cfg2 = cfg2
def set_conds(self, positive, middle, negative): def set_conds(self, positive, middle, negative):
middle = node_helpers.conditioning_set_values(middle, {"prompt_type": "negative"})
self.inner_set_conds({"positive": positive, "middle": middle, "negative": negative}) self.inner_set_conds({"positive": positive, "middle": middle, "negative": negative})
def predict_noise(self, x, timestep, model_options={}, seed=None): def predict_noise(self, x, timestep, model_options={}, seed=None):