V 1.0.0 - New readme

This commit is contained in:
DESKTOP-CNFQ7PM\Primere
2024-11-22 13:20:53 +01:00
parent a868e88907
commit 2fb83d2964
5 changed files with 337 additions and 1 deletions
@@ -298,4 +298,153 @@ Remember: Fine-tune these settings based on your specific use case and desired o
#### Hands, but aesthetic scorer automatically ignored the second:
<img src="refiner_block_hands2.jpg" width="500px">
<hr>
# <ins>DiT Prompt Purifier Node:</ins>
<img src="prompt_dit_cleaner.jpg" width="500px">
### Overview:
The DiT Prompt Purifier node automatically cleans and optimizes prompts for modern Diffusion Transformer (DiT) architectures by removing incompatible elements, weights, and structural components that may interfere with newer models.
### Key Features:
- Automatic model version detection
- Character length limitation
- Architecture-specific prompt purification
- Selective cleaning based on model Architecture
- Incompatible weight and structure removal
### Cleaning Operations
#### Removes:
- Prompt weights (e.g., `(element:1.2)`)
- Legacy break commands (`BREAK`)
- Nested parentheses structures
- Old-style prompt formatting
#### Controls:
- `max_length`: Character limit (0 = unlimited)
- Model-specific purification toggles
- Automatic architecture detection by loaded checkpoint
### Architecture Controls:
#### Standard Models (no need to purify)
- `purify_sd1`: SD1.x prompts
- `purify_sd2`: SD2.x prompts
- `purify_sdxl`: SDXL prompts
- `purify_sd3`: SD3 prompts
#### Modern DiT Models (have to purify)
- `purify_stablecascade`: Stable Cascade
- `purify_flux`: Flux models
- `purify_kwaikolors`: KwaiKolors
- `purify_hunyuan`: Hunyuan
#### Specialized Models (no need to purify)
- `purify_turbo`: Turbo models
- `purify_playground`: Playground
- `purify_pony`: Pony models
- `purify_lcm`: LCM variants
- `purify_lightning`: Lightning
- `purify_hyper`: Hyper models
- `purify_pixartsigma`: PixArt-Sigma
### Use Cases:
#### Basic Prompt Cleaning:
```plaintext
Input: "(high quality:1.2), (detailed:1.4) BREAK (masterpiece)"
Output: "high quality, detailed, masterpiece"
```
#### Length Control:
```plaintext
Settings:
- max_length: 50
- purify_flux: ON
Input: "Long prompt with excessive description and weights..."
Output: "Truncated prompt within 50 characters but keep the whole last word..."
```
### Configuration Examples:
#### Flux Optimization:
```plaintext
Settings:
- purify_flux: ON
- max_length: 0
Benefits:
- DiT-compatible structure
- Weight removal
- Clean formatting
```
#### Mixed Model Pipeline:
```plaintext
Settings:
- Keep non-target models OFF
- Enable specific model purification
- Set appropriate length limit
Benefits:
- Model-specific optimization
- Controlled cleaning
- Maintained compatibility
```
### Benefits:
#### Compatibility:
- Ensures DiT architecture compliance
- Removes problematic structures
- Maintains old (A1111 compatible) prompt essence
### Best Practices:
1. **Model Selection**
- Enable purification for target model
- Disable for non-relevant architectures
- Verify model detection
2. **Length Management**
- Set appropriate max_length
- Use 0 for unlimited length
- Monitor output for truncation
3. **Cleaning Strategy**
- Enable relevant model switches
- Check debug output
- Verify cleaned prompt
### Recommended Settings:
#### DiT Models:
```plaintext
- set purify_<model_type>: ON
- max_length: 0 (or set if the result too noisy)
- other model type purify switches: OFF
```
#### Legacy Models:
```plaintext
Keep settings:
- purify switches: OFF
- max_length: 0
- Maintains original structure
```
### Tips for Usage:
1. Monitor debug output for cleaning verification
2. Adjust length limits based on model requirements
3. Enable only relevant DiT model purification
4. Test cleaned prompts before batch processing
5. Keep original prompts for reference
Remember: DiT prompt purification is essential for optimal performance with modern architectures while maintaining prompt effectiveness.
<hr>
+188 -1
View File
@@ -395,6 +395,140 @@ This node automatically saves images along with metadata, generated by the full
<hr>
# <ins>Network Tag Cleaner Node:</ins>
<img src="prompt_network_cleaner.jpg" width="250px">
### Overview:
The Network Tag Cleaner node provides intelligent management of network adapter tags in prompts, supporting both manual and automatic cleaning modes for various model architectures.
### Supported Network Types:
- Embeddings (`embedding:name`)
- LoRA (`<lora:name>`)
- LyCORIS (`<lycoris:name>`)
- Hypernetworks (`<hypernetwork:name>`)
### Operation Modes:
#### Manual Mode:
When `auto_remover` is set to OFF:
- Full control over tag removal
- Selective cleaning based on model architecture
- Requires manual configuration
#### Auto Mode:
When `auto_remover` is set to ON:
- Intelligent compatibility checking
- Automatic removal of only incompatible tags
- Preserves all matching architecture tags
### Control Switches:
#### Network Type Controls:
- `remove_embedding`: Toggle embedding removal
- `remove_lora`: Toggle LoRA tag removal
- `remove_lycoris`: Toggle LyCORIS tag removal
- `remove_hypernetwork`: Toggle hypernetwork removal
#### Architecture-Specific Controls:
- `remove_only_sd1`: SD1.x network tags
- `remove_only_sd2`: SD2.x network tags
- `remove_only_sdxl`: SDXL network tags
- `remove_only_sd3`: SD3 network tags
- `remove_only_stablecascade`: Stable Cascade tags
- `remove_only_turbo`: Turbo model tags
- `remove_only_flux`: Flux model tags
- `remove_only_kwaikolors`: KwaiKolors tags
- `remove_only_hunyuan`: Hunyuan tags
- `remove_only_playground`: Playground tags
- `remove_only_pony`: Pony tags
- `remove_only_lcm`: LCM tags
- `remove_only_lightning`: Lightning tags
- `remove_only_hyper`: Hyper tags
- `remove_only_pixartsigma`: PixArt-Sigma tags
### Use Cases:
#### Manual Cleaning Mode:
```plaintext
Scenario 1: SDXL-Only Workflow
Settings:
- auto_remover: OFF
- remove_lora: ON
- remove_only_sd1: ON
- remove_only_sd2: ON
- remove_only_sdxl: OFF
Result: Removes all SD1 and SD2 LoRA tags while keeping SDXL LoRAs
```
#### Auto Cleaning Mode:
```plaintext
Scenario 1: Using Flux Checkpoint
Settings:
- auto_remover: ON
- remove_lora: ON
- remove_lycoris: ON
Result:
- Keeps Flux-compatible network tags
- Removes SD1/SD2/SDXL and all other non-flux network tags
- Preserves model-specific optimizations
```
```plaintext
Scenario 2: Using SDXL Checkpoint
Settings:
- auto_remover: ON
- remove_lora: ON
Result:
- Maintains SDXL LoRA tags
- Removes all other incompatible network tags
- Ensures workflow compatibility
```
### Benefits:
#### Workflow Optimization:
- Prevents incompatible network usage
- Reduces generation errors
- Streamlines prompt management
#### Error Prevention:
- Eliminates architecture mismatches
- Prevents memory issues
- Reduces failed generations
#### User Convenience:
- Automatic compatibility checking
- Simple toggle controls
- Clear visual feedback
#### Advanced Usage:
```plaintext
Settings:
- auto_remover: ON
- All network types enabled
- Model-specific switches as needed
Benefits:
- Comprehensive tag management
- Maximum compatibility
- Automated workflow optimization
```
### Recommendations:
1. Start with auto mode for general use
2. Switch to manual mode for specific needs
3. Regular prompt verification
4. Keep model architecture in mind
Remember: The cleaner node ensures optimal network compatibility while maintaining prompt integrity and workflow efficiency.
<hr>
# <ins>Network Tag Loader:</ins>
<img src="networks_loader.jpg" width="250px">
@@ -431,4 +565,57 @@ This node manages additional networks such as Lora, Lycoris, and hypernetworks f
- `Enhanced Control`: Allows fine-tuning of model behavior using additional networks
- `Prompt Customization`: Adjusts prompts dynamically using Lora and Lycoris keywords for more refined image generation
- `Network Compatibility`: Supports multiple network types, providing flexibility in mixing styles and behaviors
- `Workflow Integration`: Seamlessly integrates with existing models and workflows in ComfyUI for consistent results
- `Workflow Integration`: Seamlessly integrates with existing models and workflows in ComfyUI for consistent results
<hr>
# <ins>Primere Embedding Handler:</ins>
<img src="prompt_embedding.jpg" width="500px">
A ComfyUI node that automatically converts Automatic1111-style textual inversion embedding syntax to ComfyUI-compatible format.
### Description:
This node allows you to use Automatic1111-style embedding syntax in your prompts while working in ComfyUI. It automatically detects embedding keywords and converts them to the proper ComfyUI format.
### How It Works:
#### Input Format (Automatic1111 style):
- Simple keywords like `Autumn` or `Summer`
- No special prefix needed
- Must match exactly with embedding filename (case-sensitive) without extension
#### Output Format (ComfyUI style):
- Converted to `embedding:Autumn` or `embedding:Summer`
- Properly formatted for ComfyUI processing
- Only converts if matching embedding file exists
### Example:
Input prompt:
```
This prompt contains Autumn. The embedding name is case sensitive: summer just a word, but Summer is embedding.
```
Output prompt:
```
This prompt contains embedding:Autumn. The embedding name is case sensitive: summer just a word, but embedding:Summer is embedding.
```
### Features:
- Seamless conversion between Automatic1111 and ComfyUI embedding formats
- Case-sensitive matching to prevent unwanted conversions
- Only converts existing embeddings
- Works with both positive and negative prompts
- Real-time conversion during workflow execution
### Benefits:
- Use Automatic1111 prompts directly in ComfyUI without manual conversion
- Maintain compatibility with existing prompt collections
- Reduce errors from incorrect embedding syntax
- Save time on prompt formatting
<hr>
Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB