mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Fix loading large workflow embedded in webp (#777)
* Fix loading large workflow embedded in webp * Update test expectations [skip ci] * nit --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
BIN
browser_tests/assets/large_workflow.webp
Normal file
BIN
browser_tests/assets/large_workflow.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 316 KiB |
@@ -2,12 +2,15 @@ import { expect } from '@playwright/test'
|
|||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './ComfyPage'
|
||||||
|
|
||||||
test.describe('Load Workflow in Media', () => {
|
test.describe('Load Workflow in Media', () => {
|
||||||
;['workflow.webp', 'edited_workflow.webp', 'no_workflow.webp'].forEach(
|
;[
|
||||||
async (fileName) => {
|
'workflow.webp',
|
||||||
test(`Load workflow in ${fileName}`, async ({ comfyPage }) => {
|
'edited_workflow.webp',
|
||||||
await comfyPage.dragAndDropFile(fileName)
|
'no_workflow.webp',
|
||||||
await expect(comfyPage.canvas).toHaveScreenshot(`${fileName}.png`)
|
'large_workflow.webp'
|
||||||
})
|
].forEach(async (fileName) => {
|
||||||
}
|
test(`Load workflow in ${fileName}`, async ({ comfyPage }) => {
|
||||||
)
|
await comfyPage.dragAndDropFile(fileName)
|
||||||
|
await expect(comfyPage.canvas).toHaveScreenshot(`${fileName}.png`)
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
@@ -50,8 +50,8 @@ function parseExifData(exifData) {
|
|||||||
let value
|
let value
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
// ASCII string
|
// ASCII string
|
||||||
value = String.fromCharCode(
|
value = new TextDecoder('utf-8').decode(
|
||||||
...exifData.slice(valueOffset, valueOffset + numValues - 1)
|
exifData.subarray(valueOffset, valueOffset + numValues - 1)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user