Improve setup documentation and ComfyUI UX (#29)
## Summary Addresses documentation gaps identified in issue #25 by improving setup instructions and user experience across all supported platforms. ## Changes Made ### 📚 README Enhancements - **ComfyUI Setup Section**: Added collapsible setup instructions with: - Clear workflow explanation (Model → NRS Node → KSampler) - Prominent note that CFG setting on KSampler is ignored - Pro tip for validating NRS is working - Reference to the workflow image from issue #25 - **A1111/Forge/reForge Setup Section**: Added setup instructions explaining: - Extension installation and enabling process - CFG Scale is ignored when NRS is active - Reference to Beginner How-To for parameter guidance - **StabilityMatrix Integration**: Added section highlighting native support with link to https://lykos.ai/ ### 🖥️ ComfyUI Node UX Improvements - **Node Description**: Added clear explanation that NRS replaces CFG and KSampler CFG will be ignored - **Parameter Tooltips**: Added helpful guidance directly in the interface: - **Skew**: Explains direction steering, suggests starting with CFG/2 - **Stretch**: Explains positive intensification, suggests normal CFG value - **Squash**: Explains effect softening, recommends keeping low initially ## Problem Solved This addresses the confusion reported in issue #25 where users struggled with: - How to configure CFG values in ComfyUI workflows - Understanding the relationship between NRS and CFG - Lack of example workflows and clear setup guidance ## Test Plan - [x] Verify README renders correctly with collapsible sections - [ ] Test ComfyUI node shows tooltips when hovering over parameters - [ ] Confirm node description appears in ComfyUI interface - [x] Validate links work correctly (StabilityMatrix) Fixes #25
This commit is contained in:
@@ -172,3 +172,8 @@ cython_debug/
|
||||
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
|
||||
|
||||
# AI agents
|
||||
.claude/settings.local.json
|
||||
.claude/docs/**
|
||||
|
||||
+9
-4
@@ -24,16 +24,21 @@ _RAW_TO_ENUM = {
|
||||
class NRS:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {"required": { "model": ("MODEL",),
|
||||
"skew": ("FLOAT", {"default": 2.00, "min": -30.0, "max": 30.0, "step": 0.01}),
|
||||
"stretch": ("FLOAT", {"default": 5.00, "min": -30.0, "max": 30.0, "step": 0.01}),
|
||||
"squash": ("FLOAT", {"default": 0.75, "min": 0.0, "max": 1.0, "step": 0.01}),
|
||||
return {"required": { "model": ("MODEL", {"tooltip": "Input model to apply NRS to"}),
|
||||
"skew": ("FLOAT", {"default": 2.00, "min": -30.0, "max": 30.0, "step": 0.01,
|
||||
"tooltip": "Changes the 'direction' of generation, steering away from negative prompt elements. Start with CFG/2."}),
|
||||
"stretch": ("FLOAT", {"default": 5.00, "min": -30.0, "max": 30.0, "step": 0.01,
|
||||
"tooltip": "Intensifies positive prompt elements. Start with your normal CFG value."}),
|
||||
"squash": ("FLOAT", {"default": 0.75, "min": 0.0, "max": 1.0, "step": 0.01,
|
||||
"tooltip": "Softens Skew/Stretch effects, adding micro-detailing. Keep low initially."}),
|
||||
}}
|
||||
RETURN_TYPES = ("MODEL",)
|
||||
FUNCTION = "patch"
|
||||
|
||||
CATEGORY = "advanced/model"
|
||||
|
||||
DESCRIPTION = "Negative Rejection Steering (NRS) replaces CFG with more nuanced guidance. IMPORTANT: Set your KSampler CFG to any value (it will be ignored). Connect your model through this node before sampling."
|
||||
|
||||
def _get_pred_type(self, model) -> PredictionType:
|
||||
"""
|
||||
In order to support Comfy, Forge, and possibly other models
|
||||
|
||||
@@ -73,6 +73,48 @@ NRS seeks to replace the 'naive' linear interpolation of Classifier Free Guidanc
|
||||
> [!WARNING]
|
||||
> Don't set NRS values to negatives if there are things in your negative prompt you **actually** don't want to see.
|
||||
|
||||
## Setup & Installation
|
||||
|
||||
### ComfyUI
|
||||
<details>
|
||||
<summary>ComfyUI Setup Instructions</summary>
|
||||
|
||||
#### Installation
|
||||
Install via ComfyUI Manager or manually clone this repository into your `ComfyUI/custom_nodes/` directory.
|
||||
|
||||
#### Usage
|
||||
1. **Important**: Ignore the CFG setting on your KSampler node - NRS replaces CFG entirely
|
||||
2. Connect your model through the **Negative Rejection Steering** node before sampling
|
||||
3. Configure NRS parameters (Skew/Stretch/Squash) instead of using CFG
|
||||
|
||||
#### Basic Workflow
|
||||
```
|
||||
Model → NRS Node → KSampler
|
||||
```
|
||||
|
||||
**Pro tip**: To verify NRS is working correctly, set CFG to an extremely high value (like 30). If your output looks normal, NRS is functioning properly. If the output appears "turbo fried," check your node connections.
|
||||
|
||||

|
||||
</details>
|
||||
|
||||
### Automatic1111 / Forge / reForge
|
||||
<details>
|
||||
<summary>WebUI Setup Instructions</summary>
|
||||
|
||||
#### Installation
|
||||
1. Install the extension through the Extensions tab in your WebUI
|
||||
2. Enable the extension and restart your WebUI
|
||||
|
||||
#### Usage
|
||||
Once installed and enabled, the NRS settings panel will appear in your generation interface. When NRS is active:
|
||||
- **CFG Scale is ignored** - the WebUI may still show the CFG setting, but it has no effect
|
||||
- Use the NRS parameters (Skew/Stretch/Squash) to control generation instead
|
||||
- Follow the same parameter guidelines from the [Beginner How-To](#beginner-how-to) section
|
||||
</details>
|
||||
|
||||
### StabilityMatrix Integration
|
||||
NRS is available as a **natively supported module** in [StabilityMatrix](https://lykos.ai/), providing an easy installation and management option for users of that platform.
|
||||
|
||||
## Submitted User Examples
|
||||
| User | CFG | NRS |
|
||||
| --- | --- | --- |
|
||||
|
||||
Reference in New Issue
Block a user