Compare commits

..

22 Commits

Author SHA1 Message Date
GitHub Action
24a3b28fb9 [automated] Apply ESLint and Oxfmt fixes 2026-02-06 02:36:54 +00:00
bymyself
6ac72fafcc fix: use current graph state for node replacement to preserve prior replacements
Amp-Thread-ID: https://ampcode.com/threads/T-019c3047-baa8-757f-b271-4be924f4cde3
2026-02-05 18:34:25 -08:00
bymyself
f50afee6c4 test: add browser test for node replacement UI
Amp-Thread-ID: https://ampcode.com/threads/T-019c3047-baa8-757f-b271-4be924f4cde3
2026-02-05 18:12:46 -08:00
Jin Yi
3b3430e2d8 Merge branch 'feature/node-replacement-classify' into feature/node-replacement-ui 2026-02-05 15:16:30 +09:00
Jin Yi
52a46e72c9 Merge branch 'main' into feature/node-replacement-classify 2026-02-05 15:15:47 +09:00
Johnpaul Chiwetelu
3adecc4ded fix: prevent duplicate context menu items by using content-based comparison (#8602)
## Summary
- Switches from reference-based to content-based duplicate detection for
context menu items
- Fixes cases where extensions create duplicate menu items (different
objects with same content)
- Improves removal detection accuracy by comparing content strings
instead of object references

## Details
The previous implementation compared menu items by object reference,
which would miss duplicates when extensions added new objects with the
same content. This change:
- Creates Sets of content strings from menu items for efficient
duplicate detection
- Filters additions by checking if their content already exists
- Provides accurate count of removed items through content comparison

## Test plan
- [x] Unit tests pass (`pnpm test:unit
src/lib/litegraph/src/contextMenuCompat.test.ts`)
- [x] TypeScript compilation succeeds (`pnpm typecheck`)
- [x] Linting passes (`pnpm lint`)
- [x] Pre-commit hooks pass

## Before
<img width="633" height="1316" alt="Screenshot 2026-02-04 045422"
src="https://github.com/user-attachments/assets/972871e2-1fd6-45a4-bb6c-9ce73ce7aed7"
/>


## After
<img width="531" height="854" alt="Screenshot 2026-02-04 045918"
src="https://github.com/user-attachments/assets/977bed37-dfb8-41d7-b659-88c477ff8a02"
/>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved context menu compatibility: more accurate detection of
added/removed menu items and clearer warnings when items are removed.
* **Refactor**
* Updated numeric input formatting to use locale-aware formatting logic,
preserving grouping and precision behavior.
* **Tests**
* Added a test ensuring legacy menu extraction handles items with
undefined content correctly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8602-fix-prevent-duplicate-context-menu-items-by-using-content-based-comparison-2fd6d73d36508197aa74c3409c7425fa)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Terry Jia <terryjia88@gmail.com>
2026-02-04 20:06:58 -08:00
Comfy Org PR Bot
7404756b6d 1.39.7 (#8614)
Patch version increment to 1.39.7

**Base branch:** `main`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8614-1-39-7-2fe6d73d365081449fa7cc9143adf0fa)
by [Unito](https://www.unito.io)

---------

Co-authored-by: christian-byrne <72887196+christian-byrne@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2026-02-04 18:38:15 -08:00
Christian Byrne
7c6e2d2c7a fix: disable CodeRabbit high_level_summary to stop PR description auto-updates (#8615)
## Summary

Disables the `high_level_summary` feature in CodeRabbit's configuration.
This feature automatically modifies the PR description every time a
commit is pushed, which was causing frustration for developers.

## Changes

- Set `high_level_summary: false` in `.coderabbit.yaml`

## Context

Discussed in #frontend-code-reviews Slack channel. The team agreed that
having PR descriptions automatically modified with every commit push is
not desirable behavior.

---

Fixes
https://www.notion.so/comfy-org/Ops-Disable-high_level_summary-in-ComfyUI_frontend-coderabbit-yaml-2fd6d73d3650812b9eb8d6680fa11932

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8615-fix-disable-CodeRabbit-high_level_summary-to-stop-PR-description-auto-updates-2fe6d73d36508112ac16f5df51845fcd)
by [Unito](https://www.unito.io)
2026-02-04 18:37:44 -08:00
pythongosssss
6feb2022a4 Add support for search aliases on subgraphs (#8608)
## Summary

- add commands for setting search aliases and description when in
subgraph
- in future we can add these fields to the dialog when publishing a
subgraph
- map workflow extra metadata on save/load from from/to subgraph node to
allow access via `canvas.subgraph.extra`

## Changes

**What**: 
- new core commands for Comfy.Subgraph.SetSearchAliases &
Comfy.Subgraph.SetDescription to be called when in a subgraph context
- update Publish command to allow command metadata arg for name
- update test executeCommand to allow passing metadata arg

## Review Focus

- When saving a subgraph, the outer workflow "wrapper" is created at the
point of publishing. So unlike a normal workflow `extra` property that
is available at any point, for a subgraph this is not accessible.
To workaround this, the `extra` property that exists on the inner
subgraph node is copied to the top level on save, and restored on load
so extra properties can be set via `canvas.subgraph.extra`.
- I have kept the existing naming format matching `BlueprintDescription`
for `BlueprintSearchAliases` but i'm not sure if the description was
ever used before

## Screenshots


https://github.com/user-attachments/assets/4d4df9c1-2281-4589-aa56-ab07cdecd353

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8608-Add-support-for-search-aliases-on-subgraphs-2fd6d73d365081d083caebd6befcacdd)
by [Unito](https://www.unito.io)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Set subgraph search aliases (comma-separated) and descriptions;
aliases enable discovery by alternative names.
  * Publish subgraphs using a provided name.
* Node definitions now support search aliases so nodes can be found by
alternate names.
  * UI strings added for entering descriptions and search aliases.

* **Tests**
* Added end-to-end and unit tests covering aliases, descriptions, search
behavior, publishing, and persistence.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-04 12:52:30 -08:00
Alexander Brown
b8287f6c2f Update manifest.json to remove color properties (#8612)
Removed background and theme colors from manifest.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Removed custom color theme settings from the app's configuration. The
app's display mode and all other properties remain unchanged.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-04 12:25:28 -08:00
Luke Mino-Altherr
036675bb49 fix: Safari compatibility issues in Secrets panel dialog (#8610)
## Summary
Fixes multiple Safari-specific issues in the Secrets panel dialog:

1. **Dropdown not opening** - Safari has issues with click events on
portaled content inside dialogs. Added `disablePortal` prop to
`SelectContent` to render content inline.
2. **Close button focused on open** - Added `autofocus` to
`SelectTrigger` so focus goes to the first form field.
3. **Buttons not focusable** - Safari doesn't focus buttons on click by
default. Added `tabindex="0"` to Cancel/Save buttons.

## Changes
- `SelectContent.vue`: Added `disablePortal` prop with explanatory
comment linking to upstream issue
- `SecretFormDialog.vue`: Applied Safari workarounds

## References
- https://github.com/chakra-ui/ark/issues/1782 (Portal issue in Safari)
- https://mayank.co/blog/safari-focus/ (Button focus behavior)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added option to disable portal rendering in select components for
greater control over component behavior.

* **Bug Fixes**
* Improved keyboard accessibility in form dialogs with enhanced focus
management, auto-focus on select triggers, and optimized tab navigation
for action buttons.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Amp <amp@ampcode.com>
2026-02-04 19:58:40 +00:00
Jin Yi
513dd0e426 feature: replace nodes 2026-02-04 14:30:26 +09:00
Jin Yi
1fc34dfd6a feature: isEnabled flag added & hardcoding deleted 2026-02-04 13:13:18 +09:00
Jin Yi
24612b2082 Merge branch 'main' into feature/node-replacement-classify 2026-02-04 12:07:35 +09:00
Terry Jia
507500a9d7 fix: use Intl.NumberFormat instead of vue-i18n n() for number formatting (#8600)
## Summary

vue-i18n's n() function does not support passing
Intl.NumberFormatOptions directly as the second argument. When widgets
without precision defined (e.g., KJNodes' CreateShapeImageOnPath) were
rendered, the n() function threw a SyntaxError in parseNumberArgs.

Replace n() with native Intl.NumberFormat which properly supports
NumberFormatOptions while still using the i18n locale for localization.

## Screenshots (if applicable)
before

https://github.com/user-attachments/assets/eb48379b-fe45-4f1c-a674-b92130f0fcac

after

https://github.com/user-attachments/assets/1abcd2da-ad8b-4432-831a-2a7e91f375a5



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Refactor**
* Enhanced number input widgets with improved locale-aware number
formatting, ensuring proper decimal and group separator display based on
user locale settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8600-fix-use-Intl-NumberFormat-instead-of-vue-i18n-n-for-number-formatting-2fd6d73d365081b78509e87d516c6067)
by [Unito](https://www.unito.io)
2026-02-03 20:57:49 -05:00
Jin Yi
7a7a1a5e70 feat: classify missing nodes by replacement availability 2026-01-30 15:59:23 +09:00
Jin Yi
4c2f2a910f chore: addressed code review 2026-01-30 14:33:40 +09:00
Jin Yi
31177bc036 Merge branch 'main' into feature/node-deprecated-store 2026-01-30 14:20:59 +09:00
Jin Yi
8390838ed2 chore: service folder deleted 2026-01-29 17:10:23 +09:00
Jin Yi
ee0c0e9996 Merge branch 'main' into feature/node-deprecated-store 2026-01-29 17:08:02 +09:00
Jin Yi
4b57a12ca5 fix: applied based on code review 2026-01-29 17:00:17 +09:00
Jin Yi
07c8b822bc feature: node deprecated store + service 2026-01-28 15:46:30 +09:00
57 changed files with 1363 additions and 272 deletions

View File

@@ -2,5 +2,6 @@ issue_enrichment:
auto_enrich:
enabled: true
reviews:
high_level_summary: false
auto_review:
drafts: true

View File

@@ -0,0 +1,59 @@
{
"last_node_id": 3,
"last_link_id": 1,
"nodes": [
{
"id": 1,
"type": "T2IAdapterLoader",
"pos": [100, 100],
"size": { "0": 300, "1": 58 },
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": null
}
],
"properties": { "Node name for S&R": "T2IAdapterLoader" },
"widgets_values": ["t2iadapter_model.safetensors"]
},
{
"id": 2,
"type": "ImageBatch",
"pos": [100, 200],
"size": { "0": 210, "1": 46 },
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{ "name": "image1", "type": "IMAGE", "link": null },
{ "name": "image2", "type": "IMAGE", "link": null }
],
"outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [1] }],
"properties": { "Node name for S&R": "ImageBatch" }
},
{
"id": 3,
"type": "UNKNOWN_NO_REPLACEMENT",
"pos": [100, 300],
"size": { "0": 210, "1": 46 },
"flags": {},
"order": 2,
"mode": 0,
"inputs": [{ "name": "image", "type": "IMAGE", "link": 1 }],
"outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": null }],
"properties": { "Node name for S&R": "UNKNOWN_NO_REPLACEMENT" }
}
],
"links": [[1, 2, 0, 3, 0, "IMAGE"]],
"groups": [],
"config": {},
"extra": {
"ds": { "scale": 1, "offset": [0, 0] }
},
"version": 0.4
}

View File

@@ -80,4 +80,11 @@ export class ComfyNodeSearchBox {
async removeFilter(index: number) {
await this.filterChips.nth(index).locator('.p-chip-remove-icon').click()
}
/**
* Returns a locator for a search result containing the specified text.
*/
findResult(text: string): Locator {
return this.dropdown.locator('li').filter({ hasText: text })
}
}

View File

@@ -5,10 +5,18 @@ import type { KeyCombo } from '../../../src/platform/keybindings/types'
export class CommandHelper {
constructor(private readonly page: Page) {}
async executeCommand(commandId: string): Promise<void> {
await this.page.evaluate((id: string) => {
return window.app!.extensionManager.command.execute(id)
}, commandId)
async executeCommand(
commandId: string,
metadata?: Record<string, unknown>
): Promise<void> {
await this.page.evaluate(
({ commandId, metadata }) => {
return window['app'].extensionManager.command.execute(commandId, {
metadata
})
},
{ commandId, metadata }
)
}
async registerCommand(

View File

@@ -34,6 +34,33 @@ test.describe('Load workflow warning', { tag: '@ui' }, () => {
expect(warningText).toContain('MISSING_NODE_TYPE_IN_SUBGRAPH')
expect(warningText).toContain('in subgraph')
})
test('Should show replacement UI for replaceable missing nodes', async ({
comfyPage
}) => {
await comfyPage.settings.setSetting('Comfy.NodeReplacement.Enabled', true)
await comfyPage.workflow.loadWorkflow('missing/replaceable_nodes')
const missingNodesWarning = comfyPage.page.locator('.comfy-missing-nodes')
await expect(missingNodesWarning).toBeVisible()
// Verify "Replaceable" badges appear for nodes with replacements
const replaceableBadges = missingNodesWarning.getByText('Replaceable')
await expect(replaceableBadges.first()).toBeVisible()
expect(await replaceableBadges.count()).toBeGreaterThanOrEqual(2)
// Verify individual "Replace" buttons appear
const replaceButtons = missingNodesWarning.getByRole('button', {
name: 'Replace'
})
expect(await replaceButtons.count()).toBeGreaterThanOrEqual(2)
// Verify "Replace All" button appears in footer
const replaceAllButton = comfyPage.page.getByRole('button', {
name: 'Replace All'
})
await expect(replaceAllButton).toBeVisible()
})
})
test('Does not report warning on undo/redo', async ({ comfyPage }) => {

View File

@@ -0,0 +1,109 @@
import { expect } from '@playwright/test'
import type { ComfyPage } from '../fixtures/ComfyPage'
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
async function createSubgraphAndNavigateInto(comfyPage: ComfyPage) {
await comfyPage.workflow.loadWorkflow('default')
await comfyPage.nextFrame()
const ksampler = await comfyPage.nodeOps.getNodeRefById('3')
await ksampler.click('title')
await ksampler.convertToSubgraph()
await comfyPage.nextFrame()
const subgraphNodes =
await comfyPage.nodeOps.getNodeRefsByTitle('New Subgraph')
expect(subgraphNodes.length).toBe(1)
const subgraphNode = subgraphNodes[0]
await subgraphNode.navigateIntoSubgraph()
return subgraphNode
}
async function exitSubgraphAndPublish(
comfyPage: ComfyPage,
subgraphNode: Awaited<ReturnType<typeof createSubgraphAndNavigateInto>>,
blueprintName: string
) {
await comfyPage.page.keyboard.press('Escape')
await comfyPage.nextFrame()
await subgraphNode.click('title')
await comfyPage.command.executeCommand('Comfy.PublishSubgraph', {
name: blueprintName
})
await expect(comfyPage.visibleToasts).toHaveCount(1, { timeout: 5000 })
await comfyPage.toast.closeToasts(1)
}
async function searchAndExpectResult(
comfyPage: ComfyPage,
searchTerm: string,
expectedResult: string
) {
await comfyPage.command.executeCommand('Workspace.SearchBox.Toggle')
await expect(comfyPage.searchBox.input).toHaveCount(1)
await comfyPage.searchBox.input.fill(searchTerm)
await expect(comfyPage.searchBox.findResult(expectedResult)).toBeVisible({
timeout: 10000
})
}
test.describe('Subgraph Search Aliases', { tag: ['@subgraph'] }, () => {
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
await comfyPage.settings.setSetting('Comfy.NodeSearchBoxImpl', 'default')
})
test('Can set search aliases on subgraph and find via search', async ({
comfyPage
}) => {
const subgraphNode = await createSubgraphAndNavigateInto(comfyPage)
await comfyPage.command.executeCommand('Comfy.Subgraph.SetSearchAliases', {
aliases: 'qwerty,unicorn'
})
const blueprintName = `test-aliases-${Date.now()}`
await exitSubgraphAndPublish(comfyPage, subgraphNode, blueprintName)
await searchAndExpectResult(comfyPage, 'unicorn', blueprintName)
})
test('Can set description on subgraph', async ({ comfyPage }) => {
await createSubgraphAndNavigateInto(comfyPage)
await comfyPage.command.executeCommand('Comfy.Subgraph.SetDescription', {
description: 'This is a test description'
})
// Verify the description was set on the subgraph's extra
const description = await comfyPage.page.evaluate(() => {
const subgraph = window['app']!.canvas.subgraph
return (subgraph?.extra as Record<string, unknown>)?.BlueprintDescription
})
expect(description).toBe('This is a test description')
})
test('Search aliases persist after publish and reload', async ({
comfyPage
}) => {
const subgraphNode = await createSubgraphAndNavigateInto(comfyPage)
await comfyPage.command.executeCommand('Comfy.Subgraph.SetSearchAliases', {
aliases: 'dragon, fire breather'
})
const blueprintName = `test-persist-${Date.now()}`
await exitSubgraphAndPublish(comfyPage, subgraphNode, blueprintName)
// Reload the page to ensure aliases are persisted
await comfyPage.page.reload()
await comfyPage.page.waitForFunction(
() => window['app'] && window['app'].extensionManager
)
await comfyPage.nextFrame()
await searchAndExpectResult(comfyPage, 'dragon', blueprintName)
})
})

View File

@@ -10,7 +10,5 @@
"type": "image/svg+xml"
}
],
"display": "standalone",
"background_color": "#172dd7",
"theme_color": "#f0ff41"
"display": "standalone"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@comfyorg/comfyui-frontend",
"version": "1.39.6",
"version": "1.39.7",
"private": true,
"description": "Official front-end implementation of ComfyUI",
"homepage": "https://comfy.org",

View File

@@ -25,10 +25,25 @@
:key="i"
class="flex min-h-8 items-center justify-between px-4 py-2 bg-secondary-background text-muted-foreground"
>
<span class="text-xs">
{{ node.label }}
</span>
<span v-if="node.hint" class="text-xs">{{ node.hint }}</span>
<div class="flex items-center gap-2">
<StatusBadge
v-if="node.isReplaceable"
:label="$t('nodeReplacement.replaceable')"
severity="default"
/>
<span class="text-xs">{{ node.label }}</span>
<span v-if="node.hint" class="text-xs text-muted-foreground">
{{ node.hint }}
</span>
</div>
<Button
v-if="node.isReplaceable"
variant="secondary"
size="sm"
@click="emit('replace', node.label)"
>
{{ $t('nodeReplacement.replace') }}
</Button>
</div>
</div>
@@ -49,7 +64,9 @@
<script setup lang="ts">
import { computed } from 'vue'
import StatusBadge from '@/components/common/StatusBadge.vue'
import MissingCoreNodesMessage from '@/components/dialog/content/MissingCoreNodesMessage.vue'
import Button from '@/components/ui/button/Button.vue'
import { isCloud } from '@/platform/distribution/types'
import type { MissingNodeType } from '@/types/comfy'
import { useMissingNodes } from '@/workbench/extensions/manager/composables/nodePack/useMissingNodes'
@@ -58,6 +75,10 @@ const props = defineProps<{
missingNodeTypes: MissingNodeType[]
}>()
const emit = defineEmits<{
(e: 'replace', nodeType: string): void
}>()
// Get missing core nodes for OSS mode
const { missingCoreNodes } = useMissingNodes()
@@ -75,10 +96,12 @@ const uniqueNodes = computed(() => {
return {
label: node.type,
hint: node.hint,
action: node.action
action: node.action,
isReplaceable: node.isReplaceable ?? false,
replacement: node.replacement
}
}
return { label: node }
return { label: node, isReplaceable: false }
})
})
</script>

