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
This commit is contained in:
bymyself
2026-01-31 20:58:32 -08:00
parent 4d11359bea
commit dca7c218a8
5 changed files with 16 additions and 16 deletions

View File

@@ -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)
})
})

View File

@@ -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()
})
})

View File

@@ -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()
})

View File

@@ -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()

View File

@@ -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()