Add negative prompt to boogu edit node and set min images to 0.#14529
Conversation
📝 WalkthroughWalkthroughTwo changes are made to Boogu model support. In 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@comfy_extras/nodes_boogu.py`:
- Line 29: The `negative_prompt` input added to the `TextEncodeBooguEdit` node
is currently required, which breaks backward compatibility with existing saved
workflows that do not include this field. Modify the `io.String.Input`
definition for `negative_prompt` to include a default value of an empty string,
and ensure the `execute()` method also handles the case where `negative_prompt`
defaults to an empty string when not provided. This preserves the existing node
interface while supporting the new functionality for workflows that do provide
the value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ec20cabb-7d31-401e-a044-eabc31999abd
📒 Files selected for processing (2)
comfy/supported_models.pycomfy_extras/nodes_boogu.py
| inputs=[ | ||
| io.Clip.Input("clip"), | ||
| io.String.Input("prompt", multiline=True, dynamic_prompts=True), | ||
| io.String.Input("negative_prompt", multiline=True, dynamic_prompts=True, advanced=True), |
There was a problem hiding this comment.
Preserve backward compatibility by making negative_prompt optional with a default.
Adding negative_prompt as a required input changes the node interface and can break existing saved workflows that instantiate TextEncodeBooguEdit without this field. Keep the new input, but default it to "" in schema and execute().
Suggested patch
- io.String.Input("negative_prompt", multiline=True, dynamic_prompts=True, advanced=True),
+ io.String.Input("negative_prompt", default="", multiline=True, dynamic_prompts=True, advanced=True),
@@
- def execute(cls, clip, prompt, negative_prompt, vae=None, images: io.Autogrow.Type = None) -> io.NodeOutput:
+ def execute(cls, clip, prompt, negative_prompt="", vae=None, images: io.Autogrow.Type = None) -> io.NodeOutput:As per coding guidelines, comfy_extras/** changes should avoid breaking existing node interfaces.
Also applies to: 48-48
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@comfy_extras/nodes_boogu.py` at line 29, The `negative_prompt` input added to
the `TextEncodeBooguEdit` node is currently required, which breaks backward
compatibility with existing saved workflows that do not include this field.
Modify the `io.String.Input` definition for `negative_prompt` to include a
default value of an empty string, and ensure the `execute()` method also handles
the case where `negative_prompt` defaults to an empty string when not provided.
This preserves the existing node interface while supporting the new
functionality for workflows that do provide the value.
Source: Coding guidelines
No description provided.