View File

@@ -1,5 +1,5 @@
<template>
<!-- Cloud mode: Learn More + Got It buttons -->
<!-- Cloud mode: Learn More + Replace All + Got It buttons -->
<div
v-if="isCloud"
class="flex w-full items-center justify-between gap-2 py-2 px-4"
@@ -15,16 +15,34 @@
<i class="icon-[lucide--info]"></i>
<span>{{ $t('missingNodes.cloud.learnMore') }}</span>
</Button>
<Button variant="secondary" size="md" @click="handleGotItClick">{{
$t('missingNodes.cloud.gotIt')
}}</Button>
<div class="flex gap-1">
<Button
v-if="hasReplaceableNodes"
variant="primary"
size="md"
@click="emit('replaceAll')"
>
{{ $t('nodeReplacement.replaceAll') }}
</Button>
<Button variant="secondary" size="md" @click="handleGotItClick">{{
$t('missingNodes.cloud.gotIt')
}}</Button>
</div>
</div>
<!-- OSS mode: Open Manager + Install All buttons -->
<!-- OSS mode: Open Manager + Replace All + Install All buttons -->
<div v-else-if="showManagerButtons" class="flex justify-end gap-1 py-2 px-4">
<Button variant="textonly" @click="openManager">{{
$t('g.openManager')
}}</Button>
<Button
v-if="hasReplaceableNodes"
variant="primary"
size="md"
@click="emit('replaceAll')"
>
{{ $t('nodeReplacement.replaceAll') }}
</Button>
<PackInstallButton
v-if="showInstallAllButton"
type="secondary"
@@ -51,12 +69,25 @@ import Button from '@/components/ui/button/Button.vue'
import { isCloud } from '@/platform/distribution/types'
import { useToastStore } from '@/platform/updates/common/toastStore'
import { useDialogStore } from '@/stores/dialogStore'
import type { MissingNodeType } from '@/types/comfy'
import PackInstallButton from '@/workbench/extensions/manager/components/manager/button/PackInstallButton.vue'
import { useMissingNodes } from '@/workbench/extensions/manager/composables/nodePack/useMissingNodes'
import { useManagerState } from '@/workbench/extensions/manager/composables/useManagerState'
import { useComfyManagerStore } from '@/workbench/extensions/manager/stores/comfyManagerStore'
import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes'
const { missingNodeTypes = [] } = defineProps<{
missingNodeTypes?: MissingNodeType[]
}>()
const emit = defineEmits<{
(e: 'replaceAll'): void
}>()
const hasReplaceableNodes = computed(() =>
missingNodeTypes.some((n) => typeof n === 'object' && n.isReplaceable)
)
const dialogStore = useDialogStore()
const { t } = useI18n()

View File

