mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-06 13:40:25 +00:00
## Summary Tested these changes and confirmed that: 1. Feedback button shows. 2. You can run workflows and switch out models. 3. You can use the mask editor. (thank you @ric-yu for helping me verify). ## Changes A lot, please see commits. Gets us up to date with `main` as of 10-11-2025. --------- Co-authored-by: Simula_r <18093452+simula-r@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: snomiao <snomiao@gmail.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: DrJKL <DrJKL@users.noreply.github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Marwan Ahmed <155799754+marawan206@users.noreply.github.com> Co-authored-by: DrJKL <DrJKL0424@gmail.com> Co-authored-by: Rizumu Ayaka <rizumu@ayaka.moe> Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com> Co-authored-by: AustinMroz <4284322+AustinMroz@users.noreply.github.com> Co-authored-by: Austin Mroz <austin@comfy.org> Co-authored-by: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com> Co-authored-by: Benjamin Lu <benceruleanlu@proton.me> Co-authored-by: Jin Yi <jin12cc@gmail.com> Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
69 lines
2.3 KiB
TypeScript
69 lines
2.3 KiB
TypeScript
import type { GroupNodeHandler } from '@/extensions/core/groupNode'
|
|
import { ExecutableNodeDTO } from '@/lib/litegraph/src/litegraph'
|
|
import type {
|
|
ExecutableLGraphNode,
|
|
ExecutionId,
|
|
LGraphNode,
|
|
NodeId,
|
|
SubgraphNode
|
|
} from '@/lib/litegraph/src/litegraph'
|
|
|
|
export class ExecutableGroupNodeChildDTO extends ExecutableNodeDTO {
|
|
groupNodeHandler?: GroupNodeHandler
|
|
|
|
constructor(
|
|
/** The actual node that this DTO wraps. */
|
|
node: LGraphNode | SubgraphNode,
|
|
/** A list of subgraph instance node IDs from the root graph to the containing instance. @see {@link id} */
|
|
subgraphNodePath: readonly NodeId[],
|
|
/** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
|
|
nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
|
|
/** The actual subgraph instance that contains this node, otherwise undefined. */
|
|
subgraphNode?: SubgraphNode | undefined,
|
|
groupNodeHandler?: GroupNodeHandler
|
|
) {
|
|
super(node, subgraphNodePath, nodesByExecutionId, subgraphNode)
|
|
this.groupNodeHandler = groupNodeHandler
|
|
}
|
|
|
|
override resolveInput(slot: number) {
|
|
// Check if this group node is inside a subgraph (unsupported)
|
|
if (this.id.split(':').length > 2) {
|
|
throw new Error(
|
|
'Group nodes inside subgraphs are not supported. Please convert the group node to a subgraph instead.'
|
|
)
|
|
}
|
|
|
|
const inputNode = this.node.getInputNode(slot)
|
|
if (!inputNode) return
|
|
|
|
const link = this.node.getInputLink(slot)
|
|
if (!link) throw new Error('Failed to get input link')
|
|
|
|
const inputNodeId = String(inputNode.id)
|
|
|
|
// Try to find the node using the full ID first (for nodes outside the group)
|
|
let inputNodeDto = this.nodesByExecutionId?.get(inputNodeId)
|
|
|
|
// If not found, try with just the last part of the ID (for nodes inside the group)
|
|
if (!inputNodeDto) {
|
|
const id = inputNodeId.split(':').at(-1)
|
|
if (id !== undefined) {
|
|
inputNodeDto = this.nodesByExecutionId?.get(id)
|
|
}
|
|
}
|
|
|
|
if (!inputNodeDto) {
|
|
throw new Error(
|
|
`Failed to get input node ${inputNodeId} for group node child ${this.id} with slot ${slot}`
|
|
)
|
|
}
|
|
|
|
return {
|
|
node: inputNodeDto,
|
|
origin_id: inputNodeId,
|
|
origin_slot: link.origin_slot
|
|
}
|
|
}
|
|
}
|