Comfy-Org / Comfy-Org/ComfyUI_frontend
[Bug]: A primitive bound to a combo list does not select the first item when null
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Frontend Version
1.3.26
### Expected Behavior
A primitive attached to a combo list (e.g. Load Image's image input) with its widget value set to null should select the first item in the list on load.
### Actual Behavior
A primitive attached to a combo list (e.g. Load Image's image input) with its widget value set to null keeps the value as null. This:
1. causes the workflow to fail with an error when run;
2. requires you to click on the primitive to update its value.
### Steps to Reproduce
1. Add a "Load Image" node (or other loader such as the "Load LoRA" node).
2. Make the input file list an input instead of a widget.
3. Connect the input node from (2) to a primitive node -- this will show the file list in the dropdown.
4. Complete the workflow, e.g. by attaching the "Load Image" output to a "Preview Image" node.
5. Run the workflow ensuring there are no errors.
6. Save/export the workflow.
7. Edit the workflow file so the primitive widget value is null for the filename.
8. Reimport the workflow.
9. Run the workflow.
### Debug Logs
```powershell
n/a
```
### Browser Logs
n/a
### Setting JSON
```json
{
"Comfy.NodeLibrary.Bookmarks": [],
"Comfy.LinkRenderMode": 2,
"Comfy.UseNewMenu": "Top",
"Comfy.ColorPalette": "dark",
"Comfy.DevMode": true,
"Comfy.Settings.ExtensionPanel": false,
"pysssss.SnapToGrid": true
}
```
### What browsers do you use to access the UI ?
Mozilla Firefox
### Other
This is the behaviour for Load Image when its input is null. Possibly other load nodes as well.
Use Case: Separate the selection of a LoRA filename from the loading of the LoRA. Remove file path information from the workflow that will be different for each user.
Contributor guide
Assessment
This issue has not been assessed yet.