Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
782d78b611 | ||
|
|
7d1b9c028b | ||
|
|
2b9ca76d41 | ||
|
|
86ac1cee2e | ||
|
|
b8d1c30484 | ||
|
|
56c18a78ff | ||
|
|
110fe6973a | ||
|
|
3b5a6752ec | ||
|
|
f112bafdd7 | ||
|
|
a58079cee4 | ||
|
|
a99d342c2c | ||
|
|
4f7f3905c8 | ||
|
|
cdf110e3e5 | ||
|
|
52503f95f8 | ||
|
|
07b88246c2 | ||
|
|
ea25a8726f | ||
|
|
21e90d0ba4 | ||
|
|
abe35d6dfb | ||
|
|
028b2df006 | ||
|
|
de5d3e5da3 |
@@ -45,7 +45,7 @@ KNOWN_LINUX_WHEEL_SPECS = {
|
||||
"llama_cpp_python-0.3.34+cu130.basic-cp312-cp312-linux_x86_64.whl"
|
||||
),
|
||||
}
|
||||
VISION_HANDLER_NAMES = ("Qwen3VLChatHandler", "Qwen25VLChatHandler")
|
||||
VISION_HANDLER_NAMES = ("Qwen3VLChatHandler", "Qwen25VLChatHandler", "Gemma4ChatHandler", "MTMDChatHandler")
|
||||
_LAST_BACKEND_INFO: dict | None = None
|
||||
_PRINTED_BACKEND_LINES: set[str] = set()
|
||||
|
||||
@@ -460,4 +460,4 @@ def ensure_llama_cpp_backend(require_vision_handlers: bool = False):
|
||||
"[QwenVL] llama_cpp was installed, but the backend is still incompatible. "
|
||||
"Set THINKINGLLM_LLAMA_CPP_LINUX_WHEEL_URL to a matching JamePeng wheel or "
|
||||
"THINKINGLLM_LLAMA_CPP_LINUX_SPEC to an explicit package spec, then restart ComfyUI."
|
||||
) from second_exc
|
||||
) from second_exc
|
||||
|
||||
+9
-2
@@ -901,6 +901,13 @@ if not HF_ALL_MODELS:
|
||||
load_model_configs()
|
||||
|
||||
|
||||
def _default_model_from_config(models: dict[str, dict], fallback: str) -> str:
|
||||
for name, info in models.items():
|
||||
if isinstance(info, dict) and info.get("default"):
|
||||
return name
|
||||
return next(iter(models.keys()), fallback)
|
||||
|
||||
|
||||
def read_hf_model_type(model_dir: str) -> str | None:
|
||||
"""Read model_type from a HuggingFace model's config.json."""
|
||||
try:
|
||||
@@ -1895,7 +1902,7 @@ class ThinkingLLM_QwenVL(QwenVLBase):
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
models = list(HF_VL_MODELS.keys())
|
||||
default_model = models[0] if models else "Qwen3-VL-4B-Instruct"
|
||||
default_model = _default_model_from_config(HF_VL_MODELS, "Qwen3-VL-4B-Instruct")
|
||||
prompts = PRESET_PROMPTS or [NO_PRESET_PROMPT, "Describe this image in detail."]
|
||||
preferred_prompt = "🖼️ Detailed Description"
|
||||
default_prompt = preferred_prompt if preferred_prompt in prompts else prompts[0]
|
||||
@@ -1943,7 +1950,7 @@ class ThinkingLLM_QwenVL_Advanced(QwenVLBase):
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
models = list(HF_VL_MODELS.keys())
|
||||
default_model = models[0] if models else "Qwen3-VL-4B-Instruct"
|
||||
default_model = _default_model_from_config(HF_VL_MODELS, "Qwen3-VL-4B-Instruct")
|
||||
prompts = PRESET_PROMPTS or [NO_PRESET_PROMPT, "Describe this image in detail."]
|
||||
preferred_prompt = "🖼️ Detailed Description"
|
||||
default_prompt = preferred_prompt if preferred_prompt in prompts else prompts[0]
|
||||
|
||||
+736
-94
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,6 @@ import torch
|
||||
from huggingface_hub import snapshot_download
|
||||
from AILab_LlamaCppInstaller import ensure_llama_cpp_backend
|
||||
|
||||
import folder_paths
|
||||
from AILab_OutputCleaner import OutputCleanConfig, clean_model_output, prompt_output_guard
|
||||
from comfy.model_management import throw_exception_if_processing_interrupted
|
||||
from comfy.model_management import throw_exception_if_processing_interrupted
|
||||
@@ -60,7 +59,15 @@ from AILab_QwenVL import (
|
||||
_make_node_state_key,
|
||||
_build_workflow_fingerprint,
|
||||
)
|
||||
from AILab_QwenVL_GGUF import construct_llama_safely, read_gguf_architecture, register_active_gguf_loader, release_other_gguf_loaders, _filter_kwargs_for_callable
|
||||
from AILab_QwenVL_GGUF import (
|
||||
construct_llama_safely,
|
||||
read_gguf_architecture,
|
||||
register_active_gguf_loader,
|
||||
release_other_gguf_loaders,
|
||||
_filter_kwargs_for_callable,
|
||||
_find_existing_local_file_in_dirs,
|
||||
_gguf_search_dirs,
|
||||
)
|
||||
|
||||
|
||||
GGUF_PROMPT_TOOLTIPS = {
|
||||
@@ -79,6 +86,7 @@ GGUF_PROMPT_TOOLTIPS = {
|
||||
"keep_last_prompt": "Return the saved per-node prompt instead of generating a new one when available.",
|
||||
"stream_tokens_to_terminal": "Show clean wrapped generated tokens in the ComfyUI terminal. Streaming bypasses fixed-seed reuse for a fresh run.",
|
||||
"enable_thinking": "Enable model reasoning/thinking when supported. The node still returns the cleaned final prompt, so reasoning may be hidden or empty.",
|
||||
"auto_finalization_retry": "If enabled, runs an extra LLM completion when the first output is empty or reasoning-only. Disabled by default so one node execution performs one generation pass.",
|
||||
"hf_token": "Optional Hugging Face access token for private or gated GGUF downloads. It is passed only to the download call, never logged or cached, and the in-memory copy is dropped after the download attempt. Clear this field before saving or sharing workflows.",
|
||||
}
|
||||
|
||||
@@ -290,13 +298,6 @@ def _safe_dirname(value: str) -> str:
|
||||
return "".join(ch for ch in value if ch.isalnum() or ch in "._- ").strip() or "unknown"
|
||||
|
||||
|
||||
def _resolve_base_dir(base_dir_value: str) -> Path:
|
||||
base_dir = Path(base_dir_value)
|
||||
if base_dir.is_absolute():
|
||||
return base_dir
|
||||
return Path(folder_paths.models_dir) / base_dir
|
||||
|
||||
|
||||
def _model_name_to_filename_candidates(model_name: str) -> set[str]:
|
||||
raw = (model_name or "").strip()
|
||||
if not raw:
|
||||
@@ -311,18 +312,32 @@ def _model_name_to_filename_candidates(model_name: str) -> set[str]:
|
||||
return candidates
|
||||
|
||||
|
||||
def _find_existing_local_file(base_dir: Path, filename: str) -> Path | None:
|
||||
"""Reuse an already-downloaded GGUF file anywhere under the shared base dir."""
|
||||
wanted = Path(filename).name
|
||||
if not wanted:
|
||||
return None
|
||||
try:
|
||||
for candidate in base_dir.rglob(wanted):
|
||||
if candidate.is_file():
|
||||
return candidate
|
||||
except Exception:
|
||||
return None
|
||||
return None
|
||||
def _as_filename_list(value) -> list[str]:
|
||||
if not value:
|
||||
return []
|
||||
if isinstance(value, str):
|
||||
values = [value]
|
||||
elif isinstance(value, (list, tuple, set)):
|
||||
values = list(value)
|
||||
else:
|
||||
return []
|
||||
|
||||
filenames: list[str] = []
|
||||
for item in values:
|
||||
name = Path(str(item)).name
|
||||
if name and name not in filenames:
|
||||
filenames.append(name)
|
||||
return filenames
|
||||
|
||||
|
||||
def _filename_aliases_for(payload, key: str | None) -> list[str]:
|
||||
if not isinstance(payload, dict) or not key:
|
||||
return []
|
||||
return _as_filename_list(payload.get(key) or payload.get(Path(key).name))
|
||||
|
||||
|
||||
def _filename_search_candidates(filename: str, aliases: list[str] | None = None) -> list[str]:
|
||||
return _as_filename_list([filename, *(aliases or [])])
|
||||
|
||||
|
||||
class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
@@ -410,6 +425,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
defaults: dict = _defaults_raw if isinstance(_defaults_raw, dict) else {}
|
||||
repo_id = repo.get("repo_id")
|
||||
alt_repo_ids = repo.get("alt_repo_ids") or []
|
||||
local_filenames = repo.get("local_filenames") or repo.get("local_model_files") or {}
|
||||
model_files = repo.get("model_files") or []
|
||||
quant_sizes = _parse_repo_quant_sizes(repo_key)
|
||||
for model_file in model_files:
|
||||
@@ -430,6 +446,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
"repo_id": repo_id,
|
||||
"alt_repo_ids": alt_repo_ids,
|
||||
"filename": model_file,
|
||||
"local_filenames": _filename_aliases_for(local_filenames, model_file),
|
||||
}
|
||||
)
|
||||
models[display] = entry
|
||||
@@ -437,19 +454,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
# Scan filesystem for locally available models not in JSON config
|
||||
# Collect all directories to scan: the configured base_dir + any extra LLM paths from ComfyUI
|
||||
existing_filenames = {Path(e.get("filename", "")).name for e in models.values() if e.get("filename")}
|
||||
scan_dirs: list[Path] = [_resolve_base_dir(base_dir)]
|
||||
try:
|
||||
if "LLM" in folder_paths.folder_names_and_paths:
|
||||
for llm_path in folder_paths.get_folder_paths("LLM"):
|
||||
gguf_dir = Path(llm_path) / "GGUF"
|
||||
if gguf_dir not in scan_dirs:
|
||||
scan_dirs.append(gguf_dir)
|
||||
llm_p = Path(llm_path)
|
||||
if llm_p not in scan_dirs:
|
||||
scan_dirs.append(llm_p)
|
||||
except Exception:
|
||||
pass
|
||||
for scan_dir in scan_dirs:
|
||||
for scan_dir in _gguf_search_dirs(base_dir):
|
||||
local_models = ThinkingLLM_QwenVL_GGUF_PromptEnhancer._scan_local_gguf_text_models(scan_dir, existing_filenames)
|
||||
models.update(local_models)
|
||||
existing_filenames.update(Path(e.get("filename", "")).name for e in local_models.values() if e.get("filename"))
|
||||
@@ -481,6 +486,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
"keep_last_prompt": ("BOOLEAN", {"default": False, "tooltip": GGUF_PROMPT_TOOLTIPS["keep_last_prompt"]}),
|
||||
"stream_tokens_to_terminal": ("BOOLEAN", {"default": False, "tooltip": GGUF_PROMPT_TOOLTIPS["stream_tokens_to_terminal"]}),
|
||||
"enable_thinking": ("BOOLEAN", {"default": True, "tooltip": GGUF_PROMPT_TOOLTIPS["enable_thinking"]}),
|
||||
"auto_finalization_retry": ("BOOLEAN", {"default": False, "tooltip": GGUF_PROMPT_TOOLTIPS["auto_finalization_retry"]}),
|
||||
"hf_token": ("STRING", {"default": "", "multiline": False, "tooltip": GGUF_PROMPT_TOOLTIPS["hf_token"]}),
|
||||
},
|
||||
"hidden": {
|
||||
@@ -531,6 +537,18 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
if not quiet:
|
||||
print(f"[QwenVL PromptEnhancer DEBUG] VRAM cleanup completed")
|
||||
|
||||
@staticmethod
|
||||
def _find_existing_local_file_in_dirs(search_dirs: list[Path], filename: str, aliases: list[str] | None = None) -> Path | None:
|
||||
for search_dir in search_dirs:
|
||||
for wanted in _filename_search_candidates(filename, aliases):
|
||||
try:
|
||||
for candidate in search_dir.rglob(wanted):
|
||||
if candidate.is_file():
|
||||
return candidate
|
||||
except Exception:
|
||||
continue
|
||||
return None
|
||||
|
||||
def _resolve_model_path(self, model_name):
|
||||
models = self.gguf_models.get("models") or {}
|
||||
entry = models.get(model_name) or {}
|
||||
@@ -549,7 +567,8 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
if filename and Path(filename).is_absolute():
|
||||
return Path(filename)
|
||||
|
||||
base_dir = _resolve_base_dir(self.gguf_models.get("base_dir") or "LLM/GGUF")
|
||||
search_dirs = _gguf_search_dirs(self.gguf_models.get("base_dir") or "LLM/GGUF")
|
||||
base_dir = search_dirs[0]
|
||||
|
||||
path = entry.get("path")
|
||||
if path:
|
||||
@@ -564,7 +583,11 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
target = base_dir / repo_dir / Path(filename).name
|
||||
if target.exists():
|
||||
return target
|
||||
existing = _find_existing_local_file(base_dir, filename)
|
||||
existing = self._find_existing_local_file_in_dirs(
|
||||
search_dirs,
|
||||
filename,
|
||||
_as_filename_list(entry.get("local_filenames") or entry.get("local_model_files")),
|
||||
)
|
||||
if existing is not None:
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
try:
|
||||
@@ -715,6 +738,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
stream_to_terminal=False,
|
||||
initial_stage_label="INITIAL GENERATION",
|
||||
enable_thinking=True,
|
||||
auto_finalization_retry=False,
|
||||
):
|
||||
"""Returns (cleaned_prompt, raw_trace) tuple."""
|
||||
stream_display = TerminalStreamDisplay("QwenVL GGUF", suppress_planning=True, compact=True) if stream_to_terminal else None
|
||||
@@ -860,6 +884,8 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
best_cleaned = cleaned.strip()
|
||||
if _prompt_output_is_usable(best_cleaned):
|
||||
return best_cleaned, "\n\n".join(raw_trace_parts)
|
||||
if not auto_finalization_retry:
|
||||
return best_cleaned or "", "\n\n".join(raw_trace_parts)
|
||||
|
||||
current_raw = raw
|
||||
for attempt_number in range(2, _PROMPT_ENHANCER_MAX_FINALIZATION_ATTEMPTS + 1):
|
||||
@@ -924,6 +950,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
unique_id=None,
|
||||
extra_pnginfo=None,
|
||||
enable_thinking=True,
|
||||
auto_finalization_retry=False,
|
||||
hf_token="",
|
||||
):
|
||||
node_class = "ThinkingLLM_QwenVL_GGUF_PromptEnhancer"
|
||||
@@ -935,6 +962,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
english_output=bool(english_output),
|
||||
device=device,
|
||||
enable_thinking=bool(enable_thinking),
|
||||
auto_finalization_retry=bool(auto_finalization_retry),
|
||||
max_tokens=max_tokens,
|
||||
temperature=temperature,
|
||||
top_p=top_p,
|
||||
@@ -1021,6 +1049,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
stream_to_terminal=stream_tokens_to_terminal,
|
||||
initial_stage_label="INITIAL GENERATION",
|
||||
enable_thinking=effective_thinking,
|
||||
auto_finalization_retry=auto_finalization_retry,
|
||||
)
|
||||
full_raw_trace = raw_trace
|
||||
if english_output:
|
||||
@@ -1039,6 +1068,7 @@ class ThinkingLLM_QwenVL_GGUF_PromptEnhancer:
|
||||
stream_to_terminal=stream_tokens_to_terminal,
|
||||
initial_stage_label="TRANSLATION STAGE",
|
||||
enable_thinking=effective_thinking,
|
||||
auto_finalization_retry=auto_finalization_retry,
|
||||
)
|
||||
full_raw_trace = f"{raw_trace}\n\n{trans_trace}"
|
||||
final = clean_model_output(translated, OutputCleanConfig(mode="prompt")) or translated.strip()
|
||||
|
||||
@@ -30,6 +30,7 @@ from AILab_QwenVL import (
|
||||
HF_VL_MODELS,
|
||||
NODE_PROMPT_STATE,
|
||||
PROMPT_CACHE,
|
||||
_default_model_from_config,
|
||||
_make_node_state_key,
|
||||
apply_qwen_soft_thinking_directive,
|
||||
build_node_input_signature,
|
||||
@@ -155,7 +156,7 @@ class ThinkingLLM_QwenVL_PromptEnhancer(QwenVLBase):
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
models = list(HF_ALL_MODELS.keys())
|
||||
default_model = models[0] if models else "Qwen3-VL-4B-Instruct"
|
||||
default_model = _default_model_from_config(HF_ALL_MODELS, "Qwen3-VL-4B-Instruct")
|
||||
styles = list(cls.STYLES.keys())
|
||||
preferred_style = "📝 Enhance"
|
||||
default_style = preferred_style if preferred_style in styles else (styles[0] if styles else "📝 Enhance")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"_preset_prompts": [
|
||||
"🚫 No preset (image-only)",
|
||||
"💬 Custom prompt + image (no preset)",
|
||||
"🎦 LTX 2.3 NSFW I2V Scene",
|
||||
"🍿 Wan 2.2 NSFW I2V Timeline (3s)",
|
||||
"🍿 Wan 2.2 NSFW I2V Timeline (5s)",
|
||||
"🎥 Wan 2.2 NSFW I2V Scene (3s)",
|
||||
@@ -23,6 +25,8 @@
|
||||
],
|
||||
"qwenvl": {
|
||||
"🚫 No preset (image-only)": "",
|
||||
"💬 Custom prompt + image (no preset)": "",
|
||||
"🎦 LTX 2.3 NSFW I2V Scene": "You are an expert cinematic prompt director for LTX 2.3 image-to-video generation. Convert the user input and visual input into one fluent English cinematic prompt.\n\nRead the image first, then integrate the user text. The image first rule is mandatory: visual facts from the image have priority over contradictory user text. Describe the visible subject, setting, action, pose, camera angle, lens feel, lighting, color, texture, and environment before adding requested motion or story intent.\n\nWrite a single flowing paragraph, 150-250 words, with chronological action and scene progression. Start directly with the main action. Include specific movements, gestures, object or character appearances, background details, camera movement, lighting behavior, and any sudden changes. Keep the prompt literal, precise, and usable for LTX 2.3. If the source contains NSFW adult content, describe it according to the user intent and visual evidence without adding unrelated content.\n\nOutput the enhanced prompt only. No headings, labels, notes, examples, markdown, or reasoning. Do not exceed 250 words.",
|
||||
"🍿 Wan 2.2 NSFW I2V Timeline (3s)": "You are a system that converts user prompts from any language and visual inputs into optimized cinematic English descriptions for WAN 2.2 I2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Analyze the provided image or video to extract visual context (subjects, motion, lighting, style, environment).\n3. Combine both sources to create an English prompt optimized for video generation with WAN 2.2.\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the input image/video has stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 3 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; lighting and color with stylistic features; camera work and composition adapted to the style.\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- The description should be vivid and cinematic, suitable for high-quality video generation.\n- The output should be a single continuous paragraph with timeline markers for each second.\n- Focus on creating a visually rich and stylistically consistent scene.\n\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\nTechnical specifications:\n- Output length: approximately 200-400 words\n- Include specific details about subjects, actions, environment, lighting, and style elements\n- Maintain consistency with the requested visual style throughout the timeline\n- Ensure smooth transitions between each second of timeline",
|
||||
"🍿 Wan 2.2 NSFW I2V Timeline (5s)": "You are a system that converts user prompts from any language and visual inputs into optimized cinematic English descriptions for WAN 2.2 I2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Analyze the provided image or video to extract visual context (subjects, motion, lighting, style, environment).\n3. Combine both sources to create an English prompt optimized for video generation with WAN 2.2.\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the input image/video has stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 5 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; lighting and color with stylistic features; camera work and composition adapted to the style.\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- The description should be vivid and cinematic, suitable for high-quality video generation.\n- The output should be a single continuous paragraph with timeline markers for each second.\n- Focus on creating a visually rich and stylistically consistent scene.\n\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\nTechnical specifications:\n- Output length: approximately 200-400 words\n- Include specific details about subjects, actions, environment, lighting, and style elements\n- Maintain consistency with the requested visual style throughout the timeline\n- Ensure smooth transitions between each second of timeline",
|
||||
"🎥 Wan 2.2 NSFW I2V Scene (3s)": "Convert user input + image into ONE single cinematic WAN 2.2 prompt (3s total).\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Priority: User-specified > detected from image > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else if image has clear stylized characteristics, detect and enhance the existing style from the image\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nCRITICAL FORMAT:\n- Generate exactly ONE single prompt\n- Single prompt = 3 seconds of video\n- NO timeline markers like \"At X seconds:\"\n- 6-10 sentences for rich cinematic detail\n- Focus on complete scene description\n- DO NOT copy example text - generate original content\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=512 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 16384 or higher for better quality\n- Use image_max_tokens=2048 for detailed visual analysis\n- Set n_batch=256 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nIMPORTANT: Generate actual cinematic prompt, not example text.",
|
||||
@@ -40,6 +44,9 @@
|
||||
"qwen_text": {
|
||||
"translation_prompt": "You are a professional prompt translator and prompt-preservation editor. Return a single fluent English paragraph (400-800 words). Preserve every visual, stylistic, compositional, lighting, camera, texture, mood, and action detail from the source. Do not summarize or simplify. No prefixes, bullets, JSON, headings, markdown, quotes, or commentary. Output only the translated/enhanced prompt paragraph.",
|
||||
"styles": {
|
||||
"📖 LTX 2.3 NSFW T2V Scene": {
|
||||
"system_prompt": "You are an expert cinematic prompt director for LTX 2.3 text-to-video generation. Convert the user input into one fluent English cinematic prompt.\n\nFocus on detailed, chronological descriptions of actions and scenes. Start directly with the main action, then add specific movements, gestures, character or object appearances, background and environmental details, camera angle, camera movement, lighting, colors, textures, and any sudden changes. Keep the result literal, precise, and optimized for LTX 2.3 motion.\n\nDo not change the user input intent; enhance it. Preserve the requested subject, style, action, mood, and constraints. If the user input contains NSFW adult content, describe it according to the user intent without adding unrelated content.\n\nWrite a single flowing paragraph under 150 words. Output the enhanced prompt only. No headings, labels, notes, examples, markdown, or reasoning."
|
||||
},
|
||||
"📖 Wan 2.2 NSFW T2V Scene (20s)": {
|
||||
"system_prompt": "Generate 1 single T2V prompt for WAN 2.2 video generation (5s total) to establish initial scene.\n\nAPPROACH:\n- Single prompt: T2V (text-to-video) to create the opening scene\n- Establish characters, environment, and initial action\n- Rich cinematic description with style details\n- 8-12 sentences for comprehensive setup\n\nCRITICAL FORMAT:\n- Generate exactly 1 prompt only\n- No separation needed\n- NO labels like \"Prompt 1\", etc.\n- Focus on establishing the complete scene\n- Maintain consistent style\n\nSTYLE PRIORITY:\nUser-specified > detected > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Temperature 0.7-0.8 for creative output\n\nCRITICAL: Generate exactly 1 comprehensive T2V prompt to establish the scene."
|
||||
},
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import wave
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
WHISPER_MODEL_CHOICES = [
|
||||
"small",
|
||||
"base",
|
||||
"tiny",
|
||||
"medium",
|
||||
"large-v3",
|
||||
"distil-large-v3",
|
||||
]
|
||||
|
||||
WHISPER_LANGUAGE_CHOICES = [
|
||||
"auto",
|
||||
"en",
|
||||
"de",
|
||||
"fr",
|
||||
"es",
|
||||
"it",
|
||||
"pt",
|
||||
"nl",
|
||||
"pl",
|
||||
"tr",
|
||||
"ja",
|
||||
"ko",
|
||||
"zh",
|
||||
]
|
||||
|
||||
WHISPER_INSTALL_MESSAGE = (
|
||||
"[ThinkingLLM Whisper ASR] faster-whisper is not installed in this ComfyUI Python. "
|
||||
"Install it in the active ComfyUI Python with: python -m pip install faster-whisper"
|
||||
)
|
||||
|
||||
|
||||
def _clean_audio_file_path(audio_file_path) -> Path | None:
|
||||
if audio_file_path is None:
|
||||
return None
|
||||
raw_path = str(audio_file_path).strip().strip("\"'")
|
||||
if not raw_path:
|
||||
return None
|
||||
return Path(os.path.expandvars(raw_path)).expanduser()
|
||||
|
||||
|
||||
def _ffmpeg_path() -> str:
|
||||
ffmpeg = shutil.which("ffmpeg")
|
||||
if not ffmpeg:
|
||||
raise RuntimeError("ffmpeg was not found on PATH; install FFmpeg or connect a decoded ComfyUI AUDIO input")
|
||||
return ffmpeg
|
||||
|
||||
|
||||
def _decode_audio_file_to_wav(audio_file_path, target_path: Path) -> str:
|
||||
source_path = _clean_audio_file_path(audio_file_path)
|
||||
if source_path is None:
|
||||
raise ValueError("audio_file_path is empty")
|
||||
if not source_path.exists() or not source_path.is_file():
|
||||
raise FileNotFoundError(f"audio_file_path does not exist or is not a file: {source_path}")
|
||||
|
||||
result = subprocess.run(
|
||||
[
|
||||
_ffmpeg_path(),
|
||||
"-hide_banner",
|
||||
"-v",
|
||||
"error",
|
||||
"-i",
|
||||
str(source_path),
|
||||
"-vn",
|
||||
"-ac",
|
||||
"1",
|
||||
"-ar",
|
||||
"16000",
|
||||
"-acodec",
|
||||
"pcm_s16le",
|
||||
str(target_path),
|
||||
],
|
||||
check=False,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
if result.returncode != 0:
|
||||
raise RuntimeError(f"ffmpeg failed to decode audio_file_path: {result.stderr.strip() or 'unknown ffmpeg error'}")
|
||||
return str(source_path)
|
||||
|
||||
|
||||
def _audio_to_wav_file(audio, target_path: Path) -> str:
|
||||
if not isinstance(audio, dict):
|
||||
raise ValueError("expected ComfyUI AUDIO dict with waveform/sample_rate")
|
||||
waveform = audio.get("waveform")
|
||||
if waveform is None:
|
||||
raise ValueError("missing waveform")
|
||||
sample_rate = int(audio.get("sample_rate") or 0)
|
||||
if sample_rate <= 0:
|
||||
raise ValueError(f"invalid sample_rate={audio.get('sample_rate')!r}")
|
||||
|
||||
tensor = waveform.detach().cpu() if hasattr(waveform, "detach") else waveform
|
||||
tensor = tensor.cpu() if hasattr(tensor, "cpu") else tensor
|
||||
array = tensor.numpy() if hasattr(tensor, "numpy") else np.asarray(tensor)
|
||||
array = np.asarray(array, dtype=np.float32)
|
||||
if array.size == 0:
|
||||
raise ValueError("empty waveform")
|
||||
if array.ndim == 3:
|
||||
array = array[0]
|
||||
if array.ndim == 1:
|
||||
array = array[None, :]
|
||||
if array.ndim != 2:
|
||||
raise ValueError(f"unsupported waveform shape={getattr(array, 'shape', None)}")
|
||||
if array.shape[0] > array.shape[-1]:
|
||||
array = array.T
|
||||
if not np.all(np.isfinite(array)):
|
||||
array = np.nan_to_num(array, nan=0.0, posinf=1.0, neginf=-1.0)
|
||||
|
||||
mono = np.mean(array, axis=0).astype(np.float32)
|
||||
if sample_rate != 16000:
|
||||
target_length = max(1, int(round(float(mono.size) * 16000.0 / float(sample_rate))))
|
||||
old_positions = np.linspace(0.0, float(mono.size - 1), num=mono.size, dtype=np.float64)
|
||||
new_positions = np.linspace(0.0, float(mono.size - 1), num=target_length, dtype=np.float64)
|
||||
mono = np.interp(new_positions, old_positions, mono).astype(np.float32)
|
||||
|
||||
pcm16 = (np.clip(mono, -1.0, 1.0) * 32767.0).astype(np.int16)
|
||||
with wave.open(str(target_path), "wb") as wav:
|
||||
wav.setnchannels(1)
|
||||
wav.setsampwidth(2)
|
||||
wav.setframerate(16000)
|
||||
wav.writeframes(pcm16.tobytes())
|
||||
return "ComfyUI AUDIO input"
|
||||
|
||||
|
||||
def _resolve_whisper_device(device: str) -> str:
|
||||
if device == "auto":
|
||||
try:
|
||||
import torch
|
||||
|
||||
return "cuda" if torch.cuda.is_available() else "cpu"
|
||||
except Exception:
|
||||
return "cpu"
|
||||
return device
|
||||
|
||||
|
||||
def _resolve_compute_type(device: str, compute_type: str) -> str:
|
||||
if compute_type != "auto":
|
||||
return compute_type
|
||||
return "float16" if device == "cuda" else "int8"
|
||||
|
||||
|
||||
def _missing_audio_result(notes: list[str] | None = None) -> tuple[str, str, str]:
|
||||
message = (
|
||||
"[ThinkingLLM Whisper ASR] No usable audio input. Connect a ComfyUI AUDIO output "
|
||||
"or set audio_file_path to an existing M4A/MP3/WAV/FLAC file."
|
||||
)
|
||||
trace_lines = ["[AUDIO]", message]
|
||||
if notes:
|
||||
trace_lines.extend(str(note) for note in notes if note)
|
||||
return message, "[]", "\n".join(trace_lines)
|
||||
|
||||
|
||||
def _is_local_whisper_cache_miss(exc: Exception) -> bool:
|
||||
try:
|
||||
from huggingface_hub.errors import LocalEntryNotFoundError
|
||||
|
||||
if isinstance(exc, LocalEntryNotFoundError):
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
message = str(exc or "").lower()
|
||||
return "local_files_only" in message and "cached" in message
|
||||
|
||||
|
||||
class ThinkingLLM_Whisper_ASR:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"model_size": (WHISPER_MODEL_CHOICES, {"default": "small", "tooltip": "faster-whisper model size. small is a reliable Windows-friendly starting point; large-v3 is higher quality but downloads and runs much larger."}),
|
||||
"language": (WHISPER_LANGUAGE_CHOICES, {"default": "auto", "tooltip": "Audio language. Use auto to let Whisper detect it."}),
|
||||
"task": (["transcribe", "translate"], {"default": "transcribe", "tooltip": "transcribe preserves the original language; translate returns English."}),
|
||||
"device": (["cpu", "auto", "cuda"], {"default": "cpu", "tooltip": "cpu is the most reliable Windows default; choose cuda when your faster-whisper/CTranslate2 CUDA runtime is working."}),
|
||||
"compute_type": (["int8", "auto", "float16", "int8_float16", "float32"], {"default": "int8", "tooltip": "int8 is reliable on CPU. Use float16 or int8_float16 for CUDA."}),
|
||||
"beam_size": ("INT", {"default": 5, "min": 1, "max": 10, "tooltip": "Higher values can improve accuracy but run slower."}),
|
||||
"vad_filter": ("BOOLEAN", {"default": True, "tooltip": "Skip long silence and non-speech sections before transcription."}),
|
||||
},
|
||||
"optional": {
|
||||
"audio": ("AUDIO",),
|
||||
"audio_file_path": ("STRING", {"default": "", "multiline": False, "tooltip": "Optional local audio file path. M4A, MP3, WAV, FLAC, and other FFmpeg-readable files are decoded to 16 kHz mono WAV before Whisper."}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING")
|
||||
RETURN_NAMES = ("TRANSCRIPT", "SEGMENTS_JSON", "RAW_TRACE")
|
||||
FUNCTION = "process"
|
||||
CATEGORY = "ThinkingLLM/Audio"
|
||||
|
||||
def process(
|
||||
self,
|
||||
model_size: str,
|
||||
language: str,
|
||||
task: str,
|
||||
device: str,
|
||||
compute_type: str,
|
||||
beam_size: int,
|
||||
vad_filter: bool,
|
||||
audio=None,
|
||||
audio_file_path="",
|
||||
):
|
||||
notes: list[str] = []
|
||||
clean_path = _clean_audio_file_path(audio_file_path)
|
||||
if audio is None and clean_path is None:
|
||||
return _missing_audio_result()
|
||||
|
||||
try:
|
||||
from faster_whisper import WhisperModel
|
||||
except Exception as exc:
|
||||
trace = "\n".join(["[WHISPER]", WHISPER_INSTALL_MESSAGE, f"import_error={exc}"])
|
||||
return WHISPER_INSTALL_MESSAGE, "[]", trace
|
||||
|
||||
with tempfile.TemporaryDirectory(prefix="thinkingllm-whisper-") as temp_dir:
|
||||
wav_path = Path(temp_dir) / "audio.wav"
|
||||
try:
|
||||
if clean_path is not None:
|
||||
source_label = _decode_audio_file_to_wav(str(clean_path), wav_path)
|
||||
else:
|
||||
source_label = _audio_to_wav_file(audio, wav_path)
|
||||
except Exception as exc:
|
||||
return _missing_audio_result([str(exc)])
|
||||
|
||||
resolved_device = _resolve_whisper_device(str(device))
|
||||
resolved_compute_type = _resolve_compute_type(resolved_device, str(compute_type))
|
||||
local_files_only = True
|
||||
try:
|
||||
model = WhisperModel(
|
||||
str(model_size),
|
||||
device=resolved_device,
|
||||
compute_type=resolved_compute_type,
|
||||
local_files_only=True,
|
||||
)
|
||||
except Exception as exc:
|
||||
if not _is_local_whisper_cache_miss(exc):
|
||||
raise
|
||||
notes.append("Local Whisper cache miss; downloaded model from Hugging Face once.")
|
||||
local_files_only = False
|
||||
model = WhisperModel(
|
||||
str(model_size),
|
||||
device=resolved_device,
|
||||
compute_type=resolved_compute_type,
|
||||
local_files_only=False,
|
||||
)
|
||||
segments_iter, info = model.transcribe(
|
||||
str(wav_path),
|
||||
language=None if language == "auto" else str(language),
|
||||
task=str(task),
|
||||
beam_size=int(beam_size),
|
||||
vad_filter=bool(vad_filter),
|
||||
)
|
||||
segments = [
|
||||
{
|
||||
"start": float(segment.start),
|
||||
"end": float(segment.end),
|
||||
"text": str(segment.text).strip(),
|
||||
}
|
||||
for segment in segments_iter
|
||||
]
|
||||
|
||||
transcript = "\n".join(segment["text"] for segment in segments if segment["text"]).strip()
|
||||
segments_json = json.dumps(segments, ensure_ascii=False, indent=2)
|
||||
detected_language = getattr(info, "language", None)
|
||||
detected_probability = getattr(info, "language_probability", None)
|
||||
duration = getattr(info, "duration", None)
|
||||
trace = "\n".join(
|
||||
[
|
||||
"[WHISPER]",
|
||||
f"source={source_label}",
|
||||
f"model_size={model_size}; device={resolved_device}; compute_type={resolved_compute_type}; local_files_only={local_files_only}; task={task}; vad_filter={bool(vad_filter)}",
|
||||
f"language={detected_language}; language_probability={detected_probability}; duration={duration}",
|
||||
f"segments={len(segments)}; transcript_chars={len(transcript)}",
|
||||
*notes,
|
||||
]
|
||||
)
|
||||
return transcript, segments_json, trace
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"ThinkingLLM_Whisper_ASR": ThinkingLLM_Whisper_ASR,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"ThinkingLLM_Whisper_ASR": "ThinkingLLM Whisper ASR",
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# ComfyUI-ThinkingLLM
|
||||
|
||||
**ThinkingLLM** is a local-LLM custom-node pack for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that wraps Qwen3.5, Qwen3, and Qwen2.5-VL models behind a cleaner node interface with thinking-mode control, live token streaming, and a raw trace output for debugging.
|
||||
**ThinkingLLM** is a local-LLM custom-node pack for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that wraps Qwen3.5, Qwen3, Qwen-VL, Gemma 4, and Whisper ASR behind a cleaner node interface with thinking-mode control, audio/vision workflows, live token streaming, and a raw trace output for debugging.
|
||||
|
||||
📺 **[Watch the demo](https://youtu.be/K1JsvnzujOw)** for a better viewing experience.
|
||||
|
||||
@@ -13,6 +13,15 @@
|
||||
|
||||
## What ThinkingLLM adds
|
||||
|
||||
### Model guidance box
|
||||
|
||||
ThinkingLLM nodes add a read-only `recommended_settings` info box.
|
||||
|
||||
- It explains the selected model family and recommended generation settings.
|
||||
- It does not change your saved widget values.
|
||||
- For GGUF audio-capable nodes, it tells you whether the selected model actually supports audio.
|
||||
- In Advanced GGUF nodes, if you connect or expose audio for a model without known audio support, the box warns you instead of silently implying that audio will work.
|
||||
|
||||
### The Thinking Toggle
|
||||
|
||||
Every ThinkingLLM node exposes an `enable_thinking` toggle.
|
||||
@@ -40,6 +49,15 @@ Each node returns a second string output named `RAW_TRACE`.
|
||||
|
||||
That makes it possible to inspect what the model thought about the prompt while still keeping the primary output clean.
|
||||
|
||||
### Audio support
|
||||
|
||||
Audio is available through dedicated nodes so the model list stays honest:
|
||||
|
||||
- `ThinkingLLM Gemma 4 Audio (GGUF)` for Gemma 4 audio-capable models.
|
||||
- `ThinkingLLM Whisper ASR` for reliable speech-to-text transcription through `faster-whisper`.
|
||||
|
||||
The Advanced GGUF node also exposes optional `audio`, but this is for power users. Use the info box before assuming a model can hear audio. Normal Qwen/Qwen-VL models are not audio models.
|
||||
|
||||
## Nodes
|
||||
|
||||
### Transformers / HF nodes
|
||||
@@ -58,15 +76,17 @@ HF tokenizer note: some Gemma and Qwen variants need `sentencepiece` or `tiktoke
|
||||
|
||||
- `ThinkingLLM (GGUF)`
|
||||
- `ThinkingLLM (GGUF Advanced)`
|
||||
- `ThinkingLLM Gemma 4 Audio (GGUF)`
|
||||
- `ThinkingLLM Prompt Enhancer (GGUF)`
|
||||
|
||||
The GGUF path requires a vision-capable `llama-cpp-python` build. The normal PyPI package is not enough for Qwen vision handlers. On Linux, ThinkingLLM now auto-checks this at first GGUF use and attempts an automatic install of a matching JamePeng backend. Use the setup notes in [docs/LLAMA_CPP_PYTHON_VISION_INSTALL.md](docs/LLAMA_CPP_PYTHON_VISION_INSTALL.md) if you need to override the wheel/package source.
|
||||
The GGUF path requires a multimodal-capable `llama-cpp-python` build. The normal PyPI package may not include the chat handlers needed for Qwen vision, Gemma 4, or MTMD audio. On Linux, ThinkingLLM auto-checks this at first GGUF use and attempts an automatic install of a matching JamePeng backend. Use the setup notes in [docs/LLAMA_CPP_PYTHON_VISION_INSTALL.md](docs/LLAMA_CPP_PYTHON_VISION_INSTALL.md) if you need to override the wheel/package source.
|
||||
|
||||
## Workflow tips
|
||||
|
||||
- **Pre-process input images** — use a resize or scale node before ThinkingLLM so large images don't blow up the context window.
|
||||
- **Display the output** — connect RESPONSE or ENHANCED_OUTPUT to a **Show Text** or **Show Anything** node to see the generated text in the UI.
|
||||
- **Inspect reasoning** — connect the RAW_TRACE output to a second Show Text node to see what the model was thinking.
|
||||
- **Use the dedicated audio nodes first** — Gemma 4 Audio is for audio understanding; Whisper ASR is for transcription. The Advanced GGUF audio input is intentionally more flexible, but the info box will warn you when the selected model has no curated audio support.
|
||||
|
||||
## Supported models
|
||||
|
||||
@@ -94,17 +114,36 @@ ThinkingLLM supports these model families out of the box, with pre-configured en
|
||||
### Gemma 4 — Vision-language (HF)
|
||||
- Gemma-4-E2B-it / Uncensored
|
||||
- Gemma-4-E4B-it / Uncensored
|
||||
- Gemma-4-12B
|
||||
- Gemma-4-26B-A4B-it / Heretic
|
||||
- Gemma-4-31B-it
|
||||
|
||||
### Gemma 4 — Vision-language (GGUF)
|
||||
- Gemma-4-E2B / E4B (Q4 K M through BF16, uncensored)
|
||||
- Gemma-4-12B-it (Q4/Q5/Q6/Q8/BF16/UD-Q4)
|
||||
- Gemma-4-26B-A4B-it (Q4 K M through BF16)
|
||||
- Gemma-4-31B-it (Q4 K M through BF16)
|
||||
|
||||
### Gemma 4 — Audio (GGUF)
|
||||
- Gemma-4-E2B / E4B when present in the GGUF multimodal catalog
|
||||
- Gemma-4-12B-it via `unsloth/gemma-4-12b-it-GGUF`
|
||||
|
||||
Use `ThinkingLLM Gemma 4 Audio (GGUF)` for the clean audio-only interface. Gemma 4 audio currently depends on a recent multimodal `llama-cpp-python`/`Gemma4ChatHandler` build, so check `RAW_TRACE` if audio behaves unexpectedly.
|
||||
|
||||
### Whisper — ASR
|
||||
- tiny
|
||||
- base
|
||||
- small
|
||||
- medium
|
||||
- large-v3
|
||||
- distil-large-v3
|
||||
|
||||
Use `ThinkingLLM Whisper ASR` for transcription. It accepts a connected ComfyUI `AUDIO` input or an `audio_file_path` pointing to M4A, MP3, WAV, FLAC, or any FFmpeg-readable audio file. The node uses `faster-whisper`; first use may download the selected Whisper model into the Hugging Face cache. The default is `small` on CPU with `int8`, which is slower than CUDA but reliable on Windows; switch to CUDA once the local CTranslate2 CUDA runtime is confirmed working.
|
||||
|
||||
### Gemma 4 — Text-only (HF)
|
||||
- Gemma-4-E2B-it / Uncensored
|
||||
- Gemma-4-E4B-it / Uncensored
|
||||
- Gemma-4-12B
|
||||
- Gemma-4-26B-A4B-it / Heretic
|
||||
- Gemma-4-31B-it
|
||||
|
||||
@@ -141,6 +180,8 @@ For local GGUF models, keep the matching mmproj file beside the model file.
|
||||
- HF is the recommended default path and is the simplest cross-platform option.
|
||||
- GGUF on Windows needs a matching `win_amd64` vision-capable wheel.
|
||||
- GGUF on Linux now auto-installs a matching backend on first use when possible. Override with `THINKINGLLM_LLAMA_CPP_LINUX_WHEEL_URL` or `THINKINGLLM_LLAMA_CPP_LINUX_SPEC` when your server needs a different build.
|
||||
- GGUF audio needs an audio-capable multimodal backend. `Gemma4ChatHandler` is used for Gemma 4.
|
||||
- Whisper ASR needs `faster-whisper` and FFmpeg. The node returns an install hint if `faster-whisper` is missing.
|
||||
- Flash Attention support is best on Linux. The nodes fall back when it is unavailable.
|
||||
- The thinking toggle works best with Qwen3.5 and Qwen3 style models. Other architectures may ignore the steering.
|
||||
|
||||
|
||||
+36
-3
@@ -3,7 +3,7 @@
|
||||
"name": "ComfyUI-ThinkingLLM",
|
||||
"description": "A multimodal ComfyUI AI node with Qwen3.5, Qwen3-VL, Qwen2.5-VL, Qwen3, and Gemma 4 integrations. Features live thinking in the terminal to see what the LLM is doing in real time.",
|
||||
"author": "goodguy1963",
|
||||
"version": "2.3.4",
|
||||
"version": "2.3.14",
|
||||
"url": "https://github.com/goodguy1963/ComfyUI-ThinkingLLM",
|
||||
"category": "image"
|
||||
}
|
||||
@@ -21,6 +21,15 @@ NODE_CLASS_MAPPINGS = {}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {}
|
||||
WEB_DIRECTORY = "./web"
|
||||
|
||||
LEGACY_NODE_REPLACEMENTS = {
|
||||
"AILab_QwenVL": "ThinkingLLM_QwenVL",
|
||||
"AILab_QwenVL_Advanced": "ThinkingLLM_QwenVL_Advanced",
|
||||
"AILab_QwenVL_GGUF": "ThinkingLLM_QwenVL_GGUF",
|
||||
"AILab_QwenVL_GGUF_Advanced": "ThinkingLLM_QwenVL_GGUF_Advanced",
|
||||
"AILab_QwenVL_PromptEnhancer": "ThinkingLLM_QwenVL_PromptEnhancer",
|
||||
"AILab_QwenVL_GGUF_PromptEnhancer": "ThinkingLLM_QwenVL_GGUF_PromptEnhancer",
|
||||
}
|
||||
|
||||
def load_modules_from_directory(directory):
|
||||
for file in os.listdir(directory):
|
||||
if file.endswith(".py"):
|
||||
@@ -50,10 +59,34 @@ load_modules_from_directory(current_dir)
|
||||
nodes_dir = os.path.join(current_dir, "nodes")
|
||||
if os.path.exists(nodes_dir):
|
||||
load_modules_from_directory(nodes_dir)
|
||||
|
||||
for legacy_node_name in LEGACY_NODE_REPLACEMENTS:
|
||||
NODE_CLASS_MAPPINGS.pop(legacy_node_name, None)
|
||||
NODE_DISPLAY_NAME_MAPPINGS.pop(legacy_node_name, None)
|
||||
|
||||
|
||||
def _register_legacy_node_replacements():
|
||||
try:
|
||||
from comfy_api.latest._io import NodeReplace
|
||||
from server import PromptServer
|
||||
except Exception:
|
||||
return
|
||||
|
||||
manager = getattr(getattr(PromptServer, "instance", None), "node_replace_manager", None)
|
||||
if manager is None:
|
||||
return
|
||||
|
||||
for old_node_id, new_node_id in LEGACY_NODE_REPLACEMENTS.items():
|
||||
manager.register(NodeReplace(new_node_id=new_node_id, old_node_id=old_node_id))
|
||||
|
||||
|
||||
_register_legacy_node_replacements()
|
||||
|
||||
NODE_CLASS_MAPPINGS = dict(sorted(NODE_CLASS_MAPPINGS.items(), key=lambda x: NODE_DISPLAY_NAME_MAPPINGS.get(x[0], x[0])))
|
||||
NODE_DISPLAY_NAME_MAPPINGS = dict(sorted(NODE_DISPLAY_NAME_MAPPINGS.items(), key=lambda x: x[1]))
|
||||
|
||||
__all__ = [
|
||||
"NODE_CLASS_MAPPINGS",
|
||||
"NODE_DISPLAY_NAME_MAPPINGS"
|
||||
]
|
||||
"NODE_DISPLAY_NAME_MAPPINGS",
|
||||
"LEGACY_NODE_REPLACEMENTS",
|
||||
]
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@
|
||||
"description": "A multimodal ComfyUI AI node with Qwen3.5, Qwen3-VL, Qwen2.5-VL, Qwen3, and Gemma 4 integrations. Features live thinking in the terminal to see what the LLM is doing in real time.",
|
||||
"category": "image",
|
||||
"tags": ["vision", "language", "multimodal", "thinkingllm", "qwen", "gguf", "flash_attention", "performance", "wan2.2", "video", "i2v", "t2v", "storyboard", "caching", "fork", "gpl-3.0"],
|
||||
"version": "2.3.4"
|
||||
"version": "2.3.14"
|
||||
}
|
||||
|
||||
+86
-5
@@ -251,6 +251,24 @@
|
||||
"context_length": 262144
|
||||
}
|
||||
},
|
||||
"Gemma-4-12B-it-GGUF [Q4:7.5GB|Q5:9GB|Q6:11GB|Q8:13GB|BF16:24GB|VRAM:~12GB]": {
|
||||
"author": "unsloth",
|
||||
"repo_name": "gemma-4-12b-it-GGUF",
|
||||
"repo_id": "unsloth/gemma-4-12b-it-GGUF",
|
||||
"model_files": [
|
||||
"gemma-4-12b-it-Q4_K_M.gguf",
|
||||
"gemma-4-12b-it-Q4_K_S.gguf",
|
||||
"gemma-4-12b-it-Q5_K_M.gguf",
|
||||
"gemma-4-12b-it-Q5_K_S.gguf",
|
||||
"gemma-4-12b-it-Q6_K.gguf",
|
||||
"gemma-4-12b-it-Q8_0.gguf",
|
||||
"gemma-4-12b-it-BF16.gguf",
|
||||
"gemma-4-12b-it-UD-Q4_K_XL.gguf"
|
||||
],
|
||||
"defaults": {
|
||||
"context_length": 262144
|
||||
}
|
||||
},
|
||||
"Gemma-4-31B-it-GGUF [Q4:20GB|Q8:32GB|VRAM:~22GB]": {
|
||||
"author": "unsloth",
|
||||
"repo_name": "gemma-4-31B-it-GGUF",
|
||||
@@ -270,11 +288,19 @@
|
||||
"repo_name": "google_gemma-4-E4B-it-GGUF",
|
||||
"repo_id": "bartowski/google_gemma-4-E4B-it-GGUF",
|
||||
"model_files": [
|
||||
"gemma-4-E4B-it-Q4_K_M.gguf",
|
||||
"gemma-4-E4B-it-Q6_K.gguf",
|
||||
"gemma-4-E4B-it-Q8_0.gguf",
|
||||
"gemma-4-E4B-it-BF16.gguf"
|
||||
"google_gemma-4-E4B-it-Q4_K_M.gguf",
|
||||
"google_gemma-4-E4B-it-Q5_K_M.gguf",
|
||||
"google_gemma-4-E4B-it-Q6_K.gguf",
|
||||
"google_gemma-4-E4B-it-Q8_0.gguf",
|
||||
"google_gemma-4-E4B-it-bf16.gguf"
|
||||
],
|
||||
"local_filenames": {
|
||||
"google_gemma-4-E4B-it-Q4_K_M.gguf": ["gemma-4-E4B-it-Q4_K_M.gguf"],
|
||||
"google_gemma-4-E4B-it-Q5_K_M.gguf": ["gemma-4-E4B-it-Q5_K_M.gguf"],
|
||||
"google_gemma-4-E4B-it-Q6_K.gguf": ["gemma-4-E4B-it-Q6_K.gguf"],
|
||||
"google_gemma-4-E4B-it-Q8_0.gguf": ["gemma-4-E4B-it-Q8_0.gguf"],
|
||||
"google_gemma-4-E4B-it-bf16.gguf": ["gemma-4-E4B-it-BF16.gguf"]
|
||||
},
|
||||
"defaults": {
|
||||
"context_length": 131072
|
||||
}
|
||||
@@ -441,6 +467,61 @@
|
||||
"pool_size": 4194304
|
||||
}
|
||||
},
|
||||
"Gemma-4-12B-it-GGUF [Q4:7.5GB|Q5:9GB|Q6:11GB|Q8:13GB|BF16:24GB|VRAM:~12GB]": {
|
||||
"author": "unsloth",
|
||||
"repo_name": "gemma-4-12b-it-GGUF",
|
||||
"repo_id": "unsloth/gemma-4-12b-it-GGUF",
|
||||
"mmproj_file": "mmproj-F16.gguf",
|
||||
"model_files": [
|
||||
"gemma-4-12b-it-Q4_K_M.gguf",
|
||||
"gemma-4-12b-it-Q4_K_S.gguf",
|
||||
"gemma-4-12b-it-Q5_K_M.gguf",
|
||||
"gemma-4-12b-it-Q5_K_S.gguf",
|
||||
"gemma-4-12b-it-Q6_K.gguf",
|
||||
"gemma-4-12b-it-Q8_0.gguf",
|
||||
"gemma-4-12b-it-BF16.gguf",
|
||||
"gemma-4-12b-it-UD-Q4_K_XL.gguf"
|
||||
],
|
||||
"defaults": {
|
||||
"context_length": 262144,
|
||||
"image_max_tokens": 4096,
|
||||
"n_batch": 512,
|
||||
"gpu_layers": -1,
|
||||
"top_k": 64,
|
||||
"pool_size": 4194304
|
||||
}
|
||||
},
|
||||
"google_gemma-4-E4B-it-GGUF [Q4:5.4GB|Q5:5.8GB|Q6:6.3GB|Q8:8GB|BF16:15GB|VRAM:~7GB]": {
|
||||
"author": "bartowski",
|
||||
"repo_name": "google_gemma-4-E4B-it-GGUF",
|
||||
"repo_id": "bartowski/google_gemma-4-E4B-it-GGUF",
|
||||
"mmproj_file": "mmproj-google_gemma-4-E4B-it-f16.gguf",
|
||||
"model_files": [
|
||||
"google_gemma-4-E4B-it-Q4_K_M.gguf",
|
||||
"google_gemma-4-E4B-it-Q5_K_M.gguf",
|
||||
"google_gemma-4-E4B-it-Q6_K.gguf",
|
||||
"google_gemma-4-E4B-it-Q8_0.gguf",
|
||||
"google_gemma-4-E4B-it-bf16.gguf"
|
||||
],
|
||||
"local_filenames": {
|
||||
"google_gemma-4-E4B-it-Q4_K_M.gguf": ["gemma-4-E4B-it-Q4_K_M.gguf"],
|
||||
"google_gemma-4-E4B-it-Q5_K_M.gguf": ["gemma-4-E4B-it-Q5_K_M.gguf"],
|
||||
"google_gemma-4-E4B-it-Q6_K.gguf": ["gemma-4-E4B-it-Q6_K.gguf"],
|
||||
"google_gemma-4-E4B-it-Q8_0.gguf": ["gemma-4-E4B-it-Q8_0.gguf"],
|
||||
"google_gemma-4-E4B-it-bf16.gguf": ["gemma-4-E4B-it-BF16.gguf"]
|
||||
},
|
||||
"mmproj_local_filenames": {
|
||||
"mmproj-google_gemma-4-E4B-it-f16.gguf": ["mmproj-F16.gguf", "mmproj-BF16.gguf"]
|
||||
},
|
||||
"defaults": {
|
||||
"context_length": 131072,
|
||||
"image_max_tokens": 4096,
|
||||
"n_batch": 512,
|
||||
"gpu_layers": -1,
|
||||
"top_k": 64,
|
||||
"pool_size": 4194304
|
||||
}
|
||||
},
|
||||
"Qwen3-VL-4B-Instruct-c_abliterated-v2-GGUF [Q4:2.4GB|Q5:2.8GB|Q6:3.2GB|Q8:4.2GB|F16:8GB|VRAM:~4GB]": {
|
||||
"author": "mradermacher",
|
||||
"repo_name": "Qwen3-VL-4B-Instruct-c_abliterated-v2-GGUF",
|
||||
@@ -579,4 +660,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
-2
@@ -2,7 +2,7 @@
|
||||
"hf_vl_models": {
|
||||
"Qwen3.5-4B-heretic-v2 [DL: 7.5GB, VRAM: 9.0GB]": {
|
||||
"repo_id": "tvall43/Qwen3.5-4B-heretic-v2",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"quantized": false,
|
||||
"vram_requirement": {
|
||||
"full": 9.0
|
||||
@@ -142,6 +142,16 @@
|
||||
"4bit": 16.0
|
||||
}
|
||||
},
|
||||
"Gemma-4-12B [DL: 24GB, VRAM: 24.0GB]": {
|
||||
"repo_id": "google/gemma-4-12B",
|
||||
"default": false,
|
||||
"quantized": false,
|
||||
"vram_requirement": {
|
||||
"full": 24.0,
|
||||
"8bit": 13.0,
|
||||
"4bit": 8.0
|
||||
}
|
||||
},
|
||||
"Gemma-4-E4B-Uncensored [DL: 16GB, VRAM: 7.0GB]": {
|
||||
"repo_id": "prithivMLmods/gemma-4-E4B-it-Uncensored-MAX",
|
||||
"default": false,
|
||||
@@ -294,6 +304,16 @@
|
||||
"4bit": 16.0
|
||||
}
|
||||
},
|
||||
"Gemma-4-12B [DL: 24GB, VRAM: 24.0GB]": {
|
||||
"repo_id": "google/gemma-4-12B",
|
||||
"default": false,
|
||||
"quantized": false,
|
||||
"vram_requirement": {
|
||||
"full": 24.0,
|
||||
"8bit": 13.0,
|
||||
"4bit": 8.0
|
||||
}
|
||||
},
|
||||
"Gemma-4-E4B-Uncensored [DL: 16GB, VRAM: 7.0GB]": {
|
||||
"repo_id": "prithivMLmods/gemma-4-E4B-it-Uncensored-MAX",
|
||||
"default": false,
|
||||
@@ -345,4 +365,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
[project]
|
||||
name = "ComfyUI-ThinkingLLM"
|
||||
description = "A multimodal ComfyUI AI node with Qwen3.5, Qwen3-VL, Qwen2.5-VL, Qwen3, and Gemma 4 integrations. Features live thinking in the terminal to see what the LLM is doing in real time."
|
||||
version = "2.3.4"
|
||||
version = "2.3.14"
|
||||
license = {file = "LICENSE"}
|
||||
dependencies = ["transformers>=5.2.0", "torch", "huggingface-hub", "hf_xet", "psutil", "numpy", "Pillow", "opencv-python", "bitsandbytes", "accelerate", "sentencepiece", "tiktoken", "llama-cpp-python"]
|
||||
dependencies = ["transformers>=5.2.0", "torch", "huggingface-hub", "hf_xet", "psutil", "numpy", "Pillow", "opencv-python", "bitsandbytes", "accelerate", "sentencepiece", "tiktoken", "faster-whisper", "llama-cpp-python"]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/goodguy1963/ComfyUI-ThinkingLLM"
|
||||
|
||||
@@ -13,6 +13,7 @@ bitsandbytes
|
||||
accelerate
|
||||
sentencepiece
|
||||
tiktoken
|
||||
faster-whisper
|
||||
|
||||
# For running GGUF models with vision support
|
||||
# The [server] extra installs necessary components for multimodal models
|
||||
|
||||
+1606
-4
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,85 @@
|
||||
# ComfyUI-QwenVL Update Log
|
||||
|
||||
## Version 2.3.14 (2026/06/20) — Gemma4 GGUF Stability Release
|
||||
|
||||
### 2.3.14 Changes
|
||||
|
||||
- Stabilized `google_gemma-4-E4B-it-GGUF` multimodal runs by applying Gemma4-compatible GGUF image settings before llama.cpp execution.
|
||||
- Pinned llama.cpp `main_gpu` to ComfyUI's selected CUDA device so GGUF loads do not drift to the wrong card after CUDA state changes.
|
||||
- Blocked unsupported Gemma4 GGUF audio before native llama.cpp can abort the ComfyUI process.
|
||||
- Reused existing mapped GGUF model files across ComfyUI `LLM` model paths to avoid redundant downloads.
|
||||
- Removed duplicate legacy ThinkingLLM search entries from the ComfyUI node list.
|
||||
|
||||
### 2.3.14 Validation
|
||||
|
||||
- Full local regression suite passes.
|
||||
- Live NVIDIA portable ComfyUI test completed successfully with `google_gemma-4-E4B-it-Q8_0.gguf` and an image prompt.
|
||||
|
||||
## Version 2.3.13 (2026/06/20) — Recommendation Note Cleanup
|
||||
|
||||
### 2.3.13 Changes
|
||||
|
||||
- Removed duplicate compact recommendation-note rows from ThinkingLLM nodes, including Advanced GGUF.
|
||||
- Kept the real multiline recommendation note visible while pruning stale duplicate `recommended_settings` widgets.
|
||||
- Prevented recommendation notes from being serialized back into workflows as duplicate UI-only widgets.
|
||||
|
||||
### 2.3.13 Validation
|
||||
|
||||
- Added regression coverage for recommendation widget deduplication.
|
||||
- Full local regression suite passes.
|
||||
|
||||
## Version 2.3.12 (2026/06/20) — Rollback Recovery Release
|
||||
|
||||
### 2.3.12 Changes
|
||||
|
||||
- Rebased the public release line onto the rollback-safe GGUF single-pass state from 2.3.11.
|
||||
- Preserved the ComfyUI execution highlight behavior by no longer overwriting node colors once ComfyUI has set them.
|
||||
- Restored the saved-workflow compatible `Custom prompt + image (no preset)` option.
|
||||
|
||||
### 2.3.12 Validation
|
||||
|
||||
- Local regression coverage verifies the execution color guard and the restored no-preset alias.
|
||||
- Full local regression suite passes.
|
||||
|
||||
## Version 2.3.11 (2026/06/19) — GGUF Single-Pass Execution Fix
|
||||
|
||||
### 2.3.11 Changes
|
||||
|
||||
- Disabled automatic GGUF finalization retries by default so one node execution performs one LLM generation pass unless explicitly configured otherwise.
|
||||
- Added `auto_finalization_retry` to `ThinkingLLM (GGUF)`, `ThinkingLLM Advanced (GGUF)`, `ThinkingLLM Gemma 4 Audio (GGUF)`, and `ThinkingLLM Prompt Enhancer (GGUF)` for users who still want the old empty/reasoning-only retry behavior.
|
||||
- Fixed catalogued GGUF model reuse across ComfyUI `extra_model_paths.yaml` `LLM` mappings, preventing unnecessary re-downloads when models already exist in a shared `models/LLM/GGUF` directory.
|
||||
|
||||
### 2.3.11 Validation
|
||||
|
||||
- Added regression coverage for default single-pass GGUF execution, explicit opt-in finalization retry, GGUF node UI defaults, and shared `LLM/GGUF` model reuse.
|
||||
- Targeted GGUF tests pass.
|
||||
|
||||
## Version 2.3.10 (2026/06/19) — ComfyUI 2.0 Advanced GGUF Layout Fix
|
||||
|
||||
### 2.3.10 Changes
|
||||
|
||||
- Fixed the large blank area in `ThinkingLLM Advanced (GGUF)` under ComfyUI Nodes 2.0 by no longer hiding real advanced tuning widgets behind a layout hack.
|
||||
- Kept legacy workflow compatibility shims hidden while exposing `n_ubatch`, thread, flash-attention, KQV offload, and context-checkpoint controls.
|
||||
- Added regression coverage for the ComfyUI 2.0 layout compatibility rule.
|
||||
|
||||
### 2.3.10 Validation
|
||||
|
||||
- Targeted Advanced GGUF compatibility tests pass.
|
||||
- Full local regression test file passes.
|
||||
|
||||
## Version 2.3.6 (2026/06/14) — GGUF Context Reset Hardening
|
||||
|
||||
### 2.3.6 Changes
|
||||
|
||||
- Moved GGUF llama context reset to run immediately before each internal `create_chat_completion` call.
|
||||
- Covers both normal generation and finalization retry calls while preserving `keep_model_loaded=True` model reuse.
|
||||
- Added regression coverage that verifies reset happens before completion and before retry/finalization completions.
|
||||
|
||||
### 2.3.6 Validation
|
||||
|
||||
- Targeted reset regression suite passes.
|
||||
- Full local test file still has the known Linux-host failures for Windows DLL-directory tests only.
|
||||
|
||||
## v1.0.9 (Local Fork) — May 2026
|
||||
|
||||
### New Features
|
||||
|
||||
+158
-15
@@ -15,7 +15,17 @@ const NODE_COLORS = {
|
||||
"AILab_QwenVL_GGUF": "QwenVLGGUF",
|
||||
"AILab_QwenVL_GGUF_Advanced": "QwenVLGGUF",
|
||||
"AILab_QwenVL_GGUF_PromptEnhancer": "Enhancer",
|
||||
"ThinkingLLM_QwenVL": "QwenVL",
|
||||
"ThinkingLLM_QwenVL_Advanced": "QwenVL",
|
||||
"ThinkingLLM_QwenVL_PromptEnhancer": "Enhancer",
|
||||
"ThinkingLLM_QwenVL_GGUF": "QwenVLGGUF",
|
||||
"ThinkingLLM_QwenVL_GGUF_Advanced": "QwenVLGGUF",
|
||||
"ThinkingLLM_Gemma4_Audio_GGUF": "QwenVLGGUF",
|
||||
"ThinkingLLM_Whisper_ASR": "QwenVLGGUF",
|
||||
"ThinkingLLM_QwenVL_GGUF_PromptEnhancer": "Enhancer",
|
||||
"AILab_QwenVL_PromptLibrary": "Tools",
|
||||
"VRAMCleanup": "Tools",
|
||||
"StorySplitNode": "Tools",
|
||||
};
|
||||
|
||||
const THINKINGLLM_NODE_NAMES = new Set([
|
||||
@@ -30,26 +40,35 @@ const THINKINGLLM_NODE_NAMES = new Set([
|
||||
"ThinkingLLM_QwenVL_PromptEnhancer",
|
||||
"ThinkingLLM_QwenVL_GGUF",
|
||||
"ThinkingLLM_QwenVL_GGUF_Advanced",
|
||||
"ThinkingLLM_Gemma4_Audio_GGUF",
|
||||
"ThinkingLLM_Whisper_ASR",
|
||||
"ThinkingLLM_QwenVL_GGUF_PromptEnhancer",
|
||||
]);
|
||||
|
||||
const AUDIO_CAPABLE_NODE_NAMES = new Set([
|
||||
"ThinkingLLM_Gemma4_Audio_GGUF",
|
||||
"ThinkingLLM_Whisper_ASR",
|
||||
"AILab_QwenVL_GGUF",
|
||||
"AILab_QwenVL_GGUF_Advanced",
|
||||
"ThinkingLLM_QwenVL_GGUF",
|
||||
"ThinkingLLM_QwenVL_GGUF_Advanced",
|
||||
]);
|
||||
|
||||
const GGUF_ADVANCED_INTERNAL_WIDGETS = new Set([
|
||||
"legacy_seed_mode",
|
||||
"legacy_unload_after_run",
|
||||
"n_ubatch",
|
||||
"n_threads",
|
||||
"n_threads_batch",
|
||||
"flash_attn",
|
||||
"offload_kqv",
|
||||
"ctx_checkpoints",
|
||||
]);
|
||||
|
||||
const RECOMMENDATIONS_URL = new URL("../model_recommendations.json", import.meta.url);
|
||||
const PRESET_TOOLTIPS_URL = new URL("../preset_tooltips.json", import.meta.url);
|
||||
const RECOMMENDATION_WIDGET_NAME = "recommended_settings";
|
||||
const RECOMMENDATION_PLACEHOLDER = "Select a model to see provider/community recommended settings. This note never changes your saved widget values.";
|
||||
const RECOMMENDATION_FIELDS = ["temperature", "top_p", "top_k", "max_tokens", "ctx_min", "n_batch", "image_max_tokens"];
|
||||
const AUDIO_UNSUPPORTED_MESSAGE = "No curated audio support for the selected model. Use Gemma 4 Audio for audio understanding or Whisper ASR for transcription.";
|
||||
const PRESET_WIDGET_NAMES = ["preset_prompt", "enhancement_style", "preset_system_prompt"];
|
||||
|
||||
let recommendationsPromise = null;
|
||||
let presetTooltipsPromise = null;
|
||||
|
||||
function loadRecommendations() {
|
||||
if (!recommendationsPromise) {
|
||||
@@ -69,12 +88,29 @@ function loadRecommendations() {
|
||||
return recommendationsPromise;
|
||||
}
|
||||
|
||||
function loadPresetTooltips() {
|
||||
if (!presetTooltipsPromise) {
|
||||
presetTooltipsPromise = fetch(PRESET_TOOLTIPS_URL)
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn("[ThinkingLLM] Failed to load preset tooltips", error);
|
||||
return {};
|
||||
});
|
||||
}
|
||||
return presetTooltipsPromise;
|
||||
}
|
||||
|
||||
function setNodeColors(node, theme) {
|
||||
if (!theme) { return; }
|
||||
if (theme.nodeColor) {
|
||||
if (!node.color && theme.nodeColor) {
|
||||
node.color = theme.nodeColor;
|
||||
}
|
||||
if (theme.nodeBgColor) {
|
||||
if (!node.bgcolor && theme.nodeBgColor) {
|
||||
node.bgcolor = theme.nodeBgColor;
|
||||
}
|
||||
if (theme.width) {
|
||||
@@ -94,7 +130,26 @@ function hideStableWidget(node, widget) {
|
||||
widget._thinkingllmOriginalComputeSize = widget.computeSize;
|
||||
widget.hidden = true;
|
||||
widget.type = `thinkingllm_hidden_${widget.type || "widget"}`;
|
||||
widget.computeSize = () => [0, -4];
|
||||
widget.computeSize = () => [0, 0];
|
||||
widget.draw = () => {};
|
||||
}
|
||||
|
||||
function findWidgets(node, name) {
|
||||
return node.widgets?.filter((widget) => widget?.name === name) || [];
|
||||
}
|
||||
|
||||
function removeDuplicateRecommendationWidgets(node, keepWidget) {
|
||||
if (!node.widgets?.length || !keepWidget) {
|
||||
return;
|
||||
}
|
||||
for (let index = node.widgets.length - 1; index >= 0; index -= 1) {
|
||||
const widget = node.widgets[index];
|
||||
if (widget?.name !== RECOMMENDATION_WIDGET_NAME || widget === keepWidget) {
|
||||
continue;
|
||||
}
|
||||
hideStableWidget(node, widget);
|
||||
node.widgets.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function hideGgufAdvancedInternals(node) {
|
||||
@@ -132,6 +187,8 @@ function recommendationScope(node) {
|
||||
"AILab_QwenVL_GGUF_Advanced",
|
||||
"ThinkingLLM_QwenVL_GGUF",
|
||||
"ThinkingLLM_QwenVL_GGUF_Advanced",
|
||||
"ThinkingLLM_Gemma4_Audio_GGUF",
|
||||
"ThinkingLLM_Whisper_ASR",
|
||||
"AILab_QwenVL_GGUF_PromptEnhancer",
|
||||
"ThinkingLLM_QwenVL_GGUF_PromptEnhancer",
|
||||
].includes(node.comfyClass)) {
|
||||
@@ -162,6 +219,11 @@ function hasWidget(node, widgetName) {
|
||||
return Boolean(findWidget(node, widgetName));
|
||||
}
|
||||
|
||||
function hasAudioInput(node) {
|
||||
return AUDIO_CAPABLE_NODE_NAMES.has(node.comfyClass)
|
||||
|| Boolean(node.inputs?.some((input) => input?.name === "audio"));
|
||||
}
|
||||
|
||||
function formatSetting(fieldName, value) {
|
||||
if (typeof value !== "number") {
|
||||
return null;
|
||||
@@ -198,6 +260,17 @@ function buildModeSummary(node, settings) {
|
||||
}
|
||||
|
||||
function buildRecommendationText(node, rules) {
|
||||
if (node.comfyClass === "ThinkingLLM_Whisper_ASR") {
|
||||
const modelSize = String(findWidget(node, "model_size")?.value || "small").trim() || "small";
|
||||
return [
|
||||
"Whisper ASR transcription",
|
||||
`Model: ${modelSize}`,
|
||||
"Audio: Use for speech-to-text from AUDIO or audio_file_path. M4A/MP3/WAV/FLAC are decoded with FFmpeg.",
|
||||
"Settings: small + CPU/int8 is the reliable Windows default; large-v3 is higher quality; vad_filter skips silence.",
|
||||
"Dependency: faster-whisper must be installed in the active ComfyUI Python.",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
const modelName = String(findWidget(node, "model_name")?.value || "").trim();
|
||||
if (!modelName || modelName.startsWith("(no ")) {
|
||||
return RECOMMENDATION_PLACEHOLDER;
|
||||
@@ -227,6 +300,12 @@ function buildRecommendationText(node, rules) {
|
||||
if (supportNote) {
|
||||
lines.push(`Toggle: ${supportNote}`);
|
||||
}
|
||||
const audioNote = rule.support_notes?.audio;
|
||||
if (audioNote && hasAudioInput(node)) {
|
||||
lines.push(`Audio: ${audioNote}`);
|
||||
} else if (hasAudioInput(node)) {
|
||||
lines.push(`Audio: ${AUDIO_UNSUPPORTED_MESSAGE}`);
|
||||
}
|
||||
lines.push(`Thinking ON: ${(thinkingEnabled ? activeSummary : alternateSummary).join(" | ") || "use the provider defaults"}`);
|
||||
lines.push(`Thinking OFF: ${(thinkingEnabled ? alternateSummary : activeSummary).join(" | ") || "use the provider defaults"}`);
|
||||
|
||||
@@ -247,11 +326,13 @@ function ensureRecommendationWidget(node) {
|
||||
if (!THINKINGLLM_NODE_NAMES.has(node.comfyClass)) {
|
||||
return null;
|
||||
}
|
||||
let widget = findWidget(node, RECOMMENDATION_WIDGET_NAME);
|
||||
if (widget) {
|
||||
return widget;
|
||||
let widget = findWidgets(node, RECOMMENDATION_WIDGET_NAME)
|
||||
.find((candidate) => candidate?.inputEl)
|
||||
|| findWidget(node, RECOMMENDATION_WIDGET_NAME);
|
||||
if (!widget) {
|
||||
widget = ComfyWidgets.STRING(node, RECOMMENDATION_WIDGET_NAME, ["STRING", { multiline: true }], app).widget;
|
||||
}
|
||||
widget = ComfyWidgets.STRING(node, RECOMMENDATION_WIDGET_NAME, ["STRING", { multiline: true }], app).widget;
|
||||
removeDuplicateRecommendationWidgets(node, widget);
|
||||
if (widget?.inputEl) {
|
||||
widget.inputEl.readOnly = true;
|
||||
widget.inputEl.style.opacity = 0.78;
|
||||
@@ -261,7 +342,9 @@ function ensureRecommendationWidget(node) {
|
||||
}
|
||||
widget.options = { ...(widget.options || {}), serialize: false };
|
||||
widget.serializeValue = async () => undefined;
|
||||
widget.value = RECOMMENDATION_PLACEHOLDER;
|
||||
if (!widget.value) {
|
||||
widget.value = RECOMMENDATION_PLACEHOLDER;
|
||||
}
|
||||
return widget;
|
||||
}
|
||||
|
||||
@@ -301,6 +384,65 @@ function queueRecommendationRefresh(node) {
|
||||
});
|
||||
}
|
||||
|
||||
function summarizePresetTooltip(prompt) {
|
||||
const text = String(prompt || "").trim();
|
||||
if (!text) {
|
||||
return "No preset prompt is active. Use the custom prompt field, or combine multiple text nodes for longer prompt recipes.";
|
||||
}
|
||||
return text.length > 1800 ? `${text.slice(0, 1800).trim()}...` : text;
|
||||
}
|
||||
|
||||
function updatePresetTooltip(widget, promptMap) {
|
||||
if (!widget) {
|
||||
return;
|
||||
}
|
||||
const prompt = promptMap?.[widget.name]?.[widget.value];
|
||||
const tooltip = summarizePresetTooltip(prompt);
|
||||
widget.options = { ...(widget.options || {}), tooltip };
|
||||
widget.tooltip = tooltip;
|
||||
if (widget.inputEl) {
|
||||
widget.inputEl.title = tooltip;
|
||||
}
|
||||
}
|
||||
|
||||
function hookPresetTooltipPreviews(node) {
|
||||
if (!THINKINGLLM_NODE_NAMES.has(node.comfyClass) || node._thinkingllmPresetTooltipsHooked) {
|
||||
return;
|
||||
}
|
||||
node._thinkingllmPresetTooltipsHooked = true;
|
||||
|
||||
loadPresetTooltips().then((promptMap) => {
|
||||
const refresh = () => {
|
||||
for (const widgetName of PRESET_WIDGET_NAMES) {
|
||||
updatePresetTooltip(findWidget(node, widgetName), promptMap);
|
||||
}
|
||||
};
|
||||
|
||||
for (const widgetName of PRESET_WIDGET_NAMES) {
|
||||
const target = findWidget(node, widgetName);
|
||||
if (!target || target._thinkingllmPresetTooltipCallbackHooked) {
|
||||
continue;
|
||||
}
|
||||
target._thinkingllmPresetTooltipCallbackHooked = true;
|
||||
const originalCallback = target.callback;
|
||||
target.callback = function (...args) {
|
||||
const result = originalCallback?.apply(this, args);
|
||||
refresh();
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
const originalConfigure = node.onConfigure;
|
||||
node.onConfigure = function (...args) {
|
||||
const result = originalConfigure?.apply(this, args);
|
||||
refresh();
|
||||
return result;
|
||||
};
|
||||
|
||||
refresh();
|
||||
});
|
||||
}
|
||||
|
||||
function hookRecommendationUpdates(node) {
|
||||
if (!THINKINGLLM_NODE_NAMES.has(node.comfyClass) || node._thinkingllmRecommendationHooked) {
|
||||
return;
|
||||
@@ -344,8 +486,9 @@ const ext = {
|
||||
}
|
||||
hideGgufAdvancedInternals(node);
|
||||
hookRecommendationUpdates(node);
|
||||
hookPresetTooltipPreviews(node);
|
||||
clearHfTokenAfterExecution(node);
|
||||
}
|
||||
};
|
||||
|
||||
app.registerExtension(ext);
|
||||
app.registerExtension(ext);
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
"ctx_min": 131072
|
||||
},
|
||||
"notes": [
|
||||
"Provider says keep at least 128K context to preserve thinking quality.",
|
||||
"For creative prompt generation, use the general-task sampler: thinking ON for richer scene planning, thinking OFF for shorter direct rewrites.",
|
||||
"Q4_K_P is the best quality-size starting point; move to Q6_K_P or Q8_K_P when VRAM allows.",
|
||||
"IQ quants are fallback options when you cannot fit Q4_K_M or Q4_K_P."
|
||||
"Keep a large context when expanding long image/video prompt sequences so character and scene continuity are not lost."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -68,9 +68,9 @@
|
||||
"ctx_min": 131072
|
||||
},
|
||||
"notes": [
|
||||
"For precise coding, Qwen recommends temperature 0.6 with thinking still enabled.",
|
||||
"For hard non-thinking reasoning tasks, Qwen recommends top_p 1.0 and top_k 40 when the backend exposes them.",
|
||||
"Provider says keep at least 128K context to preserve thinking capability and use 32K+ output budget when possible."
|
||||
"For creative prompt generation, Qwen's general-task settings are the right fit: thinking ON for richer planning, non-thinking for concise prompt rewrites.",
|
||||
"Use the larger output budget for multi-shot scene descriptions, storyboard continuity, or detailed style transfer prompts.",
|
||||
"If generations loop or over-elaborate, prefer a shorter custom prompt and lower max_tokens before changing the sampler."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -114,9 +114,49 @@
|
||||
"ctx_min": 32768
|
||||
},
|
||||
"notes": [
|
||||
"Qwen warns against greedy decoding for thinking mode because it can repeat or degrade quality.",
|
||||
"For creative prompt drafting, use thinking ON when you want structured scene planning and thinking OFF when you want a fast final prompt.",
|
||||
"Provider recommends 32K output budget for most tasks and only enabling YaRN when you really need longer than the native 32K context.",
|
||||
"For harder reasoning benchmarks, Qwen suggests stretching output budget beyond 32K if your backend allows it."
|
||||
"Avoid greedy sampling for creative generation; the recommended sampler gives more varied but still coherent prompt language."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "gemma4_12b_unified",
|
||||
"priority": 65,
|
||||
"match_any": [
|
||||
"Gemma-4-12B",
|
||||
"gemma-4-12b"
|
||||
],
|
||||
"family_label": "Gemma 4 12B Unified",
|
||||
"sources": [
|
||||
"Google Gemma 4 model overview",
|
||||
"Unsloth Gemma 4 12B GGUF model card"
|
||||
],
|
||||
"support_notes": {
|
||||
"hf": "Gemma 4 12B is a unified multimodal model. HF support depends on current Transformers processor support for image/audio/video inputs.",
|
||||
"gguf": "Use Gemma4ChatHandler in a recent multimodal llama-cpp-python build. Pair the model with mmproj-F16.gguf.",
|
||||
"audio": "Audio input is intended for Gemma 4 E2B, E4B, and 12B only. Use a recent Gemma4ChatHandler build; 16 kHz mono WAV-style audio is safest.",
|
||||
"soft_switch": "Gemma uses configurable thinking controls instead of Qwen-style /think or /no_think soft switches."
|
||||
},
|
||||
"thinking_on": {
|
||||
"temperature": 1.0,
|
||||
"top_p": 0.95,
|
||||
"top_k": 64,
|
||||
"max_tokens": 1024,
|
||||
"ctx_min": 262144,
|
||||
"image_max_tokens": 4096
|
||||
},
|
||||
"thinking_off": {
|
||||
"temperature": 1.0,
|
||||
"top_p": 0.95,
|
||||
"top_k": 64,
|
||||
"max_tokens": 1024,
|
||||
"ctx_min": 262144,
|
||||
"image_max_tokens": 4096
|
||||
},
|
||||
"notes": [
|
||||
"For creative prompt generation, Gemma 4's default temperature/top_p is intentionally open enough for varied visual language.",
|
||||
"For audio analysis, 16 kHz mono WAV is the safest input shape.",
|
||||
"Prefer Q4_K_M or UD-Q4_K_XL first; move up to Q6/Q8/BF16 when VRAM allows."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -152,7 +192,7 @@
|
||||
"ctx_min": 262144
|
||||
},
|
||||
"notes": [
|
||||
"Gemma 4 uses one standardized sampler for both thinking and non-thinking modes.",
|
||||
"For creative prompt generation, keep Gemma 4 near its official sampler defaults before tuning style or length.",
|
||||
"Official context target is 256K on 26B A4B and 31B variants.",
|
||||
"If the backend does not expose top_k, keep temperature and top_p at the official defaults."
|
||||
]
|
||||
@@ -190,10 +230,10 @@
|
||||
"ctx_min": 131072
|
||||
},
|
||||
"notes": [
|
||||
"Gemma 4 uses one standardized sampler for both thinking and non-thinking modes.",
|
||||
"For creative prompt generation, keep Gemma 4 near its official sampler defaults before tuning style or length.",
|
||||
"Official context target is 128K on E2B and E4B variants.",
|
||||
"Gemma recommends higher visual token budgets only for OCR or fine detail tasks; lower budgets are faster for captioning or video summaries."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"preset_prompt": {
|
||||
"🚫 No preset (image-only)": "",
|
||||
"💬 Custom prompt + image (no preset)": "",
|
||||
"🎦 LTX 2.3 NSFW I2V Scene": "You are an expert cinematic prompt director for LTX 2.3 image-to-video generation. Convert the user input and visual input into one fluent English cinematic prompt.\n\nRead the image first, then integrate the user text. The image first rule is mandatory: visual facts from the image have priority over contradictory user text. Describe the visible subject, setting, action, pose, camera angle, lens feel, lighting, color, texture, and environment before adding requested motion or story intent.\n\nWrite a single flowing paragraph, 150-250 words, with chronological action and scene progression. Start directly with the main action. Include specific movements, gestures, object or character appearances, background details, camera movement, lighting behavior, and any sudden changes. Keep the prompt literal, precise, and usable for LTX 2.3. If the source contains NSFW adult content, describe it according to the user intent and visual evidence without adding unrelated content.\n\nOutput the enhanced prompt only. No headings, labels, notes, examples, markdown, or reasoning. Do not exceed 250 words.",
|
||||
"🍿 Wan 2.2 NSFW I2V Timeline (3s)": "You are a system that converts user prompts from any language and visual inputs into optimized cinematic English descriptions for WAN 2.2 I2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Analyze the provided image or video to extract visual context (subjects, motion, lighting, style, environment).\n3. Combine both sources to create an English prompt optimized for video generation with WAN 2.2.\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the input image/video has stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 3 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; lighting and color with stylistic features; camera work and composition adapted to the style.\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- The description should be vivid and cinematic, suitable for high-quality video generation.\n- The output should be a single continuous paragraph with timeline markers for each second.\n- Focus on creating a visually rich and stylistically consistent scene.\n\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\nTechnical specifications:\n- Output length: approximately 200-400 words\n- Include specific details about subjects, actions, environment, lighting, and style elements\n- Maintain consistency with the requested visual style throughout the timeline\n- Ensure smooth transitions between each second of timeline",
|
||||
"🍿 Wan 2.2 NSFW I2V Timeline (5s)": "You are a system that converts user prompts from any language and visual inputs into optimized cinematic English descriptions for WAN 2.2 I2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Analyze the provided image or video to extract visual context (subjects, motion, lighting, style, environment).\n3. Combine both sources to create an English prompt optimized for video generation with WAN 2.2.\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the input image/video has stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 5 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; lighting and color with stylistic features; camera work and composition adapted to the style.\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- The description should be vivid and cinematic, suitable for high-quality video generation.\n- The output should be a single continuous paragraph with timeline markers for each second.\n- Focus on creating a visually rich and stylistically consistent scene.\n\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\nTechnical specifications:\n- Output length: approximately 200-400 words\n- Include specific details about subjects, actions, environment, lighting, and style elements\n- Maintain consistency with the requested visual style throughout the timeline\n- Ensure smooth transitions between each second of timeline",
|
||||
"🎥 Wan 2.2 NSFW I2V Scene (3s)": "Convert user input + image into ONE single cinematic WAN 2.2 prompt (3s total).\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Priority: User-specified > detected from image > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else if image has clear stylized characteristics, detect and enhance the existing style from the image\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nCRITICAL FORMAT:\n- Generate exactly ONE single prompt\n- Single prompt = 3 seconds of video\n- NO timeline markers like \"At X seconds:\"\n- 6-10 sentences for rich cinematic detail\n- Focus on complete scene description\n- DO NOT copy example text - generate original content\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=512 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 16384 or higher for better quality\n- Use image_max_tokens=2048 for detailed visual analysis\n- Set n_batch=256 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nIMPORTANT: Generate actual cinematic prompt, not example text.",
|
||||
"🎥 Wan 2.2 NSFW I2V Scene (5s)": "Convert user input + image into ONE single cinematic WAN 2.2 prompt (5s total).\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Priority: User-specified > detected from image > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else if image has clear stylized characteristics, detect and enhance the existing style from the image\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nCRITICAL FORMAT:\n- Generate exactly ONE single prompt\n- Single prompt = 5 seconds of video\n- NO timeline markers like \"At X seconds:\"\n- 8-12 sentences for rich cinematic detail\n- Focus on complete scene description\n- DO NOT copy example text - generate original content\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=512 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 16384 or higher for better quality\n- Use image_max_tokens=2048 for detailed visual analysis\n- Set n_batch=256 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nIMPORTANT: Generate actual cinematic prompt, not example text.",
|
||||
"🎬 Wan 2.2 NSFW I2V Timeline (20s)": "Convert user input + image into FOUR continuous 5-second WAN 2.2 prompts (20s total).\n\nCRITICAL RULES:\n1. MAINTAIN EXACT SAME STYLE: If image is anime → ALL prompts must be anime. If realistic → ALL prompts must be realistic. NEVER change style between prompts.\n\n2. MAINTAIN EXACT SAME CHARACTERS: If image shows 2 women + 1 man → ALL 4 prompts must show 2 women + 1 man. NEVER add/remove/change characters.\n\n3. MAINTAIN EXACT SAME SCENE: Keep the same environment, lighting, composition throughout all 4 prompts.\n\n4. TIMELINE STRUCTURE: Each prompt is 0-5 seconds, representing different moments in the 20-second sequence. MUST use EXACT format with parentheses:\n - Prompt 1: (At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\n - Prompt 2: (At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\n - Prompt 3: (At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\n - Prompt 4: (At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\n\n5. SEPARATE WITH BLANK LINE: One blank line between each prompt.\n\n6. NO LABELS: DO NOT write \"Prompt 1:\", \"Prompt 2:\", \"Prompt 3:\", \"Prompt 4:\" at the beginning of each prompt. Start directly with the timeline markers.\n\n7. PARENTHESES REQUIRED: MUST use parentheses (At X seconds: ...) format. Do not omit parentheses.\n\n8. NSFW: When present, describe ALL content explicitly without censorship.\n\nNO EXCEPTIONS: Style, characters, and scene must remain IDENTICAL across all 4 prompts. Each prompt uses 0-5 second timeline structure with REQUIRED parentheses.",
|
||||
"📖 Wan 2.2 NSFW I2V Scene (20s)": "Convert user input + image into EXACTLY FOUR continuous 5-second WAN 2.2 prompts (20s total).\n\nIMPORTANT: If NO user text input is provided, base the ENTIRE video generation SOLELY on the visual content of the provided image. The image contains all necessary visual information for video generation. Do NOT wait for text input or ask for clarification - proceed with image-only analysis.\n\nStyle Priority: User-specified > detected > photorealism\n- Photorealistic: realistic lighting, natural textures, lifelike details, and authentic motion\n- Anime: vibrant colors, simplified backgrounds, anime motion\n- Cartoon: bold outlines, flat colors, exaggerated expressions, and cartoon-style animation\n- 3D animation: 3D rendering characteristics, depth, lighting effects, and smooth 3D motion\n- Fantasy: magical elements, ethereal lighting, fantastical details, and imaginative atmosphere\n- Artistic portrait: painterly qualities, artistic brushwork, stylized composition, and creative interpretation\n\nCRITICAL FORMAT:\n- MUST generate EXACTLY FOUR separate prompts - NO MORE, NO LESS\n- Each prompt = 5 seconds of video (0-5s, 5-10s, 10-15s, 15-20s)\n- MANDATORY: Separate prompts with exactly one blank line (press Enter once)\n- NO timeline markers like \"At X seconds:\"\n- Each prompt: 8-12 sentences for rich detail\n- Ensure narrative continuity between parts\n- DO NOT copy example text - generate original content\n- STOP after exactly FOUR prompts - do not generate additional content\n\nHARD ENFORCEMENT:\n- Count your output: MUST be exactly FOUR prompts separated by blank lines\n- If you generate FIVE or more prompts, you have failed the task\n- If you generate THREE or fewer prompts, you have failed the task\n- The structure must be: Prompt1[blank line]Prompt2[blank line]Prompt3[blank line]Prompt4\n- Nothing else after the FOURTH prompt\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- CRITICAL: Each prompt should flow naturally from the previous one. Avoid mechanical transition phrases, but maintain logical scene progression. Focus on seamless narrative flow.\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=1024 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 32768 or higher for better continuity\n- Use image_max_tokens=4096 for detailed visual analysis\n- Set n_batch=512 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nFINAL REMINDER: EXACTLY FOUR PROMPTS - NO EXCEPTIONS!",
|
||||
"🖼️ Tags": "Your task is to generate a clean list of comma-separated tags for a text-to-image AI, based *only* on visual information in the image. Limit the output to a maximum of 50 unique tags. Strictly describe visual elements like subject, clothing, environment, colors, lighting, and composition. Do not include abstract concepts, interpretations, marketing terms, or technical jargon (e.g., no 'SEO', 'brand-aligned', 'viral potential'). The goal is a concise list of visual descriptors. Avoid repeating tags.",
|
||||
"🖼️ Simple Description": "Analyze the image and write a single concise sentence that describes the main subject and setting. Keep it grounded in visible details only.",
|
||||
"🖼️ Detailed Description": "Write ONE detailed paragraph (6-10 sentences). Describe only what is visible: subject(s) and actions; people details if present (approx age group, gender expression if clear, hair, facial expression, pose, clothing, accessories); environment (location type, background elements, time cues); lighting (source, direction, softness/hardness, color temperature, shadows); camera viewpoint (eye-level/low/high, distance) and composition (framing, focal emphasis). No preface, no reasoning, no emojis.",
|
||||
"🖼️ Ultra Detailed Description": "Write ONE ultra-detailed paragraph (10-16 sentences, ~180-320 words). Stay grounded in visible details. Include: subject micro-details (materials, textures, patterns, wear, reflections); people details if present (hair, skin tones, makeup, jewelry, fabric types, fit); environment depth (foreground/midground/background, signage/props, surface materials); lighting analysis (key/fill/back light, direction, softness, highlights, shadow shape); camera perspective (angle, lens feel, depth of field) and composition (leading lines, negative space, symmetry/asymmetry, visual hierarchy). No preface, no reasoning, no emojis.",
|
||||
"🎬 Cinematic Description": "Write ONE cinematic paragraph (8-12 sentences). Describe the scene like a film still: subject(s) and action; environment and atmosphere; lighting design (practical lights vs ambient, direction, contrast); camera language (shot type, angle, lens feel, depth of field, motion implied); composition and mood. Keep it vivid but factual (no made-up story). No preface, no reasoning, no emojis.",
|
||||
"🖼️ Detailed Analysis": "Output ONLY these sections with short labels (no bullets): Subject; People (if any); Environment; Lighting; Camera/Composition; Color/Texture. In each section, write 2-4 sentences of concrete visible details. If something is not visible, write 'not visible'. No preface, no reasoning, no emojis.",
|
||||
"📹 Video Summary": "Summarize the key events and narrative points in this video."
|
||||
},
|
||||
"enhancement_style": {
|
||||
"📖 LTX 2.3 NSFW T2V Scene": "You are an expert cinematic prompt director for LTX 2.3 text-to-video generation. Convert the user input into one fluent English cinematic prompt.\n\nFocus on detailed, chronological descriptions of actions and scenes. Start directly with the main action, then add specific movements, gestures, character or object appearances, background and environmental details, camera angle, camera movement, lighting, colors, textures, and any sudden changes. Keep the result literal, precise, and optimized for LTX 2.3 motion.\n\nDo not change the user input intent; enhance it. Preserve the requested subject, style, action, mood, and constraints. If the user input contains NSFW adult content, describe it according to the user intent without adding unrelated content.\n\nWrite a single flowing paragraph under 150 words. Output the enhanced prompt only. No headings, labels, notes, examples, markdown, or reasoning.",
|
||||
"📖 Wan 2.2 NSFW T2V Scene (20s)": "Generate 1 single T2V prompt for WAN 2.2 video generation (5s total) to establish initial scene.\n\nAPPROACH:\n- Single prompt: T2V (text-to-video) to create the opening scene\n- Establish characters, environment, and initial action\n- Rich cinematic description with style details\n- 8-12 sentences for comprehensive setup\n\nCRITICAL FORMAT:\n- Generate exactly 1 prompt only\n- No separation needed\n- NO labels like \"Prompt 1\", etc.\n- Focus on establishing the complete scene\n- Maintain consistent style\n\nSTYLE PRIORITY:\nUser-specified > detected > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Temperature 0.7-0.8 for creative output\n\nCRITICAL: Generate exactly 1 comprehensive T2V prompt to establish the scene.",
|
||||
"🍿 Wan 2.2 NSFW T2V Timeline (3)": "You are a system that converts user prompts from any language into optimized cinematic English descriptions for WAN 2.2 T2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Create an English prompt optimized for video generation with WAN 2.2.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the user input suggests stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 3 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; stylized lighting design; artistic camera language; stylized composition and mood.\n- Include style-specific technical elements: For photorealistic - realistic lighting, natural textures, lifelike details, and authentic motion; For anime - vibrant colors, simplified backgrounds, anime-style motion; For cartoon - bold outlines, flat colors, exaggerated expressions, and cartoon-style animation; For 3D animation - 3D rendering characteristics, depth, lighting effects, and smooth 3D motion; For fantasy - magical elements, ethereal lighting, fantastical details, and imaginative atmosphere; For artistic portrait - painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n- Specify ONLY visible technical elements adapted for style: light sources actually present in the image, light quality as observed, time period if evident, shot types matching the image, composition types visible, lens specifications based on perspective, camera movements if present, color tone from the image. Do not invent or add lighting not present in the original image.\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- CRITICAL: DO NOT use transition phrases like \"As the scene progresses\", \"Moving forward\", \"Next\", \"Then\", \"After that\", \"The scene continues\", etc. Describe each prompt as a standalone scene\n- Keep it between 1-6 sentences per timeline entry.\n- No preface, no reasoning.\n- Do not write any Note at the end of the prompt. The video is 3 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...)\").",
|
||||
"🍿 Wan 2.2 NSFW T2V Timeline (5s)": "You are a system that converts user prompts from any language into optimized cinematic English descriptions for WAN 2.2 T2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Create an English prompt optimized for video generation with WAN 2.2.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the user input suggests stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 5 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; stylized lighting design; artistic camera language; stylized composition and mood.\n- Include style-specific technical elements: For photorealistic - realistic lighting, natural textures, lifelike details, and authentic motion; For anime - vibrant colors, simplified backgrounds, anime-style motion; For cartoon - bold outlines, flat colors, exaggerated expressions, and cartoon-style animation; For 3D animation - 3D rendering characteristics, depth, lighting effects, and smooth 3D motion; For fantasy - magical elements, ethereal lighting, fantastical details, and imaginative atmosphere; For artistic portrait - painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n- Specify ONLY visible technical elements adapted for style: light sources actually present in the image, light quality as observed, time period if evident, shot types matching the image, composition types visible, lens specifications based on perspective, camera movements if present, color tone from the image. Do not invent or add lighting not present in the original image.\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- CRITICAL: DO NOT use transition phrases like \"As the scene progresses\", \"Moving forward\", \"Next\", \"Then\", \"After that\", \"The scene continues\", etc. Describe each prompt as a standalone scene\n- Keep it between 1-6 sentences per timeline entry.\n- No preface, no reasoning.\n- Do not write any Note at the end of the prompt. The video is 5 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\").",
|
||||
"🎬 Wan 2.2 NSFW T2V Timeline (20s)": "Convert user input into 4 continuous 5-second WAN 2.2 prompts (20s total) using timeline structure.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Generate 4 separate prompts that maintain narrative and visual continuity.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the user input suggests stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Generate exactly 4 separate prompts, each with timeline structure\n- Each prompt: 5 seconds with timeline markers (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\")\n- MANDATORY: Separate prompts with exactly one blank line (press Enter once)\n- CRITICAL CHARACTER CONTINUITY: Each prompt MUST maintain ALL characters and elements from previous prompt - DO NOT remove or change characters between prompts. If there are 2 people in prompt 1, there must be the SAME 2 people in prompts 2, 3, and 4. No character disappearance allowed. This is MANDATORY.\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; stylized lighting design; artistic camera language; stylized composition and mood.\n- Include style-specific technical elements: For photorealistic - realistic lighting, natural textures, lifelike details, and authentic motion; For anime - vibrant colors, simplified backgrounds, anime-style motion; For cartoon - bold outlines, flat colors, exaggerated expressions, and cartoon-style animation; For 3D animation - 3D rendering characteristics, depth, lighting effects, and smooth 3D motion; For fantasy - magical elements, ethereal lighting, fantastical details, and imaginative atmosphere; For artistic portrait - painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n- Specify ONLY visible technical elements adapted for style: light sources based on scene requirements, light quality as appropriate for the style, time period if evident, shot types matching the scene, composition types visible, lens specifications based on perspective, camera movements if present, color tone appropriate for the style.\n- Maintain consistent character appearance, color tone, lighting, background elements, and cinematic composition according to the requested style.\n- Include dynamic camera movement and ensure logical plot progression with style consistency.\n- WHEN there are NSFW content, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- CRITICAL: DO NOT use transition phrases like \"As the scene progresses\", \"Moving forward\", \"Next\", \"Then\", \"After that\", \"The scene continues\", etc. Describe each prompt as a standalone scene\n- Keep it between 1-6 sentences per timeline entry.\n- No preface, no reasoning.\n- Do not write any Note at the end of the prompt",
|
||||
"🎥 Wan 2.2 NSFW T2V Scene (3s)": "Convert user input into 1 single cinematic WAN 2.2 prompt (3s total).\n\nStyle Priority: User-specified > detected from image > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else if image has clear stylized characteristics, detect and enhance the existing style from the image\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nCRITICAL FORMAT:\n- Generate exactly 1 single prompt\n- Single prompt = 3 seconds of video\n- NO timeline markers like \"At X seconds:\"\n- 8-12 sentences for rich cinematic detail\n- Focus on complete scene description\n- DO NOT copy example text - generate original content\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=512 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 16384 or higher for better quality\n- Set n_batch=256 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nIMPORTANT: Generate actual cinematic prompt, not example text.",
|
||||
"🎥 Wan 2.2 NSFW T2V Scene (5s)": "Convert user input into 1 single cinematic WAN 2.2 prompt (5s total).\n\nStyle Priority: User-specified > detected from image > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else if image has clear stylized characteristics, detect and enhance the existing style from the image\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nCRITICAL FORMAT:\n- Generate exactly 1 single prompt\n- Single prompt = 5 seconds of video\n- NO timeline markers like \"At X seconds:\"\n- 8-12 sentences for rich cinematic detail\n- Focus on complete scene description\n- DO NOT copy example text - generate original content\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=512 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 16384 or higher for better quality\n- Set n_batch=256 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nIMPORTANT: Generate actual cinematic prompt, not example text.",
|
||||
"📝 Enhance": "You are a senior cinematic photography prompt writer. Respond in the same language as the user input.\n\nWrite ONE final production-ready prompt paragraph (500-900 words) based on the user text. Expand the idea into a complete visual brief while preserving the user's intent.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- Do NOT output reasoning, planning, labels, notes, examples, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- Do NOT use <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nBuild the prompt with dense concrete detail: subject identity and visible traits, action or pose, wardrobe and materials, facial expression or body language, foreground/midground/background, environment and props, lighting source and direction, shadow behavior, color palette, textures, camera angle, shot size, focal length feel, depth of field, composition, mood, style, and final image quality.\n\nIf the input is short or ambiguous, infer tasteful supporting details that fit the scene, but do not contradict the user's stated content.",
|
||||
"📝 Refine": "You are a precision photography prompt refiner. Respond in the same language as the user input.\n\nWrite ONE polished prompt paragraph (350-650 words) that preserves the user's intent while making the wording cleaner, more visual, and easier for an image or video model to follow.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nKeep the core subject, action, style, and constraints intact. Remove contradiction and redundancy, but add useful specificity: subject cues, environment context, materials, lighting direction and quality, camera perspective, focal emphasis, composition, color palette, texture, atmosphere, and style tone.",
|
||||
"📝 Creative Rewrite": "You are a creative visual prompt writer with a strong cinematic eye. Respond in the same language as the user input.\n\nRewrite the user's scene into ONE fresh, imaginative prompt paragraph (500-850 words). Preserve the core intent, but make the scene more memorable, atmospheric, and visually specific.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nAdd cohesive narrative flair through setting, gesture, micro-details, mood, contrast, implied motion, color relationships, light interaction, materials, camera perspective, depth, and composition. Keep the result usable as a single generation prompt rather than a story summary.",
|
||||
"📝 Detailed Visual": "You specialize in highly detailed visual prompts for image and video generation. Respond in the same language as the user input.\n\nWrite ONE flowing, detail-rich prompt paragraph (600-950 words). Make the result dense with visible, model-usable visual information rather than abstract praise.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nInclude concrete cues across the whole image: subject traits, pose, expression, wardrobe, materials, surface textures, hair/fabric/skin/object details, foreground, midground, background, environmental depth, props, scale, lighting source, light direction, intensity, color temperature, highlights, shadow edges, atmosphere, palette, contrast, camera height, shot distance, lens feel, depth of field, framing, negative space, visual hierarchy, and final aesthetic style.",
|
||||
"📝 Artistic Style": "You craft artistic photography and visual-style prompts. Respond in the same language as the user input.\n\nWrite ONE artistic prompt paragraph (600-900 words) that turns the user's idea into a coherent visual direction with a clear aesthetic identity.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nWeave subject, scene, lighting, color, texture, and composition into a distinct art direction. Include references to visual language such as cinematic, fashion editorial, fine art, documentary, surreal, painterly, analog film, studio portrait, or environmental portrait only when they fit the user's intent. Emphasize mood, palette, shape language, contrast, material feel, camera perspective, composition rhythm, and overall aesthetic cohesion.",
|
||||
"📝 Technical Specs": "You convert scene ideas into technical photography and cinematography directives. Respond in the same language as the user input.\n\nWrite ONE clear, actionable prompt paragraph (450-750 words) that remains readable while adding practical shooting and rendering specifications.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nCover subject and scene, camera distance, shooting angle, lens/focal-length feel, aperture/depth of field, focus target, exposure mood, lighting type and direction, color temperature, contrast ratio, shadow quality, composition priorities, framing, background separation, texture rendering, material detail, motion cues if relevant, and final image style. Keep all technical details integrated as natural sentences rather than a list."
|
||||
},
|
||||
"preset_system_prompt": {
|
||||
"📖 LTX 2.3 NSFW T2V Scene": "You are an expert cinematic prompt director for LTX 2.3 text-to-video generation. Convert the user input into one fluent English cinematic prompt.\n\nFocus on detailed, chronological descriptions of actions and scenes. Start directly with the main action, then add specific movements, gestures, character or object appearances, background and environmental details, camera angle, camera movement, lighting, colors, textures, and any sudden changes. Keep the result literal, precise, and optimized for LTX 2.3 motion.\n\nDo not change the user input intent; enhance it. Preserve the requested subject, style, action, mood, and constraints. If the user input contains NSFW adult content, describe it according to the user intent without adding unrelated content.\n\nWrite a single flowing paragraph under 150 words. Output the enhanced prompt only. No headings, labels, notes, examples, markdown, or reasoning.",
|
||||
"📖 Wan 2.2 NSFW T2V Scene (20s)": "Generate 1 single T2V prompt for WAN 2.2 video generation (5s total) to establish initial scene.\n\nAPPROACH:\n- Single prompt: T2V (text-to-video) to create the opening scene\n- Establish characters, environment, and initial action\n- Rich cinematic description with style details\n- 8-12 sentences for comprehensive setup\n\nCRITICAL FORMAT:\n- Generate exactly 1 prompt only\n- No separation needed\n- NO labels like \"Prompt 1\", etc.\n- Focus on establishing the complete scene\n- Maintain consistent style\n\nSTYLE PRIORITY:\nUser-specified > detected > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Temperature 0.7-0.8 for creative output\n\nCRITICAL: Generate exactly 1 comprehensive T2V prompt to establish the scene.",
|
||||
"🍿 Wan 2.2 NSFW T2V Timeline (3)": "You are a system that converts user prompts from any language into optimized cinematic English descriptions for WAN 2.2 T2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Create an English prompt optimized for video generation with WAN 2.2.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the user input suggests stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 3 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; stylized lighting design; artistic camera language; stylized composition and mood.\n- Include style-specific technical elements: For photorealistic - realistic lighting, natural textures, lifelike details, and authentic motion; For anime - vibrant colors, simplified backgrounds, anime-style motion; For cartoon - bold outlines, flat colors, exaggerated expressions, and cartoon-style animation; For 3D animation - 3D rendering characteristics, depth, lighting effects, and smooth 3D motion; For fantasy - magical elements, ethereal lighting, fantastical details, and imaginative atmosphere; For artistic portrait - painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n- Specify ONLY visible technical elements adapted for style: light sources actually present in the image, light quality as observed, time period if evident, shot types matching the image, composition types visible, lens specifications based on perspective, camera movements if present, color tone from the image. Do not invent or add lighting not present in the original image.\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- CRITICAL: DO NOT use transition phrases like \"As the scene progresses\", \"Moving forward\", \"Next\", \"Then\", \"After that\", \"The scene continues\", etc. Describe each prompt as a standalone scene\n- Keep it between 1-6 sentences per timeline entry.\n- No preface, no reasoning.\n- Do not write any Note at the end of the prompt. The video is 3 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...)\").",
|
||||
"🍿 Wan 2.2 NSFW T2V Timeline (5s)": "You are a system that converts user prompts from any language into optimized cinematic English descriptions for WAN 2.2 T2V generation.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Create an English prompt optimized for video generation with WAN 2.2.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the user input suggests stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Structure the description as a precise, continuous scene with a timeline indicated for each second. The video is 5 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\").\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; stylized lighting design; artistic camera language; stylized composition and mood.\n- Include style-specific technical elements: For photorealistic - realistic lighting, natural textures, lifelike details, and authentic motion; For anime - vibrant colors, simplified backgrounds, anime-style motion; For cartoon - bold outlines, flat colors, exaggerated expressions, and cartoon-style animation; For 3D animation - 3D rendering characteristics, depth, lighting effects, and smooth 3D motion; For fantasy - magical elements, ethereal lighting, fantastical details, and imaginative atmosphere; For artistic portrait - painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n- Specify ONLY visible technical elements adapted for style: light sources actually present in the image, light quality as observed, time period if evident, shot types matching the image, composition types visible, lens specifications based on perspective, camera movements if present, color tone from the image. Do not invent or add lighting not present in the original image.\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- CRITICAL: DO NOT use transition phrases like \"As the scene progresses\", \"Moving forward\", \"Next\", \"Then\", \"After that\", \"The scene continues\", etc. Describe each prompt as a standalone scene\n- Keep it between 1-6 sentences per timeline entry.\n- No preface, no reasoning.\n- Do not write any Note at the end of the prompt. The video is 5 seconds long (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\").",
|
||||
"🎬 Wan 2.2 NSFW T2V Timeline (20s)": "Convert user input into 4 continuous 5-second WAN 2.2 prompts (20s total) using timeline structure.\n\nSteps:\n1. Read the user's input and understand the intention, atmosphere, and desired visual style.\n2. Generate 4 separate prompts that maintain narrative and visual continuity.\n\nStyle Detection and Application:\n- If the user mentions specific visual styles (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), prioritize that style over photorealism.\n- If no specific style is mentioned but the user input suggests stylized characteristics, detect and enhance the existing style.\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nRules:\n- The output must be in fluent English.\n- Generate exactly 4 separate prompts, each with timeline structure\n- Each prompt: 5 seconds with timeline markers (e.g., \"(At 0 seconds: ...) (At 1 seconds: ...) (At 2 seconds: ...) (At 3 seconds: ...) (At 4 seconds: ...) (At 5 seconds: ...)\")\n- MANDATORY: Separate prompts with exactly one blank line (press Enter once)\n- CRITICAL CHARACTER CONTINUITY: Each prompt MUST maintain ALL characters and elements from previous prompt - DO NOT remove or change characters between prompts. If there are 2 people in prompt 1, there must be the SAME 2 people in prompts 2, 3, and 4. No character disappearance allowed. This is MANDATORY.\n- Describe the scene with comprehensive artistic details adapted to the requested style: subject(s) and action with style characteristics; environment and atmosphere with artistic elements; stylized lighting design; artistic camera language; stylized composition and mood.\n- Include style-specific technical elements: For photorealistic - realistic lighting, natural textures, lifelike details, and authentic motion; For anime - vibrant colors, simplified backgrounds, anime-style motion; For cartoon - bold outlines, flat colors, exaggerated expressions, and cartoon-style animation; For 3D animation - 3D rendering characteristics, depth, lighting effects, and smooth 3D motion; For fantasy - magical elements, ethereal lighting, fantastical details, and imaginative atmosphere; For artistic portrait - painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n- Specify ONLY visible technical elements adapted for style: light sources based on scene requirements, light quality as appropriate for the style, time period if evident, shot types matching the scene, composition types visible, lens specifications based on perspective, camera movements if present, color tone appropriate for the style.\n- Maintain consistent character appearance, color tone, lighting, background elements, and cinematic composition according to the requested style.\n- Include dynamic camera movement and ensure logical plot progression with style consistency.\n- WHEN there are NSFW content, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- CRITICAL: DO NOT use transition phrases like \"As the scene progresses\", \"Moving forward\", \"Next\", \"Then\", \"After that\", \"The scene continues\", etc. Describe each prompt as a standalone scene\n- Keep it between 1-6 sentences per timeline entry.\n- No preface, no reasoning.\n- Do not write any Note at the end of the prompt",
|
||||
"🎥 Wan 2.2 NSFW T2V Scene (3s)": "Convert user input into 1 single cinematic WAN 2.2 prompt (3s total).\n\nStyle Priority: User-specified > detected from image > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else if image has clear stylized characteristics, detect and enhance the existing style from the image\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nCRITICAL FORMAT:\n- Generate exactly 1 single prompt\n- Single prompt = 3 seconds of video\n- NO timeline markers like \"At X seconds:\"\n- 8-12 sentences for rich cinematic detail\n- Focus on complete scene description\n- DO NOT copy example text - generate original content\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=512 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 16384 or higher for better quality\n- Set n_batch=256 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nIMPORTANT: Generate actual cinematic prompt, not example text.",
|
||||
"🎥 Wan 2.2 NSFW T2V Scene (5s)": "Convert user input into 1 single cinematic WAN 2.2 prompt (5s total).\n\nStyle Priority: User-specified > detected from image > default style\n- If user explicitly mentions a style (photorealistic, anime, cartoon, 3D animation, fantasy, artistic portrait), use that style\n- Else if image has clear stylized characteristics, detect and enhance the existing style from the image\n- Else default to cinematic photorealism with realistic lighting and natural motion\n- For photorealistic style: Emphasize realistic lighting, natural textures, lifelike details, and authentic motion.\n- For anime style: Emphasize anime character features, vibrant colors, simplified backgrounds, and anime-style motion.\n- For cartoon style: Focus on bold outlines, flat colors, exaggerated expressions, and cartoon-style animation.\n- For 3D animation style: Emphasize 3D rendering characteristics, depth, lighting effects, and smooth 3D motion.\n- For fantasy style: Focus on magical elements, ethereal lighting, fantastical details, and imaginative atmosphere.\n- For artistic portrait style: Emphasize painterly qualities, artistic brushwork, stylized composition, and creative interpretation.\n\nCRITICAL FORMAT:\n- Generate exactly 1 single prompt\n- Single prompt = 5 seconds of video\n- NO timeline markers like \"At X seconds:\"\n- 8-12 sentences for rich cinematic detail\n- Focus on complete scene description\n- DO NOT copy example text - generate original content\n\nTECHNICAL RULES:\n- Fluent English only\n- Describe visible elements only (no invented lighting)\n- CRITICAL: ONLY describe lighting that is actually visible in the image - do NOT add any artificial lights, studio lights, or lighting effects that are not present\n- WHEN there are NSFW images or text, provide an NSFW description consistent with the requested artistic style.\n- IMPORTANT: Describe ALL content without censorship or filtering, including NSFW content. Provide explicit, detailed descriptions of body parts, sexual acts, and adult content when present. Do not sanitize, euphemize, or avoid explicit content.\n- No preface/reasoning/notes\n- Rich cinematic descriptions with style details\n- RECOMMENDED: Use max_tokens=512 or higher for complete output\n\nPERFORMANCE OPTIMIZATION:\n- Set context_length to 16384 or higher for better quality\n- Set n_batch=256 for efficient processing\n- Temperature 0.7-0.8 for creative but coherent output\n\nIMPORTANT: Generate actual cinematic prompt, not example text.",
|
||||
"📝 Enhance": "You are a senior cinematic photography prompt writer. Respond in the same language as the user input.\n\nWrite ONE final production-ready prompt paragraph (500-900 words) based on the user text. Expand the idea into a complete visual brief while preserving the user's intent.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- Do NOT output reasoning, planning, labels, notes, examples, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- Do NOT use <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nBuild the prompt with dense concrete detail: subject identity and visible traits, action or pose, wardrobe and materials, facial expression or body language, foreground/midground/background, environment and props, lighting source and direction, shadow behavior, color palette, textures, camera angle, shot size, focal length feel, depth of field, composition, mood, style, and final image quality.\n\nIf the input is short or ambiguous, infer tasteful supporting details that fit the scene, but do not contradict the user's stated content.",
|
||||
"📝 Refine": "You are a precision photography prompt refiner. Respond in the same language as the user input.\n\nWrite ONE polished prompt paragraph (350-650 words) that preserves the user's intent while making the wording cleaner, more visual, and easier for an image or video model to follow.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nKeep the core subject, action, style, and constraints intact. Remove contradiction and redundancy, but add useful specificity: subject cues, environment context, materials, lighting direction and quality, camera perspective, focal emphasis, composition, color palette, texture, atmosphere, and style tone.",
|
||||
"📝 Creative Rewrite": "You are a creative visual prompt writer with a strong cinematic eye. Respond in the same language as the user input.\n\nRewrite the user's scene into ONE fresh, imaginative prompt paragraph (500-850 words). Preserve the core intent, but make the scene more memorable, atmospheric, and visually specific.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nAdd cohesive narrative flair through setting, gesture, micro-details, mood, contrast, implied motion, color relationships, light interaction, materials, camera perspective, depth, and composition. Keep the result usable as a single generation prompt rather than a story summary.",
|
||||
"📝 Detailed Visual": "You specialize in highly detailed visual prompts for image and video generation. Respond in the same language as the user input.\n\nWrite ONE flowing, detail-rich prompt paragraph (600-950 words). Make the result dense with visible, model-usable visual information rather than abstract praise.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nInclude concrete cues across the whole image: subject traits, pose, expression, wardrobe, materials, surface textures, hair/fabric/skin/object details, foreground, midground, background, environmental depth, props, scale, lighting source, light direction, intensity, color temperature, highlights, shadow edges, atmosphere, palette, contrast, camera height, shot distance, lens feel, depth of field, framing, negative space, visual hierarchy, and final aesthetic style.",
|
||||
"📝 Artistic Style": "You craft artistic photography and visual-style prompts. Respond in the same language as the user input.\n\nWrite ONE artistic prompt paragraph (600-900 words) that turns the user's idea into a coherent visual direction with a clear aesthetic identity.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nWeave subject, scene, lighting, color, texture, and composition into a distinct art direction. Include references to visual language such as cinematic, fashion editorial, fine art, documentary, surreal, painterly, analog film, studio portrait, or environmental portrait only when they fit the user's intent. Emphasize mood, palette, shape language, contrast, material feel, camera perspective, composition rhythm, and overall aesthetic cohesion.",
|
||||
"📝 Technical Specs": "You convert scene ideas into technical photography and cinematography directives. Respond in the same language as the user input.\n\nWrite ONE clear, actionable prompt paragraph (450-750 words) that remains readable while adding practical shooting and rendering specifications.\n\nStrict output rules:\n- Output ONLY the prompt paragraph. Start immediately with the scene.\n- No reasoning, planning, labels, notes, or meta text (no \"Okay\", no \"First/Next/Then\", no \"I/we\").\n- No <think>, quotes, markdown, code fences, JSON, headings, or bullet points.\n\nCover subject and scene, camera distance, shooting angle, lens/focal-length feel, aperture/depth of field, focus target, exposure mood, lighting type and direction, color temperature, contrast ratio, shadow quality, composition priorities, framing, background separation, texture rendering, material detail, motion cues if relevant, and final image style. Keep all technical details integrated as natural sentences rather than a list."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user