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

Improve speed of applying TI embeddings #5422

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Conversation

RyanJDick
Copy link
Collaborator

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Have you discussed this change with the InvokeAI team?

  • Yes
  • No, because:

Have you updated all relevant documentation?

  • Yes
  • No

Description

This change saves time when applying TI embeddings by skipping unnecessary weight initialization steps. (See inline source comment for more details.)

QA Instructions, Screenshots, Recordings

In my local testing with SDXL, this reduced sdxl_compel_prompt from ~8s to ~0.8s.

I confirmed that there was no change to the images produced with a fixed seed after the fix.

Added/updated tests?

  • Yes
  • No

…s to accomodate new TI embeddings. This saves time.
@hipsterusername
Copy link
Member

The man the myth the legend.

@hipsterusername hipsterusername merged commit f7f6978 into main Jan 5, 2024
9 checks passed
@hipsterusername hipsterusername deleted the ryan/apply-ti-speedup branch January 5, 2024 20:16
@blessedcoolant
Copy link
Collaborator

blessedcoolant commented Jan 6, 2024

I'm unable to see any difference on my end with either SDXL or SD1.5
[2024-01-06 07:14:43,829]::[InvokeAI]::INFO --> sdxl_compel_prompt 2 13.653s 1.311G

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.

None yet

3 participants