fix(setup): import infotext_utils instead of removed legacy alias#950
Open
Gunther-Schulz wants to merge 1 commit into
Open
fix(setup): import infotext_utils instead of removed legacy alias#950Gunther-Schulz wants to merge 1 commit into
Gunther-Schulz wants to merge 1 commit into
Conversation
modules.generation_parameters_copypaste was renamed to modules.infotext_utils in A1111 in 2024 and kept reachable under the old name via a sys.modules alias. Forge Classic dropped that alias in commit e40900cd (2026-05-05), so iib_setup.py now fails at script load with ImportError and the Infinite Image Browsing tab disappears from the WebUI. infotext_utils exposes the same ParamBinding and register_paste_params_button symbols, so a one-line import change restores compatibility with current Forge Classic without breaking A1111 or older Forge (the alias still resolves the new name there). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
Thanks for the PR! This issue has already been fixed in #947, so I'll leave this one as-is for now. Really appreciate your contribution though! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/iib_setup.pyimports the renamed-and-now-removedmodules.generation_parameters_copypastealias, which causes theextension to fail at script load on current Stable Diffusion WebUI
Forge Classic — the IIB tab silently disappears from the UI.
Background
modules.generation_parameters_copypastewas renamed tomodules.infotext_utilsin A1111 in003b91f0
(2024-01-01). A
sys.modules["modules.generation_parameters_copypaste"] = …alias was added in
modules/infotext_utils.pyfor back-compat.e40900cdon 2026-05-05 ("yeet — 1.8.0 was 2 years ago").
from modules import … generation_parameters_copypaste as sendraises
ImportError: cannot import name 'generation_parameters_copypaste' from 'modules' (unknown location),so neither
on_ui_tabsnoron_app_startedget registered, and IIBbecomes invisible to the user.
Fix
Single-line change in
scripts/iib_setup.py:infotext_utilsexposes the sameParamBindingandregister_paste_params_buttonsymbols used a few lines below. OnA1111 and older Forge releases the legacy alias still resolves to the
same module, so this is a strict superset of the previous behaviour:
it works on every WebUI variant that has
infotext_utils(which isall of them since 2024), and on no variant does it regress.
Test plan
cd2490a8(2026-05-07).from modules import infotext_utilssucceeds inForge Classic's runtime.
infotext_utils.ParamBindingandinfotext_utils.register_paste_params_buttonexist.(the alias was a thin re-export; this change just skips the
indirection).