Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Forge Hardcodes ExtraNetworks Count #276

Closed
5 of 6 tasks
Haoming02 opened this issue Feb 16, 2024 · 3 comments
Closed
5 of 6 tasks

[Bug]: Forge Hardcodes ExtraNetworks Count #276

Haoming02 opened this issue Feb 16, 2024 · 3 comments
Labels
bug Confirmed report of something that isn't working

Comments

@Haoming02
Copy link
Contributor

Haoming02 commented Feb 16, 2024

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • 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

  1. Write an Extension that registers a new ExtraNetwork tab
  2. Launch the Webui
  3. See no filters and breaking functionalities
    • Such as not being able to add TI
    • Open the browser console to see the errors
  4. Change the 8 mentioned above to 10
  5. Reload UI
  6. 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

@catboxanon
Copy link
Collaborator

This PR merged upstream should fix it. AUTOMATIC1111/stable-diffusion-webui#14939

@catboxanon catboxanon added bug Confirmed report of something that isn't working upstream labels Feb 17, 2024
@catboxanon
Copy link
Collaborator

Upstream has been merged with this repo now, so this should be fixed, closing. Feel free to re-open if it still occurs.

@Haoming02
Copy link
Contributor Author

Can confirm. After pulling the latest version, it works correctly now~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed report of something that isn't working
Projects
None yet
Development

No branches or pull requests

2 participants