Action overrides prompt and gets instructions field
This commit is contained in:
@@ -88,15 +88,14 @@ explicit solo sets, sex positions, oral, hands and explicit detail), 29 places,
|
||||
setups, 14 outfits and 8 styles. Aspect ratio stays with the Empty Latent / resolution node. Category filters the action list; every action states the exact body
|
||||
arrangement, hands, legs, face and camera so there is no ambiguity. `source` switches between keeping
|
||||
the person in the connected image (image-to-image) and inventing them from `subject_1` / `subject_2`
|
||||
text (text-to-image). Notes and overrides are appended last. The enhancer has `use_action`; turn it off to ignore the action for a fully custom prompt without disconnecting the node. Output connects to the enhancer's
|
||||
`action` input; the brief is appended to the user text for every preset.
|
||||
text (text-to-image). Notes and overrides are appended last. The enhancer has `use_action`; turn it off to ignore the action for a fully custom prompt without disconnecting the node. Output connects to the enhancer's `action` input; while `use_action` is on the brief replaces the enhancer prompt, and the `instructions` field carries custom additions.
|
||||
|
||||
### PromptForge Enhancer (`PROMPTFORGE_PromptEnhancer`)
|
||||
|
||||
Takes the `MODEL` bundle and writes the prompt. Only generation inputs live here.
|
||||
|
||||
- **Request fidelity**: every preset treats the user's text as the authority on subject, acts, intensity and tone. Hardcore, explicit or intense requests are written directly and specifically, without sanitizing, softening, euphemizing or fading to black.
|
||||
- **Prompt input**: free-form text box — loose natural language, random ideas, keyword piles, detailed descriptions; the model always expands to a proper prompt for the target mode/model.
|
||||
- **Prompt input**: free-form text box — loose natural language, random ideas, keyword piles, detailed descriptions; the model always expands to a proper prompt for the target mode/model. With `use_action` on, this text is ignored and the Action brief drives the prompt; custom additions go in the Action node's `instructions` field.
|
||||
- **Modes**: `text_only` (ignore media) or `inputs` (use every connected image from `image` / `image2` / `image3` plus frames sampled from `video` via `frame_count`). The prompt is told exactly which inputs arrived: bypassed or missing sockets are never mentioned, and the model is told not to invent extra images, references, video or frames.
|
||||
- **Preset**: `auto` or any bundled preset (Krea 2 T2I, Krea 2 Identity Edit, MOSS Image T2I/I2I, Qwen Image T2I, MiniMax H3, Anima, ACE-Step, generic styles…).
|
||||
- **MiniMax inputs**: the MiniMax H3 presets (T2VA, I2VA, L2VA, FL2VA, Ref2VA, plus the NSFW variants) get an authoritative list of what is connected. Labels follow the H3 encoder: `<Picture 1>`, `<Picture 2>`, `<Picture 3>` for the connected images in order with gaps closed up (only `image2` connected makes it `<Picture 1>`), and `<Video 1>` for the video. Each mode uses only what it can: T2VA none, I2VA/L2VA one image as first/last frame, FL2VA two images as first and last frame, Ref2VA all images plus the video; anything else that is connected is ignored and the console says so. The frame-alignment line is written by the node for exactly the attached pictures (omitted when none), the model is told which labels do not exist, and any sentence that still cites an unattached picture, video or audio label is removed. The node attaches no audio, so `<Audio N>` only appears when your own text describes it.
|
||||
|
||||
+3
-2
@@ -2018,7 +2018,7 @@ class PROMPTFORGE_PromptEnhancer:
|
||||
action["action"], (action.get("subject_1", ""), action.get("subject_2", "")),
|
||||
action.get("camera", "auto"), action.get("place", "auto"), action.get("lighting", "auto"),
|
||||
action.get("outfit", "as in the image"), action.get("style", "auto"),
|
||||
action.get("notes", ""), action.get("overrides", ""), action.get("source", "input image"))
|
||||
action.get("notes", ""), action.get("overrides", ""), action.get("source", "input image"), action.get("instructions", ""))
|
||||
duration_text = f"{float(video_seconds):.2f}"
|
||||
duration_line = ""
|
||||
if sys_text and "{video_seconds}" in sys_text:
|
||||
@@ -2048,7 +2048,8 @@ class PROMPTFORGE_PromptEnhancer:
|
||||
)
|
||||
continuation_block = (continuation or "").strip() if minimax_key else ""
|
||||
system_parts = [p for p in (sys_text, media_line, minimax_block, continuation_block, dialogue_block, rules, negative_line, guard) if p and p.strip()]
|
||||
user_parts = [p for p in (user_text, action_block, duration_line) if p and p.strip()]
|
||||
action_active = bool(action_block)
|
||||
user_parts = [p for p in ("" if action_active else user_text, action_block, duration_line) if p and p.strip()]
|
||||
system_prompt = "\n\n".join(system_parts)
|
||||
user_prompt = "\n\n".join(user_parts)
|
||||
full_prompt = "\n\n".join(p for p in (system_prompt, user_prompt) if p)
|
||||
|
||||
+3
-1
@@ -224,7 +224,7 @@ def labels_for(category):
|
||||
|
||||
|
||||
def brief(action, people, camera="auto", place="auto", lighting="auto", outfit="as in the image", style="auto",
|
||||
notes="", overrides="", source="input image"):
|
||||
notes="", overrides="", source="input image", instructions=""):
|
||||
"""The action block appended to the writer's user text."""
|
||||
count, _, arrangement = ACTIONS[action]
|
||||
subjects = [people[0].strip() or ("the person in the input image" if source == "input image" else "the woman"),
|
||||
@@ -251,5 +251,7 @@ def brief(action, people, camera="auto", place="auto", lighting="auto", outfit="
|
||||
lines.append(f"Notes: {notes.strip()}")
|
||||
if overrides.strip():
|
||||
lines.append(f"Overrides: {overrides.strip()}")
|
||||
if instructions.strip():
|
||||
lines.append(f"Extra instructions: {instructions.strip()}")
|
||||
lines.append("The pose is exactly this arrangement, held still as one frozen frame; do not change it or add another subject. Expand the arrangement with concrete visual detail while keeping every element exactly.")
|
||||
return "\n".join(lines)
|
||||
|
||||
@@ -30,14 +30,15 @@ class PROMPTFORGE_ImageAction:
|
||||
"subject_2": ("STRING", {"default": "", "multiline": True, "placeholder": "Who the second person is. Empty = the other person in the image, or an invented man.", "tooltip": "Identity text for the second person in a couple act."}),
|
||||
"notes": ("STRING", {"default": "", "multiline": True, "placeholder": "Anything else: mood, props, weather, exact framing.", "tooltip": "Extra binding detail for this shot."}),
|
||||
"overrides": ("STRING", {"default": "", "multiline": True, "placeholder": "Hard overrides, for example: red dress, no glasses.", "tooltip": "Passed last and wins over the rest of the brief."}),
|
||||
"instructions": ("STRING", {"default": "", "multiline": True, "placeholder": "Extra instructions for this shot: mood, prop, exact framing. Replaces the enhancer prompt while the action is on.", "tooltip": "Custom instructions appended to the action brief."}),
|
||||
},
|
||||
}
|
||||
|
||||
def build(self, category, action, source, place, camera, lighting, outfit, style,
|
||||
subject_1="", subject_2="", notes="", overrides=""):
|
||||
subject_1="", subject_2="", notes="", overrides="", instructions=""):
|
||||
action = action.split(" · ", 1)[-1]
|
||||
data = {"action": action, "source": source, "place": place, "camera": camera, "lighting": lighting,
|
||||
"outfit": outfit, "style": style, "subject_1": subject_1,
|
||||
"subject_2": subject_2, "notes": notes, "overrides": overrides}
|
||||
text = image_actions.brief(action, (subject_1, subject_2), camera, place, lighting, outfit, style, notes, overrides, source)
|
||||
"subject_2": subject_2, "notes": notes, "overrides": overrides, "instructions": instructions}
|
||||
text = image_actions.brief(action, (subject_1, subject_2), camera, place, lighting, outfit, style, notes, overrides, source, instructions)
|
||||
return (data, text)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "ComfyUI-PromptForge"
|
||||
description = "ComfyUI prompt enhancement suite: model/config node with GPU-aware auto settings, prompt enhancer with a preset catalog, and a standalone config finder."
|
||||
version = "1.28.22"
|
||||
version = "1.28.23"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = [
|
||||
"transformers",
|
||||
|
||||
Reference in New Issue
Block a user