Skip to content

Commit

Permalink
[litegraph] Fix slider value display when custom widget label is pres…
Browse files Browse the repository at this point in the history
…ent (#1915)

* Update litegraph

* Add playwright test

* Update locales [skip ci]

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
huchenlei and github-actions authored Dec 15, 2024
1 parent fa48fe5 commit 9258098
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 5 deletions.
49 changes: 49 additions & 0 deletions browser_tests/assets/simple_slider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"last_node_id": 12,
"last_link_id": 9,
"nodes": [
{
"id": 12,
"type": "DevToolsSimpleSlider",
"pos": [
50,
50
],
"size": [
315,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": null,
"label": "FLOAT"
}
],
"properties": {
"Node name for S&R": "DevToolsSimpleSlider"
},
"widgets_values": [
0.5
]
}
],
"links": [],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1,
"offset": [
0,
0
]
}
},
"version": 0.4
}
4 changes: 4 additions & 0 deletions browser_tests/nodeDisplay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ test.describe('Optional input', () => {
expect(vaeInput.link).toBeNull()
expect(convertedInput.link).not.toBeNull()
})
test('slider', async ({ comfyPage }) => {
await comfyPage.loadWorkflow('simple_slider')
await expect(comfyPage.canvas).toHaveScreenshot('simple_slider.png')
})
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"@comfyorg/comfyui-electron-types": "^0.3.32",
"@comfyorg/litegraph": "^0.8.45",
"@comfyorg/litegraph": "^0.8.46",
"@primevue/themes": "^4.0.5",
"@vueuse/core": "^11.0.0",
"@xterm/addon-fit": "^0.10.0",
Expand Down
8 changes: 8 additions & 0 deletions src/locales/en/nodeDefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,14 @@
}
}
},
"DevToolsSimpleSlider": {
"display_name": "Simple Slider",
"inputs": {
"value": {
"name": "value"
}
}
},
"DiffControlNetLoader": {
"display_name": "Load ControlNet Model (diff)",
"inputs": {
Expand Down
8 changes: 8 additions & 0 deletions src/locales/ja/nodeDefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,14 @@
}
}
},
"DevToolsSimpleSlider": {
"display_name": "シンプルスライダー",
"inputs": {
"value": {
"name": ""
}
}
},
"DiffControlNetLoader": {
"display_name": "ControlNetモデルを読み込む(diff)",
"inputs": {
Expand Down
8 changes: 8 additions & 0 deletions src/locales/ko/nodeDefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,14 @@
}
}
},
"DevToolsSimpleSlider": {
"display_name": "간단한 슬라이더",
"inputs": {
"value": {
"name": ""
}
}
},
"DiffControlNetLoader": {
"display_name": "컨트롤넷 모델 로드 (차이)",
"inputs": {
Expand Down
8 changes: 8 additions & 0 deletions src/locales/ru/nodeDefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,14 @@
}
}
},
"DevToolsSimpleSlider": {
"display_name": "Простой Слайдер",
"inputs": {
"value": {
"name": "значение"
}
}
},
"DiffControlNetLoader": {
"display_name": "Загрузить модель ControlNet (дифф)",
"inputs": {
Expand Down
8 changes: 8 additions & 0 deletions src/locales/zh/nodeDefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,14 @@
}
}
},
"DevToolsSimpleSlider": {
"display_name": "简单滑块",
"inputs": {
"value": {
"name": ""
}
}
},
"DiffControlNetLoader": {
"display_name": "加载控制网模型(diff)",
"inputs": {
Expand Down

0 comments on commit 9258098

Please sign in to comment.