@@ -20,9 +20,18 @@ defineOptions({
const {
position = 'popper',
// Safari has issues with click events on portaled content inside dialogs.
// Set disablePortal to true when using Select inside a Dialog on Safari.
// See: https://github.com/chakra-ui/ark/issues/1782
disablePortal = false,
class: className,
...restProps
} = defineProps<SelectContentProps & { class?: HTMLAttributes['class'] }>()
} = defineProps<
SelectContentProps & {
class?: HTMLAttributes['class']
disablePortal?: boolean
}
>()
const emits = defineEmits<SelectContentEmits>()
const delegatedProps = computed(() => ({
@@ -34,7 +43,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
</script>
<template>
<SelectPortal>
<SelectPortal :disabled="disablePortal">
<SelectContent
v-bind="{ ...forwarded, ...$attrs }"
:class="

View File

@@ -68,8 +68,11 @@ vi.mock('@/platform/workflow/core/services/workflowService', () => ({
useWorkflowService: vi.fn(() => ({}))
}))
const mockDialogService = vi.hoisted(() => ({
prompt: vi.fn()
}))
vi.mock('@/services/dialogService', () => ({
useDialogService: vi.fn(() => ({}))
useDialogService: vi.fn(() => mockDialogService)
}))
vi.mock('@/services/litegraphService', () => ({
@@ -84,14 +87,31 @@ vi.mock('@/stores/toastStore', () => ({
useToastStore: vi.fn(() => ({}))
}))
const mockChangeTracker = vi.hoisted(() => ({
checkState: vi.fn()
}))
const mockWorkflowStore = vi.hoisted(() => ({
activeWorkflow: {
changeTracker: mockChangeTracker
}
}))
vi.mock('@/platform/workflow/management/stores/workflowStore', () => ({
useWorkflowStore: vi.fn(() => ({}))
useWorkflowStore: vi.fn(() => mockWorkflowStore)
}))
vi.mock('@/stores/subgraphStore', () => ({
useSubgraphStore: vi.fn(() => ({}))
}))
vi.mock('@/renderer/core/canvas/canvasStore', () => ({
useCanvasStore: vi.fn(() => ({
getCanvas: () => app.canvas
})),
useTitleEditorStore: vi.fn(() => ({
titleEditorTarget: null
}))
}))
vi.mock('@/stores/workspace/colorPaletteStore', () => ({
useColorPaletteStore: vi.fn(() => ({}))
}))
@@ -155,11 +175,12 @@ describe('useCoreCommands', () => {
findNodeById: vi.fn(),
getNodeById: vi.fn(),
setDirtyCanvas: vi.fn(),
sendActionToCanvas: vi.fn()
sendActionToCanvas: vi.fn(),
extra: {} as Record<string, unknown>
} as Partial<typeof app.canvas.subgraph> as typeof app.canvas.subgraph
}
const mockSubgraph = createMockSubgraph()
const mockSubgraph = createMockSubgraph()!
function createMockSettingStore(
getReturnValue: boolean
@@ -270,4 +291,138 @@ describe('useCoreCommands', () => {
expect(api.dispatchCustomEvent).not.toHaveBeenCalled()
})
})
describe('Subgraph metadata commands', () => {
beforeEach(() => {
mockSubgraph.extra = {}
vi.clearAllMocks()
})
describe('SetDescription command', () => {
it('should do nothing when not in subgraph', async () => {
app.canvas.subgraph = undefined
const commands = useCoreCommands()
const setDescCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetDescription'
)!
await setDescCommand.function()
expect(mockDialogService.prompt).not.toHaveBeenCalled()
})
it('should set description on subgraph.extra', async () => {
app.canvas.subgraph = mockSubgraph
mockDialogService.prompt.mockResolvedValue('Test description')
const commands = useCoreCommands()
const setDescCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetDescription'
)!
await setDescCommand.function()
expect(mockDialogService.prompt).toHaveBeenCalled()
expect(mockSubgraph.extra.BlueprintDescription).toBe('Test description')
expect(mockChangeTracker.checkState).toHaveBeenCalled()
})
it('should not set description when user cancels', async () => {
app.canvas.subgraph = mockSubgraph
mockDialogService.prompt.mockResolvedValue(null)
const commands = useCoreCommands()
const setDescCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetDescription'
)!
await setDescCommand.function()
expect(mockSubgraph.extra.BlueprintDescription).toBeUndefined()
expect(mockChangeTracker.checkState).not.toHaveBeenCalled()
})
})
describe('SetSearchAliases command', () => {
it('should do nothing when not in subgraph', async () => {
app.canvas.subgraph = undefined
const commands = useCoreCommands()
const setAliasesCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetSearchAliases'
)!
await setAliasesCommand.function()
expect(mockDialogService.prompt).not.toHaveBeenCalled()
})
it('should set search aliases on subgraph.extra', async () => {
app.canvas.subgraph = mockSubgraph
mockDialogService.prompt.mockResolvedValue('alias1, alias2, alias3')
const commands = useCoreCommands()
const setAliasesCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetSearchAliases'
)!
await setAliasesCommand.function()
expect(mockDialogService.prompt).toHaveBeenCalled()
expect(mockSubgraph.extra.BlueprintSearchAliases).toEqual([
'alias1',
'alias2',
'alias3'
])
expect(mockChangeTracker.checkState).toHaveBeenCalled()
})
it('should trim whitespace and filter empty strings', async () => {
app.canvas.subgraph = mockSubgraph
mockDialogService.prompt.mockResolvedValue(' alias1 , , alias2 , ')
const commands = useCoreCommands()
const setAliasesCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetSearchAliases'
)!
await setAliasesCommand.function()
expect(mockSubgraph.extra.BlueprintSearchAliases).toEqual([
'alias1',
'alias2'
])
})
it('should set undefined when empty input', async () => {
app.canvas.subgraph = mockSubgraph
mockDialogService.prompt.mockResolvedValue('')
const commands = useCoreCommands()
const setAliasesCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetSearchAliases'
)!
await setAliasesCommand.function()
expect(mockSubgraph.extra.BlueprintSearchAliases).toBeUndefined()
})
it('should not set aliases when user cancels', async () => {
app.canvas.subgraph = mockSubgraph
mockDialogService.prompt.mockResolvedValue(null)
const commands = useCoreCommands()
const setAliasesCommand = commands.find(
(cmd) => cmd.id === 'Comfy.Subgraph.SetSearchAliases'
)!
await setAliasesCommand.function()
expect(mockSubgraph.extra.BlueprintSearchAliases).toBeUndefined()
expect(mockChangeTracker.checkState).not.toHaveBeenCalled()
})
})
})
})

View File

