From dca7c218a8484054e01614f4a199932c2965a4fa Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 31 Jan 2026 20:58:32 -0800 Subject: [PATCH] fix: use VAE Decode instead of CLIP Text Encode to avoid strict mode The default workflow has 2 CLIP Text Encode nodes, causing strict mode violations. VAE Decode only appears once. Amp-Thread-ID: https://ampcode.com/threads/T-019c177d-06bf-779a-9c72-51a3626e4659 --- .../tests/propertiesPanel/propertiesPanel.spec.ts | 8 ++++---- .../tests/propertiesPanel/propertiesPanelBasic.spec.ts | 8 ++++---- .../tests/propertiesPanel/propertiesPanelSearch.spec.ts | 6 +++--- .../tests/propertiesPanel/propertiesPanelTabs.spec.ts | 8 ++++---- .../propertiesPanel/propertiesPanelTitleEdit.spec.ts | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/browser_tests/tests/propertiesPanel/propertiesPanel.spec.ts b/browser_tests/tests/propertiesPanel/propertiesPanel.spec.ts index ff452b54a..39e645f58 100644 --- a/browser_tests/tests/propertiesPanel/propertiesPanel.spec.ts +++ b/browser_tests/tests/propertiesPanel/propertiesPanel.spec.ts @@ -10,24 +10,24 @@ test.describe('Properties panel', () => { await expect(propertiesPanel.panelTitle).toContainText('Workflow Overview') - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) await expect(propertiesPanel.panelTitle).toContainText('3 items selected') await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1) await expect( - propertiesPanel.root.getByText('CLIP Text Encode (Prompt)') + propertiesPanel.root.getByText('VAE Decode') ).toHaveCount(2) await propertiesPanel.searchBox.fill('seed') await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1) await expect( - propertiesPanel.root.getByText('CLIP Text Encode (Prompt)') + propertiesPanel.root.getByText('VAE Decode') ).toHaveCount(0) await propertiesPanel.searchBox.fill('') await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1) await expect( - propertiesPanel.root.getByText('CLIP Text Encode (Prompt)') + propertiesPanel.root.getByText('VAE Decode') ).toHaveCount(2) }) }) diff --git a/browser_tests/tests/propertiesPanel/propertiesPanelBasic.spec.ts b/browser_tests/tests/propertiesPanel/propertiesPanelBasic.spec.ts index 75a4db419..6b1390cc1 100644 --- a/browser_tests/tests/propertiesPanel/propertiesPanelBasic.spec.ts +++ b/browser_tests/tests/propertiesPanel/propertiesPanelBasic.spec.ts @@ -120,7 +120,7 @@ test.describe('Properties panel basic functionality', { tag: ['@ui'] }, () => { }) => { const { propertiesPanel } = comfyPage - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) await expect(propertiesPanel.panelTitle).toContainText('items selected') }) @@ -130,7 +130,7 @@ test.describe('Properties panel basic functionality', { tag: ['@ui'] }, () => { }) => { const { propertiesPanel } = comfyPage - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) await expect(propertiesPanel.getTab('Parameters')).toBeVisible() await expect(propertiesPanel.getTab('Settings')).toBeVisible() @@ -142,11 +142,11 @@ test.describe('Properties panel basic functionality', { tag: ['@ui'] }, () => { }) => { const { propertiesPanel } = comfyPage - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible() await expect( - propertiesPanel.root.getByText('CLIP Text Encode (Prompt)') + propertiesPanel.root.getByText('VAE Decode') ).toBeVisible() }) }) diff --git a/browser_tests/tests/propertiesPanel/propertiesPanelSearch.spec.ts b/browser_tests/tests/propertiesPanel/propertiesPanelSearch.spec.ts index 8e88aa679..bf076d461 100644 --- a/browser_tests/tests/propertiesPanel/propertiesPanelSearch.spec.ts +++ b/browser_tests/tests/propertiesPanel/propertiesPanelSearch.spec.ts @@ -10,7 +10,7 @@ test.describe('Properties panel search functionality', { tag: ['@ui'] }, () => { test.describe('Search with multiple nodes selected', () => { test.beforeEach(async ({ comfyPage }) => { - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) }) test('filters widgets by search query', async ({ comfyPage }) => { @@ -20,7 +20,7 @@ test.describe('Properties panel search functionality', { tag: ['@ui'] }, () => { await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible() await expect( - propertiesPanel.root.getByText('CLIP Text Encode (Prompt)') + propertiesPanel.root.getByText('VAE Decode') ).not.toBeVisible() }) @@ -32,7 +32,7 @@ test.describe('Properties panel search functionality', { tag: ['@ui'] }, () => { await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible() await expect( - propertiesPanel.root.getByText('CLIP Text Encode (Prompt)') + propertiesPanel.root.getByText('VAE Decode') ).toBeVisible() }) diff --git a/browser_tests/tests/propertiesPanel/propertiesPanelTabs.spec.ts b/browser_tests/tests/propertiesPanel/propertiesPanelTabs.spec.ts index b9ca6cb7c..1c810bd10 100644 --- a/browser_tests/tests/propertiesPanel/propertiesPanelTabs.spec.ts +++ b/browser_tests/tests/propertiesPanel/propertiesPanelTabs.spec.ts @@ -67,7 +67,7 @@ test.describe('Properties panel tab navigation', { tag: ['@ui'] }, () => { await expect(propertiesPanel.getTab('Settings')).toBeVisible() await expect(propertiesPanel.getTab('Nodes')).not.toBeVisible() - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) await expect(propertiesPanel.getTab('Parameters')).toBeVisible() await expect(propertiesPanel.getTab('Settings')).toBeVisible() await expect(propertiesPanel.getTab('Info')).not.toBeVisible() @@ -80,7 +80,7 @@ test.describe('Properties panel tab navigation', { tag: ['@ui'] }, () => { await comfyPage.selectNodes(['KSampler']) await expect(propertiesPanel.getTab('Parameters')).toBeVisible() - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) const firstTab = propertiesPanel.tabList.locator('[role="tab"]').first() await expect(firstTab).toBeVisible() }) @@ -95,7 +95,7 @@ test.describe('Properties panel tab navigation', { tag: ['@ui'] }, () => { await comfyPage.selectNodes(['KSampler']) await propertiesPanel.clickTab('Settings') - await comfyPage.selectNodes(['CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['VAE Decode']) await expect(propertiesPanel.getTab('Settings')).toBeVisible() }) @@ -108,7 +108,7 @@ test.describe('Properties panel tab navigation', { tag: ['@ui'] }, () => { await comfyPage.selectNodes(['KSampler']) await propertiesPanel.clickTab('Info') - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) await expect(propertiesPanel.getTab('Info')).not.toBeVisible() const firstTab = propertiesPanel.tabList.locator('[role="tab"]').first() diff --git a/browser_tests/tests/propertiesPanel/propertiesPanelTitleEdit.spec.ts b/browser_tests/tests/propertiesPanel/propertiesPanelTitleEdit.spec.ts index 99268fc47..2943d2e2c 100644 --- a/browser_tests/tests/propertiesPanel/propertiesPanelTitleEdit.spec.ts +++ b/browser_tests/tests/propertiesPanel/propertiesPanelTitleEdit.spec.ts @@ -72,7 +72,7 @@ test.describe('Properties panel title editing', { tag: ['@ui'] }, () => { }) => { const { propertiesPanel } = comfyPage - await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + await comfyPage.selectNodes(['KSampler', 'VAE Decode']) await propertiesPanel.panelTitle.click() await expect(propertiesPanel.nodeTitleInput).not.toBeVisible()