Skip to content

feat(anima): add prompt weighting support - #9506

Open
BMFreed wants to merge 2 commits into
invoke-ai:mainfrom
BMFreed:feat/anima-prompt-weighting
Open

feat(anima): add prompt weighting support#9506
BMFreed wants to merge 2 commits into
invoke-ai:mainfrom
BMFreed:feat/anima-prompt-weighting

Conversation

@BMFreed

@BMFreed BMFreed commented Aug 15, 2026

Copy link
Copy Markdown

Summary

Adds prompt weighting support to Anima text conditioning.

  • Supports (text), (text:weight), nested groups, and escaped literal parentheses.
  • Removes weighting markup before Qwen3 encoding.
  • Maps weights onto T5-XXL tokens using tokenizer offset mappings.
  • Passes the resulting weights through the existing Anima conditioning pipeline.

The implementation was written independently. ComfyUI was used only as a behavioral reference; no GPL-licensed source was copied or adapted.

Related Issues / Discussions

N/A

QA Instructions

  • Verified that an unweighted prompt and the equivalent (text:1) prompt produce identical cleaned text, T5 token IDs, and weights.
  • Verified that weighted text receives the requested T5 token weights.
  • Verified that Qwen3 receives the cleaned prompt without weighting markup.
  • Manually verified Anima generation in InvokeAI 6.13.8 using matching seed and generation settings.
  • Ran the Anima test suite: 211 passed, 2 skipped.

Merge Plan

No special merge requirements.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated
  • No redux slice changes
  • No documentation changes required
  • Updated Whats New copy (not a release PR)

@github-actions github-actions Bot added python PRs that change python files invocations PRs that change invocations backend PRs that change backend files python-tests PRs that change python tests labels Aug 15, 2026
@lstein lstein added the 6.14.1 label Aug 17, 2026
@lstein lstein moved this to 6.14.1: Bug fixes to 6.14.0 in Invoke - Community Roadmap Aug 17, 2026
@lstein lstein added 7.0.0 and removed 6.14.1 labels Aug 17, 2026
@lstein lstein moved this from 6.14.1: Bug fixes to 6.14.0 to 7.0 Theme: Tabbed Layout UI in Invoke - Community Roadmap Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.0.0 backend PRs that change backend files invocations PRs that change invocations python PRs that change python files python-tests PRs that change python tests

Projects

Status: 7.0 Theme: Tabbed Layout UI

Development

Successfully merging this pull request may close these issues.

3 participants