Enhance launch configurations for pytest and update alpha channel image creation in PathSaveImageRGBA to remove a warning
This commit is contained in:
Vendored
+45
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user