fix: address code review findings for style system consolidation

This commit is contained in:
limbicnation
2026-02-27 06:10:03 +01:00
parent 3f0ee9b3ee
commit 0829dfd336
5 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
ComfyUI custom node that generates Stable Diffusion prompts using Ollama. Users provide a brief description and select a style preset; the node outputs a detailed, optimized prompt. Supports LoRA-enhanced models with automatic discovery and prioritization.
**Current version**: `1.1.6`
**Current version**: `1.1.7`
## Architecture
+1 -1
View File
@@ -13,7 +13,7 @@ NODE_CLASS_MAPPINGS = {
NODE_DISPLAY_NAME_MAPPINGS = {
"PromptGenerator": "🎨 Prompt Generator (Qwen)",
"StyleApplier": "🎬 Style Applier (Cinematic/Photo)",
"StyleApplier": "🎬 Style Applier",
}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
+4 -2
View File
@@ -294,8 +294,10 @@ Format the response as a single, detailed photography prompt.""",
templates = yaml.safe_load(f)
if templates:
return list(templates.keys())
except Exception:
pass
except Exception as e:
print(
f"[PromptGenerator] Warning: Failed to load style list from templates.yaml: {e}"
)
return list(cls.DEFAULT_STYLES.keys())
@classmethod
+5 -3
View File
@@ -1,6 +1,6 @@
"""
Style Applier Node for ComfyUI
Applies Cinematic or Still Image style keywords to prompts.
Applies style keywords to prompts using the shared StylePreset system (9 styles).
"""
from typing import Tuple
@@ -8,11 +8,13 @@ from typing import Tuple
class StyleApplierNode:
"""
ComfyUI node for applying Cinematic or Still Image style keywords to prompts.
ComfyUI node for applying style keywords to prompts.
Uses the shared StylePreset system with 9 available styles.
Inputs:
- prompt: Base prompt text
- style: "cinematic" or "still_image"
- style: One of 9 style presets (e.g. "cinematic", "anime", "cyberpunk")
- position: Where to add keywords ("prefix", "suffix", or "wrap")
- emphasis: Optional emphasis level ("low", "medium", "high")
- include_technical: Include camera/technical specs
+2 -2
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-prompt-generator"
description = "Generate Stable Diffusion prompts using Qwen3-8B via Ollama with 7 style presets"
version = "1.1.6"
description = "Generate Stable Diffusion prompts using Qwen3-8B via Ollama with 9 style presets"
version = "1.1.7"
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.10"