@@ -171,8 +171,9 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-save',
label: 'Publish Subgraph',
menubarLabel: 'Publish',
function: async () => {
await useSubgraphStore().publishSubgraph()
function: async (metadata?: Record<string, unknown>) => {
const name = metadata?.name as string | undefined
await useSubgraphStore().publishSubgraph(name)
}
},
{
@@ -1095,6 +1096,75 @@ export function useCoreCommands(): ComfyCommand[] {
)
}
},
{
id: 'Comfy.Subgraph.SetDescription',
icon: 'pi pi-pencil',
label: 'Set Subgraph Description',
versionAdded: '1.39.7',
function: async (metadata?: Record<string, unknown>) => {
const canvas = canvasStore.getCanvas()
const subgraph = canvas.subgraph
if (!subgraph) return
const extra = (subgraph.extra ??= {}) as Record<string, unknown>
const currentDescription = (extra.BlueprintDescription as string) ?? ''
let description: string | null | undefined
const rawDescription = metadata?.description
if (rawDescription != null) {
description =
typeof rawDescription === 'string'
? rawDescription
: String(rawDescription)
}
description ??= await dialogService.prompt({
title: t('g.description'),
message: t('subgraphStore.enterDescription'),
defaultValue: currentDescription
})
if (description === null) return
extra.BlueprintDescription = description.trim() || undefined
workflowStore.activeWorkflow?.changeTracker?.checkState()
}
},
{
id: 'Comfy.Subgraph.SetSearchAliases',
icon: 'pi pi-search',
label: 'Set Subgraph Search Aliases',
versionAdded: '1.39.7',
function: async (metadata?: Record<string, unknown>) => {
const canvas = canvasStore.getCanvas()
const subgraph = canvas.subgraph
if (!subgraph) return
const parseAliases = (value: unknown): string[] =>
(Array.isArray(value) ? value.map(String) : String(value).split(','))
.map((s) => s.trim())
.filter(Boolean)
const extra = (subgraph.extra ??= {}) as Record<string, unknown>
let aliases: string[]
const rawAliases = metadata?.aliases
if (rawAliases == null) {
const input = await dialogService.prompt({
title: t('subgraphStore.searchAliases'),
message: t('subgraphStore.enterSearchAliases'),
defaultValue: parseAliases(extra.BlueprintSearchAliases ?? '').join(
', '
)
})
if (input === null) return
aliases = parseAliases(input)
} else {
aliases = parseAliases(rawAliases)
}
extra.BlueprintSearchAliases = aliases.length > 0 ? aliases : undefined
workflowStore.activeWorkflow?.changeTracker?.checkState()
}
},
{
id: 'Comfy.Dev.ShowModelSelector',
icon: 'pi pi-box',

View File

@@ -195,6 +195,42 @@ describe('contextMenuCompat', () => {
expect.any(Error)
)
})
it('should handle multiple items with undefined content correctly', () => {
// Setup base method with items that have undefined content
LGraphCanvas.prototype.getCanvasMenuOptions = function () {
return [
{ content: undefined, title: 'Separator 1' },
{ content: undefined, title: 'Separator 2' },
{ content: 'Item 1', callback: () => {} }
]
}
legacyMenuCompat.install(LGraphCanvas.prototype, 'getCanvasMenuOptions')
// Monkey-patch to add an item with undefined content
const original = LGraphCanvas.prototype.getCanvasMenuOptions
LGraphCanvas.prototype.getCanvasMenuOptions =
function (): (IContextMenuValue | null)[] {
const items = original.apply(this)
items.push({ content: undefined, title: 'Separator 3' })
return items
}
// Extract legacy items
const legacyItems = legacyMenuCompat.extractLegacyItems(
'getCanvasMenuOptions',
mockCanvas
)
// Should extract only the newly added item with undefined content
// (not collapse with existing undefined content items)
expect(legacyItems).toHaveLength(1)
expect(legacyItems[0]).toMatchObject({
content: undefined,
title: 'Separator 3'
})
})
})
describe('integration', () => {

View File

@@ -152,19 +152,51 @@ class LegacyMenuCompat {
const patchedItems = methodToCall.apply(context, args) as
| (IContextMenuValue | null)[]
| undefined
if (!patchedItems) return []
if (!patchedItems) {
return []
}
// Use content-based diff to detect additions (not reference-based)
// Create composite keys from multiple properties to handle undefined content
const createItemKey = (item: IContextMenuValue): string => {
const parts = [
item.content ?? '',
item.title ?? '',
item.className ?? '',
item.property ?? '',
item.type ?? ''
]
return parts.join('|')
}
// Use set-based diff to detect additions by reference
const originalSet = new Set<IContextMenuValue | null>(originalItems)
const addedItems = patchedItems.filter((item) => !originalSet.has(item))
const originalKeys = new Set(
originalItems
.filter(
(item): item is IContextMenuValue =>
item !== null && typeof item === 'object' && 'content' in item
)
.map(createItemKey)
)
const addedItems = patchedItems.filter((item) => {
if (item === null) return false
if (typeof item !== 'object' || !('content' in item)) return false
return !originalKeys.has(createItemKey(item))
})
// Warn if items were removed (patched has fewer original items than expected)
const retainedOriginalCount = patchedItems.filter((item) =>
originalSet.has(item)
const patchedKeys = new Set(
patchedItems
.filter(
(item): item is IContextMenuValue =>
item !== null && typeof item === 'object' && 'content' in item
)
.map(createItemKey)
)
const removedCount = [...originalKeys].filter(
(key) => !patchedKeys.has(key)
).length
if (retainedOriginalCount < originalItems.length) {
if (removedCount > 0) {
console.warn(
`[Context Menu Compat] Monkey patch for ${methodName} removed ${originalItems.length - retainedOriginalCount} original menu item(s). ` +
`[Context Menu Compat] Monkey patch for ${methodName} removed ${removedCount} original menu item(s). ` +
`This may cause unexpected behavior.`
)
}

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "إعادة التشغيل"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "فتح عارض ثلاثي الأبعاد (بيتا) للعقدة المحددة"
},
"Comfy_BrowseModelAssets": {
"label": "تجريبي: تصفح أصول النماذج"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "عرض نافذة الإعدادات"
},
"Comfy_Subgraph_SetDescription": {
"label": "تعيين وصف الرسم البياني الفرعي"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "تعيين الأسماء المستعارة للبحث في الرسم البياني الفرعي"
},
"Comfy_ToggleAssetAPI": {
"label": "تجريبي: تمكين AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "تبديل اللوحة السفلية"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "تبديل لوحة الطرفية السفلية"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "تبديل لوحة السجلات السفلية"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "تبديل اللوحة السفلية الأساسية"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "تدوير لليمين في محرر القناع",
"Save": "حفظ",
"Save As": "حفظ باسم",
"Set Subgraph Description": "تعيين وصف المخطط الفرعي",
"Set Subgraph Search Aliases": "تعيين الأسماء المستعارة للبحث في المخطط الفرعي",
"Show Keybindings Dialog": "عرض مربع حوار اختصارات لوحة المفاتيح",
"Show Model Selector (Dev)": "إظهار منتقي النماذج (للمطورين)",
"Show Settings Dialog": "عرض نافذة الإعدادات",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "لا يمكن حذف المخططات المثبتة",
"confirmDelete": "سيؤدي هذا الإجراء إلى إزالة المخطط نهائيًا من مكتبتك",
"confirmDeleteTitle": "حذف المخطط؟",
"enterDescription": "أدخل وصفًا",
"enterSearchAliases": "أدخل الأسماء المستعارة للبحث (مفصولة بفواصل)",
"hidden": "معاملات مخفية / متداخلة",
"hideAll": "إخفاء الكل",
"loadFailure": "فشل تحميل مخططات الرسم البياني الفرعي",
@@ -2434,6 +2438,7 @@
"publishSuccess": "تم الحفظ في مكتبة العقد",
"publishSuccessMessage": "يمكنك العثور على مخطط الرسم البياني الفرعي الخاص بك في مكتبة العقد ضمن \"مخططات الرسم البياني الفرعي\"",
"saveBlueprint": "احفظ المخطط الفرعي في المكتبة",
"searchAliases": "بحث عن الأسماء المستعارة",
"showAll": "إظهار الكل",
"showRecommended": "إظهار العناصر الموصى بها",
"shown": "معروض على العقدة"

View File

@@ -263,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "Show Settings Dialog"
},
"Comfy_Subgraph_SetDescription": {
"label": "Set Subgraph Description"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "Set Subgraph Search Aliases"
},
"Comfy_ToggleAssetAPI": {
"label": "Experimental: Enable AssetAPI"
},

View File

@@ -1030,7 +1030,10 @@
"hidden": "Hidden / nested parameters",
"hideAll": "Hide all",
"showRecommended": "Show recommended widgets",
"cannotDeleteGlobal": "Cannot delete installed blueprints"
"cannotDeleteGlobal": "Cannot delete installed blueprints",
"enterDescription": "Enter a description",
"searchAliases": "Search Aliases",
"enterSearchAliases": "Enter search aliases (comma separated)"
},
"electronFileDownload": {
"inProgress": "In Progress",
@@ -1247,6 +1250,8 @@
"Save": "Save",
"Save As": "Save As",
"Show Settings Dialog": "Show Settings Dialog",
"Set Subgraph Description": "Set Subgraph Description",
"Set Subgraph Search Aliases": "Set Subgraph Search Aliases",
"Experimental: Enable AssetAPI": "Experimental: Enable AssetAPI",
"Canvas Performance": "Canvas Performance",
"Help Center": "Help Center",
@@ -2801,6 +2806,14 @@
"replacementInstruction": "Install these nodes to run this workflow, or replace them with installed alternatives. Missing nodes are highlighted in red on the canvas."
}
},
"nodeReplacement": {
"replaceable": "Replaceable",
"replace": "Replace",
"replaceAll": "Replace All",
"replacedNode": "Replaced node: {nodeType}",
"replacedAllNodes": "Replaced {count} node type(s)",
"replaceFailed": "Failed to replace nodes"
},
"rightSidePanel": {
"togglePanel": "Toggle properties panel",
"noSelection": "Select a node to see its properties and info.",

View File

@@ -6104,6 +6104,10 @@
"5": {
"name": "recording_video",
"tooltip": null
},
"6": {
"name": "model_3d",
"tooltip": null
}
}
},
@@ -12541,11 +12545,11 @@
}
},
"SaveGLB": {
"display_name": "SaveGLB",
"display_name": "Save 3D Model",
"inputs": {
"mesh": {
"name": "mesh",
"tooltip": "Mesh or GLB file to save"
"tooltip": "Mesh or 3D file to save"
},
"filename_prefix": {
"name": "filename_prefix"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "Reiniciar"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "Abrir visor 3D (Beta) para el nodo seleccionado"
},
"Comfy_BrowseModelAssets": {
"label": "Experimental: Explorar recursos de modelos"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "Mostrar Diálogo de Configuraciones"
},
"Comfy_Subgraph_SetDescription": {
"label": "Establecer descripción del subgrafo"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "Establecer alias de búsqueda del subgrafo"
},
"Comfy_ToggleAssetAPI": {
"label": "Experimental: Habilitar AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "Alternar Panel Inferior"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "Alternar Panel Inferior de Terminal"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "Alternar Panel Inferior de Registros"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "Alternar panel inferior esencial"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "Girar a la derecha en el editor de máscaras",
"Save": "Guardar",
"Save As": "Guardar como",
"Set Subgraph Description": "Establecer descripción del subgrafo",
"Set Subgraph Search Aliases": "Establecer alias de búsqueda del subgrafo",
"Show Keybindings Dialog": "Mostrar diálogo de combinaciones de teclas",
"Show Model Selector (Dev)": "Mostrar selector de modelo (Desarrollo)",
"Show Settings Dialog": "Mostrar diálogo de configuración",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "No se pueden eliminar los blueprints instalados",
"confirmDelete": "Esta acción eliminará permanentemente el subgrafo de tu biblioteca",
"confirmDeleteTitle": "¿Eliminar subgrafo?",
"enterDescription": "Introduce una descripción",
"enterSearchAliases": "Introduce alias de búsqueda (separados por comas)",
"hidden": "Parámetros ocultos/anidados",
"hideAll": "Ocultar todo",
"loadFailure": "No se pudieron cargar los subgrafos",
@@ -2434,6 +2438,7 @@
"publishSuccess": "Guardado en la biblioteca de nodos",
"publishSuccessMessage": "Puedes encontrar tu subgrafo en la biblioteca de nodos bajo \"Subgraph Blueprints\"",
"saveBlueprint": "Guardar subgrafo en la biblioteca",
"searchAliases": "Buscar alias",
"showAll": "Mostrar todo",
"showRecommended": "Mostrar widgets recomendados",
"shown": "Mostrado en el nodo"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "راه‌اندازی مجدد"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "باز کردن ۳D Viewer (بتا) برای node انتخاب‌شده"
},
"Comfy_BrowseModelAssets": {
"label": "آزمایشی: مرور Model Assets"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "نمایش پنجره تنظیمات"
},
"Comfy_Subgraph_SetDescription": {
"label": "تنظیم توضیحات زیرگراف"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "تنظیم نام‌های جایگزین جستجوی زیرگراف"
},
"Comfy_ToggleAssetAPI": {
"label": "آزمایشی: فعال‌سازی AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "تغییر پنل پایین"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "تغییر پنل ترمینال پایین"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "تغییر پنل گزارش‌ها پایین"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "تغییر پنل ضروریات پایین"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "چرخش به راست در MaskEditor",
"Save": "ذخیره",
"Save As": "ذخیره به عنوان",
"Set Subgraph Description": "تنظیم توضیح زیرگراف",
"Set Subgraph Search Aliases": "تنظیم نام‌های مستعار جستجوی زیرگراف",
"Show Keybindings Dialog": "نمایش پنجره کلیدهای میانبر",
"Show Model Selector (Dev)": "نمایش انتخاب‌گر مدل (توسعه‌دهنده)",
"Show Settings Dialog": "نمایش پنجره تنظیمات",
@@ -2435,6 +2437,8 @@
"cannotDeleteGlobal": "امکان حذف blueprints نصب‌شده وجود ندارد",
"confirmDelete": "این عمل باعث حذف دائمی بلوپرینت از کتابخانه شما می‌شود",
"confirmDeleteTitle": "حذف بلوپرینت؟",
"enterDescription": "توضیحی وارد کنید",
"enterSearchAliases": "نام‌های مستعار جستجو را وارد کنید (با ویرگول جدا کنید)",
"hidden": "پارامترهای مخفی / تو در تو",
"hideAll": "مخفی‌سازی همه",
"loadFailure": "بارگذاری بلوپرینت‌های زیرگراف ناموفق بود",
@@ -2445,6 +2449,7 @@
"publishSuccess": "در کتابخانه گره‌ها ذخیره شد",
"publishSuccessMessage": "می‌توانید بلوپرینت زیرگراف خود را در کتابخانه گره‌ها در بخش \"بلوپرینت‌های زیرگراف\" پیدا کنید",
"saveBlueprint": "ذخیره زیرگراف در کتابخانه",
"searchAliases": "جستجوی نام‌های مستعار",
"showAll": "نمایش همه",
"showRecommended": "نمایش ویجت‌های پیشنهادی",
"shown": "نمایش روی گره"

View File

@@ -6427,9 +6427,7 @@
"Load3D": {
"display_name": "بارگذاری ۳بعدی و انیمیشن",
"inputs": {
"clear": {
"": "پاک‌سازی"
},
"clear": {},
"height": {
"name": "ارتفاع"
},
@@ -6439,42 +6437,24 @@
"model_file": {
"name": "فایل مدل"
},
"upload 3d model": {
"": "بارگذاری مدل سه‌بعدی"
},
"upload extra resources": {
"": "بارگذاری منابع اضافی"
},
"upload 3d model": {},
"upload extra resources": {},
"width": {
"name": "عرض"
}
},
"outputs": {
"0": {
"name": "تصویر",
"tooltip": null
},
"1": {
"name": "ماسک",
"tooltip": null
},
"2": {
"name": "مسیر مش",
"tooltip": null
},
"3": {
"name": "نرمال",
"tooltip": null
},
"4": {
"name": "اطلاعات دوربین",
"tooltip": null
},
"5": {
"name": "ویدئوی ضبط‌شده",
"outputs": [
null,
null,
null,
null,
null,
null,
{
"name": "مدل_۳بعدی",
"tooltip": null
}
}
]
},
"LoadAudio": {
"display_name": "بارگذاری صوت",

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "Redémarrer"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "Ouvrir le visualiseur 3D (bêta) pour le nœud sélectionné"
},
"Comfy_BrowseModelAssets": {
"label": "Expérimental : Parcourir les ressources de modèles"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "Afficher la boîte de dialogue des paramètres"
},
"Comfy_Subgraph_SetDescription": {
"label": "Définir la description du sous-graphe"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "Définir les alias de recherche du sous-graphe"
},
"Comfy_ToggleAssetAPI": {
"label": "Expérimental : Activer AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "Basculer le panneau inférieur"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "Basculer le panneau inférieur du terminal"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "Basculer le panneau inférieur des journaux"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "Afficher/Masquer le panneau inférieur essentiel"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "Tourner à droite dans l'éditeur de masque",
"Save": "Enregistrer",
"Save As": "Enregistrer sous",
"Set Subgraph Description": "Définir la description du sous-graphe",
"Set Subgraph Search Aliases": "Définir les alias de recherche du sous-graphe",
"Show Keybindings Dialog": "Afficher la boîte de dialogue des raccourcis clavier",
"Show Model Selector (Dev)": "Afficher le sélecteur de modèle (Dev)",
"Show Settings Dialog": "Afficher la boîte de dialogue des paramètres",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "Impossible de supprimer les blueprints installés",
"confirmDelete": "Cette action supprimera définitivement le plan de votre bibliothèque",
"confirmDeleteTitle": "Supprimer le plan ?",
"enterDescription": "Saisissez une description",
"enterSearchAliases": "Saisissez des alias de recherche (séparés par des virgules)",
"hidden": "Paramètres cachés / imbriqués",
"hideAll": "Tout masquer",
"loadFailure": "Échec du chargement des plans de sous-graphes",
@@ -2434,6 +2438,7 @@
"publishSuccess": "Enregistré dans la bibliothèque de nœuds",
"publishSuccessMessage": "Vous pouvez trouver votre plan de sous-graphe dans la bibliothèque de nœuds sous \"Plans de sous-graphes\"",
"saveBlueprint": "Enregistrer le sous-graphe dans la bibliothèque",
"searchAliases": "Rechercher des alias",
"showAll": "Tout afficher",
"showRecommended": "Afficher les widgets recommandés",
"shown": "Affiché sur le nœud"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "再起動"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "選択したードの3Dビューアーベータを開く"
},
"Comfy_BrowseModelAssets": {
"label": "実験的: モデルアセットを参照"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "設定ダイアログを表示"
},
"Comfy_Subgraph_SetDescription": {
"label": "サブグラフの説明を設定"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "サブグラフの検索エイリアスを設定"
},
"Comfy_ToggleAssetAPI": {
"label": "実験的: AssetAPIを有効化"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "パネル下部の切り替え"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "ターミナルパネル下部の切り替え"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "ログパネル下部の切り替え"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "必須な下部パネルを切り替え"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "マスクエディタで右に回転",
"Save": "保存",
"Save As": "名前を付けて保存",
"Set Subgraph Description": "サブグラフの説明を設定",
"Set Subgraph Search Aliases": "サブグラフの検索エイリアスを設定",
"Show Keybindings Dialog": "キーバインドダイアログを表示",
"Show Model Selector (Dev)": "モデルセレクターを表示(開発用)",
"Show Settings Dialog": "設定ダイアログを表示",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "インストール済みのブループリントは削除できません",
"confirmDelete": "この操作により、ライブラリからサブグラフが完全に削除されます",
"confirmDeleteTitle": "サブグラフを削除しますか?",
"enterDescription": "説明を入力してください",
"enterSearchAliases": "検索用エイリアスを入力(カンマ区切り)",
"hidden": "非表示/ネストされたパラメータ",
"hideAll": "すべて非表示",
"loadFailure": "サブグラフの読み込みに失敗しました",
@@ -2434,6 +2438,7 @@
"publishSuccess": "ノードライブラリに保存されました",
"publishSuccessMessage": "サブグラフはノードライブラリの「サブグラフブループリント」で見つけることができます",
"saveBlueprint": "サブグラフをライブラリに保存",
"searchAliases": "エイリアスを検索",
"showAll": "すべて表示",
"showRecommended": "おすすめウィジェットを表示",
"shown": "ノード上で表示"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "재시작"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "선택한 노드에 대해 3D 뷰어(베타) 열기"
},
"Comfy_BrowseModelAssets": {
"label": "실험적: 모델 에셋 탐색"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "설정 대화상자 보기"
},
"Comfy_Subgraph_SetDescription": {
"label": "서브그래프 설명 설정"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "서브그래프 검색 별칭 설정"
},
"Comfy_ToggleAssetAPI": {
"label": "실험적: AssetAPI 활성화"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "하단 패널 토글"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "터미널 하단 패널 토글"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "로그 하단 패널 토글"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "필수 하단 패널 전환"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "마스크 편집기에서 오른쪽으로 회전",
"Save": "저장",
"Save As": "다른 이름으로 저장",
"Set Subgraph Description": "서브그래프 설명 설정",
"Set Subgraph Search Aliases": "서브그래프 검색 별칭 설정",
"Show Keybindings Dialog": "단축키 대화상자 표시",
"Show Model Selector (Dev)": "모델 선택기 표시 (개발자용)",
"Show Settings Dialog": "설정 대화상자 표시",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "설치된 블루프린트는 삭제할 수 없습니다",
"confirmDelete": "이 작업은 라이브러리에서 블루프린트를 영구적으로 제거합니다",
"confirmDeleteTitle": "블루프린트를 삭제하시겠습니까?",
"enterDescription": "설명을 입력하세요",
"enterSearchAliases": "검색 별칭을 입력하세요 (쉼표로 구분)",
"hidden": "숨김 / 중첩 매개변수",
"hideAll": "모두 숨김",
"loadFailure": "서브그래프 블루프린트 로드 실패",
@@ -2434,6 +2438,7 @@
"publishSuccess": "노드 라이브러리에 저장됨",
"publishSuccessMessage": "노드 라이브러리의 \"서브그래프 블루프린트\" 아래에서 서브그래프 블루프린트를 찾을 수 있습니다",
"saveBlueprint": "서브그래프를 라이브러리에 저장",
"searchAliases": "별칭 검색",
"showAll": "모두 표시",
"showRecommended": "권장 위젯 표시",
"shown": "노드에 표시됨"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "Reiniciar"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "Abrir visualizador 3D (Beta) para o nó selecionado"
},
"Comfy_BrowseModelAssets": {
"label": "Experimental: Navegar pelos ativos de modelo"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "Mostrar Diálogo de Configurações"
},
"Comfy_Subgraph_SetDescription": {
"label": "Definir descrição do subgrafo"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "Definir aliases de pesquisa do subgrafo"
},
"Comfy_ToggleAssetAPI": {
"label": "Experimental: Ativar AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "Alternar painel inferior"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "Alternar painel inferior do terminal"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "Alternar painel inferior de logs"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "Alternar painel inferior essencial"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "Girar para a direita no MaskEditor",
"Save": "Salvar",
"Save As": "Salvar como",
"Set Subgraph Description": "Definir Descrição do Subgrafo",
"Set Subgraph Search Aliases": "Definir Apelidos de Busca do Subgrafo",
"Show Keybindings Dialog": "Mostrar diálogo de atalhos",
"Show Model Selector (Dev)": "Mostrar seletor de modelo (Dev)",
"Show Settings Dialog": "Mostrar diálogo de configurações",
@@ -2435,6 +2437,8 @@
"cannotDeleteGlobal": "Não é possível excluir blueprints instalados",
"confirmDelete": "Esta ação removerá permanentemente o blueprint da sua biblioteca",
"confirmDeleteTitle": "Excluir blueprint?",
"enterDescription": "Insira uma descrição",
"enterSearchAliases": "Insira apelidos de busca (separados por vírgula)",
"hidden": "Parâmetros ocultos/aninhados",
"hideAll": "Ocultar tudo",
"loadFailure": "Falha ao carregar blueprints de subgrafo",
@@ -2445,6 +2449,7 @@
"publishSuccess": "Salvo na Biblioteca de Nós",
"publishSuccessMessage": "Você pode encontrar seu blueprint de subgrafo na biblioteca de nós em \"Blueprints de Subgrafo\"",
"saveBlueprint": "Salvar Subgrafo na Biblioteca",
"searchAliases": "Buscar Apelidos",
"showAll": "Mostrar tudo",
"showRecommended": "Mostrar widgets recomendados",
"shown": "Exibido no nó"

View File

@@ -6427,9 +6427,7 @@
"Load3D": {
"display_name": "Carregar 3D & Animação",
"inputs": {
"clear": {
"": "limpar"
},
"clear": {},
"height": {
"name": "altura"
},
@@ -6439,42 +6437,24 @@
"model_file": {
"name": "arquivo_do_modelo"
},
"upload 3d model": {
"": "enviar modelo 3D"
},
"upload extra resources": {
"": "enviar recursos extras"
},
"upload 3d model": {},
"upload extra resources": {},
"width": {
"name": "largura"
}
},
"outputs": {
"0": {
"name": "imagem",
"tooltip": null
},
"1": {
"name": "mask",
"tooltip": null
},
"2": {
"name": "caminho_malha",
"tooltip": null
},
"3": {
"name": "normal",
"tooltip": null
},
"4": {
"name": "info_câmera",
"tooltip": null
},
"5": {
"name": "vídeo_gravado",
"outputs": [
null,
null,
null,
null,
null,
null,
{
"name": "model_3d",
"tooltip": null
}
}
]
},
"LoadAudio": {
"display_name": "Carregar Áudio",

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "Перезапустить"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "Открыть 3D-просмотрщик (бета) для выбранного узла"
},
"Comfy_BrowseModelAssets": {
"label": "Экспериментально: Просмотр ресурсов моделей"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "Показать диалог настроек"
},
"Comfy_Subgraph_SetDescription": {
"label": "Установить описание подграфа"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "Установить поисковые псевдонимы подграфа"
},
"Comfy_ToggleAssetAPI": {
"label": "Экспериментально: Включить AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "Переключить нижнюю панель"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "Переключить нижнюю панель терминала"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "Переключить нижнюю панель логов"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "Показать/скрыть основную нижнюю панель"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "Повернуть вправо в MaskEditor",
"Save": "Сохранить",
"Save As": "Сохранить как",
"Set Subgraph Description": "Установить описание подграфа",
"Set Subgraph Search Aliases": "Установить псевдонимы поиска подграфа",
"Show Keybindings Dialog": "Показать диалог клавиш быстрого доступа",
"Show Model Selector (Dev)": "Показать выбор модели (Dev)",
"Show Settings Dialog": "Показать диалог настроек",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "Невозможно удалить установленные blueprints",
"confirmDelete": "Это действие навсегда удалит подграф из вашей библиотеки",
"confirmDeleteTitle": "Удалить подграф?",
"enterDescription": "Введите описание",
"enterSearchAliases": "Введите псевдонимы для поиска (через запятую)",
"hidden": "Скрытые / вложенные параметры",
"hideAll": "Скрыть всё",
"loadFailure": "Не удалось загрузить схемы подграфов",
@@ -2434,6 +2438,7 @@
"publishSuccess": "Сохранено в библиотеку узлов",
"publishSuccessMessage": "Вы можете найти свой подграф в библиотеке узлов в разделе «Subgraph Blueprints»",
"saveBlueprint": "Сохранить подграф в библиотеку",
"searchAliases": "Поиск по псевдонимам",
"showAll": "Показать всё",
"showRecommended": "Показать рекомендуемые виджеты",
"shown": "Показано на узле"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "Yeniden Başlat"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "Seçili Düğüm için 3D Görüntüleyiciyi (Beta) Aç"
},
"Comfy_BrowseModelAssets": {
"label": "Deneysel: Model Varlıklarını Gözat"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "Ayarlar İletişim Kutusunu Göster"
},
"Comfy_Subgraph_SetDescription": {
"label": "Alt Grafik Açıklamasını Ayarla"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "Alt Grafik Arama Takma Adlarını Ayarla"
},
"Comfy_ToggleAssetAPI": {
"label": "Deneysel: AssetAPI'yi Etkinleştir"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "Alt Paneli Aç/Kapat"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "Terminal Alt Panelini Aç/Kapat"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "Kayıtlar Alt Panelini Aç/Kapat"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "Temel Alt Paneli Aç/Kapat"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "MaskEditor'da sağa döndür",
"Save": "Kaydet",
"Save As": "Farklı Kaydet",
"Set Subgraph Description": "Alt Grafik Açıklamasını Ayarla",
"Set Subgraph Search Aliases": "Alt Grafik Arama Takma Adlarını Ayarla",
"Show Keybindings Dialog": "Tuş Atamaları İletişim Kutusunu Göster",
"Show Model Selector (Dev)": "Model Seçiciyi Göster (Geliştirici)",
"Show Settings Dialog": "Ayarlar İletişim Kutusunu Göster",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "Yüklü şablonlar silinemez",
"confirmDelete": "Bu işlem taslağı kütüphanenizden kalıcı olarak kaldıracaktır",
"confirmDeleteTitle": "Taslak silinsin mi?",
"enterDescription": "Bir açıklama girin",
"enterSearchAliases": "Arama takma adlarını girin (virgülle ayrılmış)",
"hidden": "Gizli / iç içe parametreler",
"hideAll": "Tümünü gizle",
"loadFailure": "Alt grafik taslakları yüklenemedi",
@@ -2434,6 +2438,7 @@
"publishSuccess": "Düğüm Kütüphanesine Kaydedildi",
"publishSuccessMessage": "Alt grafik taslağınızı düğüm kütüphanesinde \"Alt Grafik Taslakları\" altında bulabilirsiniz",
"saveBlueprint": "Alt Grafiği Kütüphaneye Kaydet",
"searchAliases": "Takma Adlarda Ara",
"showAll": "Tümünü göster",
"showRecommended": "Önerilen widget'ları göster",
"shown": "Düğümde gösterilen"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "重新啟動"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "為選取的節點開啟 3D 檢視器Beta"
},
"Comfy_BrowseModelAssets": {
"label": "實驗性:瀏覽模型資源"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "顯示設定對話框"
},
"Comfy_Subgraph_SetDescription": {
"label": "設定子圖描述"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "設定子圖搜尋別名"
},
"Comfy_ToggleAssetAPI": {
"label": "實驗性:啟用 AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "切換下方面板"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "切換終端機底部面板"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "切換日誌底部面板"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "切換基本下方面板"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "在遮罩編輯器中向右旋轉",
"Save": "儲存",
"Save As": "另存新檔",
"Set Subgraph Description": "設定子圖描述",
"Set Subgraph Search Aliases": "設定子圖搜尋別名",
"Show Keybindings Dialog": "顯示快捷鍵對話框",
"Show Model Selector (Dev)": "顯示模型選擇器(開發用)",
"Show Settings Dialog": "顯示設定對話框",
@@ -2424,6 +2426,8 @@
"cannotDeleteGlobal": "無法刪除已安裝的藍圖",
"confirmDelete": "此操作將永久從您的程式庫中移除藍圖",
"confirmDeleteTitle": "刪除藍圖?",
"enterDescription": "輸入描述",
"enterSearchAliases": "輸入搜尋別名(以逗號分隔)",
"hidden": "隱藏 / 巢狀參數",
"hideAll": "全部隱藏",
"loadFailure": "載入子圖藍圖失敗",
@@ -2434,6 +2438,7 @@
"publishSuccess": "已儲存至節點庫",
"publishSuccessMessage": "您可以在節點庫的「子圖藍圖」中找到您的子圖藍圖",
"saveBlueprint": "將子圖儲存到資料庫",
"searchAliases": "搜尋別名",
"showAll": "顯示全部",
"showRecommended": "顯示建議的小工具",
"shown": "在節點上顯示"

View File

@@ -35,9 +35,6 @@
"Comfy-Desktop_Restart": {
"label": "重启"
},
"Comfy_3DViewer_Open3DViewer": {
"label": "为所选节点开启 3D 浏览器Beta 版)"
},
"Comfy_BrowseModelAssets": {
"label": "实验性:浏览模型资源"
},
@@ -266,6 +263,12 @@
"Comfy_ShowSettingsDialog": {
"label": "显示设置对话框"
},
"Comfy_Subgraph_SetDescription": {
"label": "设置子图描述"
},
"Comfy_Subgraph_SetSearchAliases": {
"label": "设置子图搜索别名"
},
"Comfy_ToggleAssetAPI": {
"label": "实验性:启用 AssetAPI"
},
@@ -311,12 +314,6 @@
"Workspace_ToggleBottomPanel": {
"label": "切换底部面板"
},
"Workspace_ToggleBottomPanelTab_command-terminal": {
"label": "切换终端底部面板"
},
"Workspace_ToggleBottomPanelTab_logs-terminal": {
"label": "切换日志底部面板"
},
"Workspace_ToggleBottomPanelTab_shortcuts-essentials": {
"label": "切换基本下方面板"
},

View File

@@ -1686,6 +1686,8 @@
"Rotate Right in MaskEditor": "在蒙版编辑器中向右旋转",
"Save": "保存",
"Save As": "另存为",
"Set Subgraph Description": "设置子图描述",
"Set Subgraph Search Aliases": "设置子图搜索别名",
"Show Keybindings Dialog": "显示快捷键对话框",
"Show Model Selector (Dev)": "显示模型选择器(开发用)",
"Show Settings Dialog": "显示设置对话框",
@@ -2435,6 +2437,8 @@
"cannotDeleteGlobal": "无法删除已安装的蓝图",
"confirmDelete": "此操作将永久从您的库中移除该子工作流",
"confirmDeleteTitle": "删除子工作流?",
"enterDescription": "输入描述",
"enterSearchAliases": "输入搜索别名(用逗号分隔)",
"hidden": "隐藏/嵌套参数",
"hideAll": "全部隐藏",
"loadFailure": "加载子工作流蓝图失败",
@@ -2445,6 +2449,7 @@
"publishSuccess": "已保存到节点库",
"publishSuccessMessage": "您可以在节点库的“子工作流蓝图”下找到您的子工作流蓝图",
"saveBlueprint": "保存子工作流到节点库",
"searchAliases": "搜索别名",
"showAll": "全部显示",
"showRecommended": "显示推荐控件",
"shown": "节点上显示"

View File

@@ -6443,32 +6443,18 @@
"name": "宽度"
}
},
"outputs": {
"0": {
"name": "图像",
"tooltip": null
},
"1": {
"name": "遮罩",
"tooltip": null
},
"2": {
"name": "网格路径",
"tooltip": null
},
"3": {
"name": "法向",
"tooltip": null
},
"4": {
"name": "线条",
"tooltip": null
},
"5": {
"name": "相机信息",
"outputs": [
null,
null,
null,
null,
null,
null,
{
"name": "model_3d",
"tooltip": null
}
}
]
},
"LoadAudio": {
"display_name": "加载音频",

View File

@@ -236,5 +236,15 @@ describe('useNodeReplacementStore', () => {
expect(fetchNodeReplacements).toHaveBeenCalledOnce()
})
it('should not call API when setting is disabled', async () => {
vi.mocked(fetchNodeReplacements).mockResolvedValue(mockReplacements)
store = createStore(false)
await store.load()
expect(fetchNodeReplacements).not.toHaveBeenCalled()
expect(store.isLoaded).toBe(false)
})
})
})

View File

@@ -15,7 +15,7 @@ export const useNodeReplacementStore = defineStore('nodeReplacement', () => {
)
async function load() {
if (isLoaded.value) return
if (!isEnabled.value || isLoaded.value) return
try {
replacements.value = await fetchNodeReplacements()

View File

@@ -0,0 +1,195 @@
import { clone } from 'es-toolkit/compat'
import { t } from '@/i18n'
import { useToastStore } from '@/platform/updates/common/toastStore'
import type { ComfyWorkflowJSON } from '@/platform/workflow/validation/schemas/workflowSchema'
import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore'
import { app } from '@/scripts/app'
import type { MissingNodeType } from '@/types/comfy'
import { useNodeReplacementStore } from './nodeReplacementStore'
/**
* Modify workflow data to replace missing node types with their replacements
* @param graphData The workflow JSON data
* @param replacements Map of old node type to new node type
* @returns Modified workflow data with node types replaced
*/
function applyNodeReplacements(
graphData: ComfyWorkflowJSON,
replacements: Map<string, string>
): ComfyWorkflowJSON {
const modifiedData = clone(graphData)
// Helper function to process nodes array
function processNodes(nodes: ComfyWorkflowJSON['nodes']) {
if (!Array.isArray(nodes)) return
for (const node of nodes) {
const replacement = replacements.get(node.type)
if (replacement) {
node.type = replacement
}
}
}
// Process top-level nodes
processNodes(modifiedData.nodes)
// Process nodes in subgraphs
if (modifiedData.definitions?.subgraphs) {
for (const subgraph of modifiedData.definitions.subgraphs) {
if (subgraph && 'nodes' in subgraph) {
processNodes(subgraph.nodes as ComfyWorkflowJSON['nodes'])
}
}
}
return modifiedData
}
export function useNodeReplacement() {
const nodeReplacementStore = useNodeReplacementStore()
const workflowStore = useWorkflowStore()
const toastStore = useToastStore()
/**
* Build a map of replacements from missing node types
*/
function buildReplacementMap(
missingNodeTypes: MissingNodeType[]
): Map<string, string> {
const replacements = new Map<string, string>()
for (const nodeType of missingNodeTypes) {
if (typeof nodeType === 'object' && nodeType.isReplaceable) {
const replacement = nodeType.replacement
if (replacement) {
replacements.set(nodeType.type, replacement.new_node_id)
}
}
}
return replacements
}
/**
* Replace a single node type with its replacement
* This reloads the entire workflow with the replacement applied
* @param nodeType The type of the missing node to replace
* @returns true if replacement was successful
*/
async function replaceNode(nodeType: string): Promise<boolean> {
const replacement = nodeReplacementStore.getReplacementFor(nodeType)
if (!replacement) {
console.warn(`No replacement found for node type: ${nodeType}`)
return false
}
const activeWorkflow = workflowStore.activeWorkflow
if (!activeWorkflow?.isLoaded) {
console.error('No active workflow or workflow not loaded')
return false
}
try {
// Use current graph state, not originalContent, to preserve prior replacements
const currentData =
app.rootGraph.serialize() as unknown as ComfyWorkflowJSON
// Create replacement map for single node
const replacements = new Map<string, string>()
replacements.set(nodeType, replacement.new_node_id)
// Apply replacements
const modifiedData = applyNodeReplacements(currentData, replacements)
// Reload the workflow with modified data
await app.loadGraphData(modifiedData, true, false, activeWorkflow, {
showMissingNodesDialog: true,
showMissingModelsDialog: true
})
toastStore.add({
severity: 'success',
summary: t('g.success'),
detail: t('nodeReplacement.replacedNode', { nodeType }),
life: 3000
})
return true
} catch (error) {
console.error('Failed to replace node:', error)
toastStore.add({
severity: 'error',
summary: t('g.error'),
detail: t('nodeReplacement.replaceFailed'),
life: 5000
})
return false
}
}
/**
* Replace all replaceable missing nodes
* This reloads the entire workflow with all replacements applied
* @param missingNodeTypes Array of missing node types (from dialog props)
* @returns Number of node types that were replaced
*/
async function replaceAllNodes(
missingNodeTypes: MissingNodeType[]
): Promise<number> {
const replacements = buildReplacementMap(missingNodeTypes)
if (replacements.size === 0) {
console.warn('No replaceable nodes found')
return 0
}
const activeWorkflow = workflowStore.activeWorkflow
if (!activeWorkflow?.isLoaded) {
console.error('No active workflow or workflow not loaded')
return 0
}
try {
// Use current graph state, not originalContent, to preserve any prior changes
const currentData =
app.rootGraph.serialize() as unknown as ComfyWorkflowJSON
// Apply all replacements
const modifiedData = applyNodeReplacements(currentData, replacements)
// Reload the workflow with modified data
await app.loadGraphData(modifiedData, true, false, activeWorkflow, {
showMissingNodesDialog: true,
showMissingModelsDialog: true
})
toastStore.add({
severity: 'success',
summary: t('g.success'),
detail: t('nodeReplacement.replacedAllNodes', {
count: replacements.size
}),
life: 3000
})
return replacements.size
} catch (error) {
console.error('Failed to replace nodes:', error)
toastStore.add({
severity: 'error',
summary: t('g.error'),
detail: t('nodeReplacement.replaceFailed'),
life: 5000
})
return 0
}
}
return {
replaceNode,
replaceAllNodes
}
}

View File

@@ -13,10 +13,10 @@
{{ $t('secrets.provider') }}
</label>
<Select v-model="form.provider" :disabled="mode === 'edit'">
<SelectTrigger id="secret-provider" class="w-full">
<SelectTrigger id="secret-provider" class="w-full" autofocus>
<SelectValue :placeholder="$t('g.none')" />
</SelectTrigger>
<SelectContent>
<SelectContent disable-portal>
<SelectItem
v-for="option in providerOptions"
:key="option.value || 'none'"
@@ -79,10 +79,15 @@
</span>
<div class="flex justify-end gap-2 pt-2">
<Button variant="secondary" type="button" @click="visible = false">
<Button
variant="secondary"
type="button"
tabindex="0"
@click="visible = false"
>
{{ $t('g.cancel') }}
</Button>
<Button type="submit" :loading="loading">
<Button type="submit" tabindex="0" :loading="loading">
{{ $t('g.save') }}
</Button>
</div>

View File

@@ -275,7 +275,9 @@ const zExtra = z
frontendVersion: z.string().optional(),
linkExtensions: z.array(zComfyLinkExtension).optional(),
reroutes: z.array(zReroute).optional(),
workflowRendererVersion: zRendererType.optional()
workflowRendererVersion: zRendererType.optional(),
BlueprintDescription: z.string().optional(),
BlueprintSearchAliases: z.array(z.string()).optional()
})
.passthrough()
@@ -395,6 +397,10 @@ interface SubgraphDefinitionBase<
revision: number
name: string
category?: string
/** Custom metadata for the subgraph (description, searchAliases, etc.) */
extra?: T extends ComfyWorkflow1BaseInput
? z.input<typeof zExtra> | null
: z.output<typeof zExtra> | null
inputNode: T extends ComfyWorkflow1BaseInput
? z.input<typeof zExportedSubgraphIONode>

View File

@@ -15,7 +15,7 @@ import {
import { WidgetInputBaseClass } from './layout'
import WidgetLayoutField from './layout/WidgetLayoutField.vue'
const { n } = useI18n()
const { locale } = useI18n()
const props = defineProps<{
widget: SimplifiedWidget<number>
@@ -30,8 +30,16 @@ onClickOutside(widgetContainer, () => {
}
})
const decimalSeparator = computed(() => n(1.1).replace(/\p{Number}/gu, ''))
const groupSeparator = computed(() => n(11111).replace(/\p{Number}/gu, ''))
function formatNumber(value: number, options?: Intl.NumberFormatOptions) {
return new Intl.NumberFormat(locale.value, options).format(value)
}
const decimalSeparator = computed(() =>
formatNumber(1.1).replace(/\p{Number}/gu, '')
)
const groupSeparator = computed(() =>
formatNumber(11111).replace(/\p{Number}/gu, '')
)
function unformatValue(value: string) {
return value
.replaceAll(groupSeparator.value, '')
@@ -45,11 +53,14 @@ const formattedValue = computed(() => {
if ((unformattedValue as unknown) === '' || !isFinite(unformattedValue))
return `${unformattedValue}`
return n(unformattedValue, {
useGrouping: useGrouping.value,
minimumFractionDigits: precision.value,
maximumFractionDigits: precision.value
})
const options: Intl.NumberFormatOptions = {
useGrouping: useGrouping.value
}
if (precision.value !== undefined) {
options.minimumFractionDigits = precision.value
options.maximumFractionDigits = precision.value
}
return formatNumber(unformattedValue, options)
})
function updateValue(e: UIEvent) {

View File

@@ -234,6 +234,7 @@ export type GlobalSubgraphData = {
info: {
node_pack: string
category?: string
search_aliases?: string[]
}
data: string | Promise<string>
}

View File

@@ -1137,25 +1137,25 @@ export class ComfyApp {
return
}
for (let n of nodes) {
// Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
if (n.type == 'T2IAdapterLoader') n.type = 'ControlNetLoader'
if (n.type == 'ConditioningAverage ') n.type = 'ConditioningAverage' //typo fix
if (n.type == 'SDV_img2vid_Conditioning')
n.type = 'SVD_img2vid_Conditioning' //typo fix
if (n.type == 'Load3DAnimation') n.type = 'Load3D' // Animation node merged into Load3D
if (n.type == 'Preview3DAnimation') n.type = 'Preview3D' // Animation node merged into Load3D
// Find missing node types
if (!(n.type in LiteGraph.registered_node_types)) {
// Include context about subgraph location if applicable
if (path) {
missingNodeTypes.push({
type: n.type,
hint: `in subgraph '${path}'`
})
} else {
missingNodeTypes.push(n.type)
}
const nodeReplacementStore = useNodeReplacementStore()
const replacement = nodeReplacementStore.getReplacementFor(n.type)
// TODO: Remove debug log
console.log('[MissingNode]', n.type, {
isReplaceable: replacement !== null,
replacement,
allReplacements: nodeReplacementStore.replacements
})
missingNodeTypes.push({
type: n.type,
...(path && { hint: `in subgraph '${path}'` }),
isReplaceable: replacement !== null,
replacement: replacement ?? undefined
})
n.type = sanitizeNodeName(n.type)
}

View File

@@ -7,6 +7,7 @@ import PromptDialogContent from '@/components/dialog/content/PromptDialogContent
import { t } from '@/i18n'
import { useTelemetry } from '@/platform/telemetry'
import { isCloud } from '@/platform/distribution/types'
import { useNodeReplacement } from '@/platform/nodeReplacement/useNodeReplacement'
import { useSubscription } from '@/platform/cloud/subscription/composables/useSubscription'
import { useDialogStore } from '@/stores/dialogStore'
import type {
@@ -14,6 +15,7 @@ import type {
ShowDialogOptions
} from '@/stores/dialogStore'
import type { MissingNodeType } from '@/types/comfy'
import type { ConflictDetectionResult } from '@/workbench/extensions/manager/types/conflictDetectionTypes'
import type { ComponentAttrs } from 'vue-component-type-helpers'
@@ -94,6 +96,17 @@ export const useDialogService = () => {
lazyMissingNodesFooter()
])
const { replaceNode, replaceAllNodes } = useNodeReplacement()
const handleReplace = async (nodeType: string) => {
await replaceNode(nodeType)
}
const handleReplaceAll = async () => {
await replaceAllNodes(props.missingNodeTypes as MissingNodeType[])
dialogStore.closeDialog({ key: 'global-missing-nodes' })
}
dialogStore.showDialog({
key: 'global-missing-nodes',
headerComponent: MissingNodesHeader,
@@ -113,7 +126,14 @@ export const useDialogService = () => {
}
}
},
props
props: {
...props,
onReplace: handleReplace
},
footerProps: {
missingNodeTypes: props.missingNodeTypes,
onReplaceAll: handleReplaceAll
}
})
}

View File

@@ -61,6 +61,54 @@ const EXAMPLE_NODE_DEFS: ComfyNodeDefImpl[] = (
return def
})
const NODE_DEFS_WITH_SEARCH_ALIASES: ComfyNodeDefImpl[] = (
[
{
input: { required: {} },
output: ['MODEL'],
output_is_list: [false],
output_name: ['MODEL'],
name: 'CheckpointLoaderSimple',
display_name: 'Load Checkpoint',
description: '',
python_module: 'nodes',
category: 'loaders',
output_node: false,
search_aliases: ['ckpt', 'model loader', 'checkpoint']
},
{
input: { required: {} },
output: ['IMAGE'],
output_is_list: [false],
output_name: ['IMAGE'],
name: 'LoadImage',
display_name: 'Load Image',
description: '',
python_module: 'nodes',
category: 'loaders',
output_node: false,
search_aliases: ['img', 'picture']
},
{
input: { required: {} },
output: ['LATENT'],
output_is_list: [false],
output_name: ['LATENT'],
name: 'VAEEncode',
display_name: 'VAE Encode',
description: '',
python_module: 'nodes',
category: 'latent',
output_node: false
// No search_aliases
}
] as ComfyNodeDef[]
).map((nodeDef: ComfyNodeDef) => {
const def = new ComfyNodeDefImpl(nodeDef)
def['postProcessSearchScores'] = (s) => s
return def
})
describe('nodeSearchService', () => {
it('searches with input filter', () => {
const service = new NodeSearchService(EXAMPLE_NODE_DEFS)
@@ -74,4 +122,52 @@ describe('nodeSearchService', () => {
).toHaveLength(2)
expect(service.searchNode('L')).toHaveLength(2)
})
describe('search_aliases', () => {
it('finds nodes by search_aliases', () => {
const service = new NodeSearchService(NODE_DEFS_WITH_SEARCH_ALIASES)
// Search by alias
const ckptResults = service.searchNode('ckpt')
expect(ckptResults).toHaveLength(1)
expect(ckptResults[0].name).toBe('CheckpointLoaderSimple')
})
it('finds nodes by partial alias match', () => {
const service = new NodeSearchService(NODE_DEFS_WITH_SEARCH_ALIASES)
// Search by partial alias "model" should match "model loader" alias
const modelResults = service.searchNode('model')
expect(modelResults.length).toBeGreaterThanOrEqual(1)
expect(
modelResults.some((r) => r.name === 'CheckpointLoaderSimple')
).toBe(true)
})
it('finds nodes by display_name when no alias matches', () => {
const service = new NodeSearchService(NODE_DEFS_WITH_SEARCH_ALIASES)
// "VAE" should match by display_name since there are no aliases
const vaeResults = service.searchNode('VAE')
expect(vaeResults).toHaveLength(1)
expect(vaeResults[0].name).toBe('VAEEncode')
})
it('finds nodes by both alias and display_name', () => {
const service = new NodeSearchService(NODE_DEFS_WITH_SEARCH_ALIASES)
// "img" should match LoadImage by alias
const imgResults = service.searchNode('img')
expect(imgResults).toHaveLength(1)
expect(imgResults[0].name).toBe('LoadImage')
// "Load" should match both checkpoint and image loaders by display_name
const loadResults = service.searchNode('Load')
expect(loadResults.length).toBeGreaterThanOrEqual(2)
})
it('handles nodes without search_aliases', () => {
const service = new NodeSearchService(NODE_DEFS_WITH_SEARCH_ALIASES)
// Ensure nodes without aliases are still searchable by name/display_name
const encodeResults = service.searchNode('Encode')
expect(encodeResults).toHaveLength(1)
expect(encodeResults[0].name).toBe('VAEEncode')
})
})
})

View File

@@ -77,6 +77,11 @@ export class ComfyNodeDefImpl
* and input connectivity.
*/
readonly price_badge?: PriceBadge
/**
* Alternative names for search. Useful for synonyms, abbreviations,
* or old names after renaming a node.
*/
readonly search_aliases?: string[]
// V2 fields
readonly inputs: Record<string, InputSpecV2>

View File

@@ -167,4 +167,142 @@ describe('useSubgraphStore', () => {
await mockFetch({ 'test.json': mockGraph })
expect(store.isGlobalBlueprint('nonexistent')).toBe(false)
})
describe('search_aliases support', () => {
it('should include search_aliases from workflow extra', async () => {
const mockGraphWithAliases = {
nodes: [{ type: '123' }],
definitions: {
subgraphs: [{ id: '123' }]
},
extra: {
BlueprintSearchAliases: ['alias1', 'alias2', 'my workflow']
}
}
await mockFetch({ 'test-with-aliases.json': mockGraphWithAliases })
const nodeDef = useNodeDefStore().nodeDefs.find(
(d) => d.name === 'SubgraphBlueprint.test-with-aliases'
)
expect(nodeDef).toBeDefined()
expect(nodeDef?.search_aliases).toEqual([
'alias1',
'alias2',
'my workflow'
])
})
it('should include search_aliases from global blueprint info', async () => {
await mockFetch(
{},
{
global_with_aliases: {
name: 'Global With Aliases',
info: {
node_pack: 'comfy_essentials',
search_aliases: ['global alias', 'test alias']
},
data: JSON.stringify(mockGraph)
}
}
)
const nodeDef = useNodeDefStore().nodeDefs.find(
(d) => d.name === 'SubgraphBlueprint.global_with_aliases'
)
expect(nodeDef).toBeDefined()
expect(nodeDef?.search_aliases).toEqual(['global alias', 'test alias'])
})
it('should not have search_aliases if not provided', async () => {
await mockFetch({ 'test.json': mockGraph })
const nodeDef = useNodeDefStore().nodeDefs.find(
(d) => d.name === 'SubgraphBlueprint.test'
)
expect(nodeDef).toBeDefined()
expect(nodeDef?.search_aliases).toBeUndefined()
})
it('should include description from workflow extra', async () => {
const mockGraphWithDescription = {
nodes: [{ type: '123' }],
definitions: {
subgraphs: [{ id: '123' }]
},
extra: {
BlueprintDescription: 'This is a test blueprint'
}
}
await mockFetch({
'test-with-description.json': mockGraphWithDescription
})
const nodeDef = useNodeDefStore().nodeDefs.find(
(d) => d.name === 'SubgraphBlueprint.test-with-description'
)
expect(nodeDef).toBeDefined()
expect(nodeDef?.description).toBe('This is a test blueprint')
})
it('should not duplicate metadata in both workflow extra and subgraph extra when publishing', async () => {
const subgraph = createTestSubgraph()
const subgraphNode = createTestSubgraphNode(subgraph)
const graph = subgraphNode.graph!
graph.add(subgraphNode)
// Set metadata on the subgraph's extra (as the commands do)
subgraph.extra = {
BlueprintDescription: 'Test description',
BlueprintSearchAliases: ['alias1', 'alias2']
}
vi.mocked(comfyApp.canvas).selectedItems = new Set([subgraphNode])
vi.mocked(comfyApp.canvas)._serializeItems = vi.fn(() => {
const serializedSubgraph = {
...subgraph.serialize(),
links: [],
groups: [],
version: 1
} as Partial<ExportedSubgraph> as ExportedSubgraph
return {
nodes: [subgraphNode.serialize()],
subgraphs: [serializedSubgraph]
}
})
let savedWorkflowData: Record<string, unknown> | null = null
vi.mocked(api.storeUserData).mockImplementation(async (_path, data) => {
savedWorkflowData = JSON.parse(data as string)
return {
status: 200,
json: () =>
Promise.resolve({
path: 'subgraphs/testname.json',
modified: Date.now(),
size: 2
})
} as Response
})
await mockFetch({ 'testname.json': mockGraph })
await store.publishSubgraph()
expect(savedWorkflowData).not.toBeNull()
// Metadata should be in top-level extra
expect(savedWorkflowData!.extra).toEqual({
BlueprintDescription: 'Test description',
BlueprintSearchAliases: ['alias1', 'alias2']
})
// Metadata should NOT be in subgraph's extra
const definitions = savedWorkflowData!.definitions as {
subgraphs: Array<{ extra?: Record<string, unknown> }>
}
const subgraphExtra = definitions.subgraphs[0]?.extra
expect(subgraphExtra?.BlueprintDescription).toBeUndefined()
expect(subgraphExtra?.BlueprintSearchAliases).toBeUndefined()
})
})
})

View File

@@ -95,18 +95,46 @@ export const useSubgraphStore = defineStore('subgraph', () => {
if (!(await confirmOverwrite(this.filename))) return this
this.hasPromptedSave = true
}
// Extract metadata from subgraph.extra to workflow.extra before saving
this.extractMetadataToWorkflowExtra()
const ret = await super.save()
registerNodeDef(await this.load(), {
// Force reload to update initialState with saved metadata
registerNodeDef(await this.load({ force: true }), {
category: 'Subgraph Blueprints/User'
})
return ret
}
/**
* Moves all properties (except workflowRendererVersion) from subgraph.extra
* to workflow.extra, then removes from subgraph.extra to avoid duplication.
*/
private extractMetadataToWorkflowExtra(): void {
if (!this.activeState) return
const subgraph = this.activeState.definitions?.subgraphs?.[0]
if (!subgraph?.extra) return
const sgExtra = subgraph.extra as Record<string, unknown>
const workflowExtra = (this.activeState.extra ??= {}) as Record<
string,
unknown
>
for (const key of Object.keys(sgExtra)) {
if (key === 'workflowRendererVersion') continue
workflowExtra[key] = sgExtra[key]
delete sgExtra[key]
}
}
override async saveAs(path: string) {
this.validateSubgraph()
this.hasPromptedSave = true
// Extract metadata from subgraph.extra to workflow.extra before saving
this.extractMetadataToWorkflowExtra()
const ret = await super.saveAs(path)
registerNodeDef(await this.load(), {
// Force reload to update initialState with saved metadata
registerNodeDef(await this.load({ force: true }), {
category: 'Subgraph Blueprints/User'
})
return ret
@@ -125,6 +153,17 @@ export const useSubgraphStore = defineStore('subgraph', () => {
'Loaded subgraph blueprint does not contain valid subgraph'
)
sg.name = st.nodes[0].title = this.filename
// Copy blueprint metadata from workflow extra to subgraph extra
// so it's available when editing via canvas.subgraph.extra
if (st.extra) {
const sgExtra = (sg.extra ??= {}) as Record<string, unknown>
for (const [key, value] of Object.entries(st.extra)) {
if (key === 'workflowRendererVersion') continue
sgExtra[key] = value
}
}
return loaded
}
override async promptSave(): Promise<string | null> {
@@ -177,7 +216,8 @@ export const useSubgraphStore = defineStore('subgraph', () => {
{
python_module: v.info.node_pack,
display_name: v.name,
category
category,
search_aliases: v.info.search_aliases
},
k
)
@@ -223,9 +263,10 @@ export const useSubgraphStore = defineStore('subgraph', () => {
[`${i.type}`, undefined] satisfies InputSpec
])
)
let description = 'User generated subgraph blueprint'
if (workflow.initialState.extra?.BlueprintDescription)
description = `${workflow.initialState.extra.BlueprintDescription}`
const workflowExtra = workflow.initialState.extra
const description =
workflowExtra?.BlueprintDescription ?? 'User generated subgraph blueprint'
const search_aliases = workflowExtra?.BlueprintSearchAliases
const nodedefv1: ComfyNodeDefV1 = {
input: { required: inputs },
output: subgraphNode.outputs.map((o) => `${o.type}`),
@@ -236,13 +277,14 @@ export const useSubgraphStore = defineStore('subgraph', () => {
category: 'Subgraph Blueprints',
output_node: false,
python_module: 'blueprint',
search_aliases,
...overrides
}
const nodeDefImpl = new ComfyNodeDefImpl(nodedefv1)
subgraphDefCache.value.set(name, nodeDefImpl)
subgraphCache[name] = workflow
}
async function publishSubgraph() {
async function publishSubgraph(providedName?: string) {
const canvas = canvasStore.getCanvas()
const subgraphNode = [...canvas.selectedItems][0]
if (
@@ -257,22 +299,25 @@ export const useSubgraphStore = defineStore('subgraph', () => {
if (nodes.length != 1) {
throw new TypeError('Must have single SubgraphNode selected to publish')
}
//create minimal workflow
const workflowData = {
revision: 0,
last_node_id: subgraphNode.id,
last_link_id: 0,
nodes,
links: [],
links: [] as never[],
version: 0.4,
definitions: { subgraphs }
}
//prompt name
const name = await useDialogService().prompt({
title: t('subgraphStore.saveBlueprint'),
message: t('subgraphStore.blueprintNamePrompt'),
defaultValue: subgraphNode.title
})
const name =
providedName ??
(await useDialogService().prompt({
title: t('subgraphStore.saveBlueprint'),
message: t('subgraphStore.blueprintNamePrompt'),
defaultValue: subgraphNode.title
}))
if (!name) return
if (subgraphDefCache.value.has(name) && !(await confirmOverwrite(name)))
//User has chosen not to overwrite.

View File

@@ -3,6 +3,7 @@ import type {
Positionable
} from '@/lib/litegraph/src/interfaces'
import type { LGraphCanvas, LGraphNode } from '@/lib/litegraph/src/litegraph'
import type { NodeReplacement } from '@/platform/nodeReplacement/types'
import type { SettingParams } from '@/platform/settings/types'
import type { ComfyWorkflowJSON } from '@/platform/workflow/validation/schemas/workflowSchema'
import type { Keybinding } from '@/platform/keybindings/types'
@@ -93,6 +94,8 @@ export type MissingNodeType =
text: string
callback: () => void
}
isReplaceable?: boolean
replacement?: NodeReplacement
}
export interface ComfyExtension {