1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

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

View File

@@ -4,6 +4,7 @@ from comfy.k_diffusion import sampling as k_diffusion_sampling
import latent_preview
import torch
import comfy.utils
import node_helpers
class BasicScheduler:
@@ -433,6 +434,7 @@ class Guider_DualCFG(comfy.samplers.CFGGuider):
self.cfg2 = cfg2
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})
def predict_noise(self, x, timestep, model_options={}, seed=None):