Skip to content

fix(setup): import infotext_utils instead of removed legacy alias#950

Open
Gunther-Schulz wants to merge 1 commit into
zanllp:mainfrom
Gunther-Schulz:fix/setup-infotext-utils-import
Open

fix(setup): import infotext_utils instead of removed legacy alias#950
Gunther-Schulz wants to merge 1 commit into
zanllp:mainfrom
Gunther-Schulz:fix/setup-infotext-utils-import

Conversation

@Gunther-Schulz
Copy link
Copy Markdown

Summary

scripts/iib_setup.py imports the renamed-and-now-removed
modules.generation_parameters_copypaste alias, which causes the
extension to fail at script load on current Stable Diffusion WebUI
Forge Classic
— the IIB tab silently disappears from the UI.

Background

  • modules.generation_parameters_copypaste was renamed to
    modules.infotext_utils in A1111 in
    003b91f0
    (2024-01-01). A sys.modules["modules.generation_parameters_copypaste"] = …
    alias was added in modules/infotext_utils.py for back-compat.
  • Forge Classic dropped that alias in commit
    e40900cd
    on 2026-05-05 ("yeet — 1.8.0 was 2 years ago").
  • After that change, from modules import … generation_parameters_copypaste as send
    raises ImportError: cannot import name 'generation_parameters_copypaste' from 'modules' (unknown location),
    so neither on_ui_tabs nor on_app_started get registered, and IIB
    becomes invisible to the user.

Fix

Single-line change in scripts/iib_setup.py:

-from modules import script_callbacks, generation_parameters_copypaste as send
+from modules import script_callbacks, infotext_utils as send

infotext_utils exposes the same ParamBinding and
register_paste_params_button symbols used a few lines below. On
A1111 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 is
all of them since 2024), and on no variant does it regress.

Test plan

  • Reproduced the silent tab-missing behaviour on Forge Classic
    cd2490a8 (2026-05-07).
  • Verified that from modules import infotext_utils succeeds in
    Forge Classic's runtime.
  • Verified infotext_utils.ParamBinding and
    infotext_utils.register_paste_params_button exist.
  • Reviewer to confirm no regression on stock A1111 / older Forge
    (the alias was a thin re-export; this change just skips the
    indirection).

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>
@zanllp
Copy link
Copy Markdown
Owner

zanllp commented May 7, 2026

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants