chore: remove unwanted files and update .gitignore
This commit is contained in:
@@ -195,6 +195,11 @@ cython_debug/
|
||||
.claude/
|
||||
AGENTS.md
|
||||
|
||||
# Project artifacts
|
||||
*.zip
|
||||
social/
|
||||
code-review-*.md
|
||||
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
# Code Review: ComfyUI-PromptGenerator
|
||||
|
||||
## Executive Summary
|
||||
|
||||
The codebase is well-structured with good error handling and graceful degradation patterns. However, there is a **critical inconsistency** in the style system between the two nodes, plus several architectural concerns worth addressing.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 Critical Issues
|
||||
|
||||
### 1. Style System Inconsistency (High Priority)
|
||||
|
||||
**Problem:** The two nodes have completely different style options:
|
||||
|
||||
| Node | Available Styles |
|
||||
|------|------------------|
|
||||
| `PromptGeneratorNode` | cinematic, anime, photorealistic, fantasy, abstract, cyberpunk, sci-fi, video_wan (8 styles) |
|
||||
| `StyleApplierNode` | cinematic, still_image (2 styles via `StylePreset.get_style_choices()`) |
|
||||
|
||||
The `style_presets.py` module only defines 2 styles, while `config/templates.yaml` and `DEFAULT_STYLES` define 8 styles.
|
||||
|
||||
**Impact:** Users expect consistency. If they select "anime" style in PromptGenerator, they cannot use StyleApplier with "anime" - it will fail validation.
|
||||
|
||||
**Recommendation:** Either:
|
||||
|
||||
- Expand `STYLE_DEFINITIONS` in `style_presets.py` to include all 8 styles
|
||||
- Or consolidate to use templates.yaml as the single source of truth
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Architectural Concerns
|
||||
|
||||
### 2. Triple Source of Truth for Styles
|
||||
|
||||
The codebase has three different places defining styles:
|
||||
|
||||
1. `config/templates.yaml` - YAML templates
|
||||
2. `DEFAULT_STYLES` dict in Python (`prompt_generator_node.py`)
|
||||
3. `style_presets.py` - StyleKeywords dataclass
|
||||
|
||||
**Recommendation:** Consolidate to a single source. The YAML file is user-editable and should be the authoritative source.
|
||||
|
||||
### 3. Unused `style_presets.py` Module
|
||||
|
||||
The `StylePreset` class is only used by `StyleApplierNode`. The main `PromptGeneratorNode` uses its own `DEFAULT_STYLES` dict and YAML templates.
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Code Quality Issues
|
||||
|
||||
### 4. Missing Style Validation in `generate()`
|
||||
|
||||
In `generate()`, there's no validation that the selected style exists - it silently falls back to cinematic.
|
||||
|
||||
### 5. Inconsistent Error Messages
|
||||
|
||||
- `PromptGeneratorNode` returns emoji-prefixed messages: `"⚠️ Please enter an image description."`
|
||||
- `StyleApplierNode` returns bracket-prefixed: `"[StyleApplier] Error: Unknown style..."`
|
||||
|
||||
**Recommendation:** Standardize error message format.
|
||||
|
||||
### 6. Hardcoded Values
|
||||
|
||||
- `chunk_timeout = 30` is hardcoded in streaming
|
||||
- Model list in `_get_available_models()` has hardcoded defaults
|
||||
|
||||
---
|
||||
|
||||
## ✅ Positive Patterns
|
||||
|
||||
1. **Graceful Degradation:** Excellent use of optional imports with fallbacks
|
||||
2. **Streaming Implementation:** Well-designed background thread approach for timeout enforcement
|
||||
3. **Cold Start Detection:** Smart 1.3x timeout multiplier for unloaded models
|
||||
4. **Model Caching:** 60-second cache prevents UI freezes
|
||||
5. **LoRA Prioritization:** Good sorting logic to surface fine-tuned models first
|
||||
|
||||
---
|
||||
|
||||
## 📋 Recommendations Priority List
|
||||
|
||||
| Priority | Issue | Action |
|
||||
|----------|-------|--------|
|
||||
| P0 | Style inconsistency | Sync `style_presets.py` with 8 styles or consolidate |
|
||||
| P1 | Triple source of truth | Make templates.yaml the single source |
|
||||
| P2 | Silent style fallback | Add validation/warning when style not found |
|
||||
| P3 | Error message format | Standardize across nodes |
|
||||
| P4 | Hardcoded values | Move to config/constants |
|
||||
@@ -1,36 +0,0 @@
|
||||
# Social Media Posts - v1.1.6 Bug Fix Release
|
||||
|
||||
## LinkedIn Post
|
||||
|
||||
---
|
||||
|
||||
**Fixed the 120s timeout issue in ComfyUI Prompt Generator (v1.1.6)**
|
||||
|
||||
If you've been hitting "Generation Timed Out 120s" errors with the ComfyUI Prompt Generator node - this is now resolved.
|
||||
|
||||
The root cause: the blocking `ollama.generate()` call had no way to handle slow model responses or cold starts gracefully.
|
||||
|
||||
What changed in v1.1.6:
|
||||
- Replaced blocking API call with streaming + per-chunk timeouts
|
||||
- Added cold start detection with automatic timeout multiplier
|
||||
- Integrated ComfyUI ProgressBar so you can see generation progress in real time
|
||||
|
||||
Update via ComfyUI Manager or pull the latest from GitHub.
|
||||
|
||||
https://github.com/Limbicnation/ComfyUI-PromptGenerator
|
||||
|
||||
#ComfyUI #StableDiffusion #Ollama #AIArt #OpenSource #BugFix
|
||||
|
||||
---
|
||||
|
||||
## YouTube Reply to @luci0c4s3
|
||||
|
||||
---
|
||||
|
||||
> @luci0c4s3: "Getting Generation Timed 120s as an error each time I run the node."
|
||||
|
||||
**Reply:**
|
||||
|
||||
Hey! This was a known issue and it's been fixed in v1.1.6. The blocking Ollama call was replaced with streaming + per-chunk timeouts, which eliminates the 120s timeout error. Cold starts also get extra time automatically now. Update via ComfyUI Manager or grab the latest from GitHub: https://github.com/Limbicnation/ComfyUI-PromptGenerator
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user