Fit view on workflow load without extra.ds (#3822)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-05-08 17:39:44 -04:00
committed by GitHub
parent 2019c1d877
commit 2a297e512d
31 changed files with 138 additions and 34 deletions

View File

@@ -33,5 +33,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}

View File

@@ -130,6 +130,11 @@
],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}

View File

@@ -499,6 +499,11 @@
],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}
}

View File

@@ -160,4 +160,4 @@
}
},
"version": 0.4
}
}

View File

@@ -43,6 +43,10 @@
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
},
"groupNodes": {
"group_node": {
"nodes": [
@@ -401,4 +405,4 @@
}
},
"version": 0.4
}
}

View File

@@ -110,6 +110,10 @@
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
},
"groupNodes": {
"hello": {
"nodes": [
@@ -249,4 +253,4 @@
}
},
"version": 0.4
}
}

View File

@@ -44,6 +44,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}

View File

@@ -61,6 +61,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}
}

View File

@@ -50,6 +50,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}
}

View File

@@ -38,7 +38,11 @@
"groups": [],
"config": {},
"extra": {
"groupNodes": {}
"groupNodes": {},
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}
}

View File

@@ -54,6 +54,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}

View File

@@ -92,10 +92,14 @@
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
},
"VHS_latentpreview": true,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": false,
"VHS_KeepIntermediate": false
},
"version": 0.4
}
}

View File

@@ -84,6 +84,10 @@
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
},
"reroutes": [
{
"id": 1,

View File

@@ -106,10 +106,7 @@
"extra": {
"ds": {
"scale": 1,
"offset": {
"0": 0,
"1": 0
}
"offset": [0, 0]
}
},
"version": 0.4

View File

@@ -31,5 +31,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}
}

View File

@@ -8,4 +8,4 @@
"title": "Load Animated Image"
}
}
}
}

View File

@@ -27,6 +27,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}

View File

@@ -41,6 +41,11 @@
"links": [],
"groups": [],
"config": {},
"extra": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}
}

View File

@@ -54,7 +54,11 @@
"groups": [],
"config": {},
"extra": {
"frontendVersion": "1.17.0"
"frontendVersion": "1.17.0",
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}

View File

@@ -666,6 +666,12 @@ test.describe('Load workflow', () => {
expect(activeWorkflowName).toEqual(workflowPathB)
})
})
test('Auto fit view after loading workflow', async ({ comfyPage }) => {
await comfyPage.setSetting('Comfy.EnableWorkflowViewRestore', false)
await comfyPage.loadWorkflow('single_ksampler')
await expect(comfyPage.canvas).toHaveScreenshot('single_ksampler_fit.png')
})
})
test.describe('Load duplicate workflow', () => {

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 57 KiB