Enhance launch configurations for pytest and update alpha channel image creation in PathSaveImageRGBA to remove a warning

This commit is contained in:
StableLlama
2026-03-26 22:22:29 +01:00
parent 2e85a05dba
commit 9ef5bca4b1
2 changed files with 47 additions and 2 deletions
+45
View File
@@ -9,6 +9,51 @@
"type": "debugpy",
"request": "launch",
"program": "${file}"
},
{
"name": "Python: pytest all tests",
"type": "python",
"request": "launch",
"module": "pytest",
"args": ["tests"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "Python: pytest test_data_list_nodes.py",
"type": "python",
"request": "launch",
"module": "pytest",
"args": ["tests/test_data_list_nodes.py"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "Python: pytest tests.test_data_list_nodes.test_create_from_int",
"type": "python",
"request": "launch",
"module": "pytest",
"args": ["-k", "test_create_from_int", "tests/test_data_list_nodes.py"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "Python: pytest tests.test_data_list_nodes.test_shuffle",
"type": "python",
"request": "launch",
"module": "pytest",
"args": ["-k", "test_shuffle", "tests/test_data_list_nodes.py"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "Python: pytest tests.test_list_nodes.test_shuffle",
"type": "python",
"request": "launch",
"module": "pytest",
"args": ["-k", "test_shuffle", "tests/test_list_nodes.py"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
}
]
}
+2 -2
View File
@@ -1141,8 +1141,8 @@ class PathSaveImageRGBA(ComfyNodeABC):
# Create PIL image (RGB)
pil_img = Image.fromarray(img_np)
# Create alpha channel image
alpha_img = Image.fromarray(alpha_np, mode='L')
# Create alpha channel image (avoid deprecated 'mode' kwarg in Pillow 13+)
alpha_img = Image.fromarray(alpha_np).convert("L")
# Convert to RGBA and add alpha channel
pil_img_rgba = pil_img.convert("RGBA")