fix: SelvaSampler — negative_prompt above settings
Move negative_prompt to required inputs, right after prompt, so it appears above duration/steps/cfg/seed in the ComfyUI node layout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,10 @@ class SelvaSampler:
|
||||
"default": "", "multiline": True,
|
||||
"tooltip": "CLIP text for audio generation. Leave empty to reuse the prompt from SelvaFeatureExtractor.",
|
||||
}),
|
||||
"negative_prompt": ("STRING", {
|
||||
"default": "", "multiline": True,
|
||||
"tooltip": "Sounds to steer away from, e.g. 'wind noise, background music'.",
|
||||
}),
|
||||
"duration": ("FLOAT", {
|
||||
"default": 0.0, "min": 0.0, "max": 30.0, "step": 0.1,
|
||||
"tooltip": "Audio duration in seconds. 0 = use duration from features.",
|
||||
@@ -25,12 +29,7 @@ class SelvaSampler:
|
||||
"tooltip": "CFG scale (SelVA default is 4.5)."}),
|
||||
"seed": ("INT", {"default": 0, "min": 0, "max": 0xFFFFFFFF}),
|
||||
},
|
||||
"optional": {
|
||||
"negative_prompt": ("STRING", {
|
||||
"default": "", "multiline": True,
|
||||
"tooltip": "Sounds to steer away from, e.g. 'wind noise, background music'.",
|
||||
}),
|
||||
},
|
||||
"optional": {},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("AUDIO",)
|
||||
@@ -38,7 +37,7 @@ class SelvaSampler:
|
||||
FUNCTION = "generate"
|
||||
CATEGORY = PRISMAUDIO_CATEGORY
|
||||
|
||||
def generate(self, model, features, prompt, duration, steps, cfg_strength, seed, negative_prompt=None):
|
||||
def generate(self, model, features, prompt, negative_prompt, duration, steps, cfg_strength, seed):
|
||||
from selva_core.model.flow_matching import FlowMatching
|
||||
from selva_core.model.sequence_config import SequenceConfig
|
||||
|
||||
@@ -96,7 +95,7 @@ class SelvaSampler:
|
||||
|
||||
# Encode negative prompt (or use empty conditions)
|
||||
neg_text_clip = feature_utils.encode_text_clip([negative_prompt]) \
|
||||
if negative_prompt and negative_prompt.strip() else None
|
||||
if negative_prompt.strip() else None
|
||||
|
||||
conditions = net_generator.preprocess_conditions(clip_f, sync_f, text_clip)
|
||||
empty_conditions = net_generator.get_empty_conditions(
|
||||
|
||||
Reference in New Issue
Block a user