stable-diffusion-webui-forge
stable-diffusion-webui-forge copied to clipboard
[Bug]: Forge Hardcodes ExtraNetworks Count
Checklist
- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [X] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
What happened?
In Forge, the number of ExtraNetworks tabs is hardcoded at this line:
https://github.com/lllyasviel/stable-diffusion-webui-forge/blob/main/javascript/extraNetworks.js#L628
(TI + HyN + CkPt + LoRA) * (txt + img) = 8
As a result, if an Extension registers a new tab, the length will become more than 8, causing the subsequent logics to never be executed, and thus breaking the whole ExtraNetworks functionalities.
This does not happen on the original Automatic1111 Webui.
Steps to reproduce the problem
- Write an Extension that registers a new ExtraNetwork tab
- Such as: https://github.com/Haoming02/sd-webui-easy-tag-insert/tree/forge
- Specifically the
forgebranch
- Specifically the
- Such as: https://github.com/Haoming02/sd-webui-easy-tag-insert/tree/forge
- Launch the Webui
- See no filters and breaking functionalities
- Such as not being able to add TI
- Open the browser console to see the errors
- Change the
8mentioned above to10 - Reload UI
- See everything working correctly again
What should have happened?
IDK, not hardcode the number perhaps. The original Webui didn't do this afterall.
What browsers do you use to access the UI ?
Microsoft Edge
Sysinfo
Irrelevant
Console logs
extraNetworks.js?1708056612.0225787:171 Uncaught TypeError: extraNetworksApplyFilter[tabname_full] is not a function
at doFilter (extraNetworks.js?1708056612.0225787:171:47)
Additional information
N/A