Add New Seed Node (CORE-295)#14544
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA new file 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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: 2
🤖 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_seed.py`:
- Around line 53-56: The numeric conversion of seed using int(inputs.get("seed",
0)) on line 53 executes before the wire check on line 56, causing a failure if
seed is wired as a list. Move the wire check logic (is_wired =
isinstance(inputs.get("seed"), list)) before the int conversion, and
conditionally convert master to int only when is_wired is False to prevent the
type conversion error when seed is a wired input.
- Around line 49-76: The `processed` set is incorrectly marking nodes as
processed even when no seed update actually occurs. Move the
`processed.add(tid)` statement (currently at the end of the loop, outside the
conditional check) to only execute inside the conditional block where the seed
is actually written (after the line `node_inputs["seed"] = master`). This
ensures nodes are only marked as processed when they actually receive a seed
value update, allowing later GlobalSeed nodes with overwrite all mode to still
update nodes that were skipped by earlier nodes.
🪄 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 Plus
Run ID: d3776e48-7be9-458e-ab44-f65a08b06c9b
📒 Files selected for processing (2)
comfy_extras/nodes_seed.pynodes.py
065975a to
1e525fa
Compare
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_seed.py`:
- Around line 57-61: The guard condition at line 58 only skips when both
is_wired and is_global are true, but the actual issue occurs whenever is_wired
is true regardless of global mode. When is_wired is true but is_global is false,
the code continues past the guard and attempts int(master) on line 63 where
master is still a list (e.g., ["node_id", 0]), causing a TypeError. Change the
condition from "if is_wired and is_global:" to "if is_wired:" so that the
continue statement executes for all cases where the seed input is wired,
preventing the downstream int(master) call from receiving a list 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 Plus
Run ID: 0968d002-1545-4c9d-9cb0-b07025f296e5
📒 Files selected for processing (1)
comfy_extras/nodes_seed.py
Adds a new seed node with a global and a local modes
Global Option will overwrite all the nodes with "seed" in them. Local Option will only overwrite nodes connected directly from the sockets.
The Seed node has two modes: "overwrite all" and "placeholders only". Placeholder-only will only overwrite seeds with 0 as their value. Overwrite all will overwrite all seed inputs across the workflow.
The screenshot shows deterministic outputs with "randomize value" as the chosen option for the ksampler.