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

Refactor prompt parser #3535

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Refactor prompt parser #3535

wants to merge 8 commits into from

Conversation

AI-Casanova
Copy link
Collaborator

Full refactor of prompt parsing.

Moved prompt embeds inside of a class object that parses prompts at initialization and returns them when called.

Full scheduling capabilities restored

LRU cache for prompts, size adjustable from options

return True


def prepare_model():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would you remove accelerate hooks? it kind of invalidates any kind of model offloading. i get you need to have te on right device, but basically killing offloading is not the way to go.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git blame puts that code on @Disty0 I just moved it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i'll handle that. it should definitely not be executed that frequently - it does have significant performance implications.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status check on this?

If there is significant performance implications here, they exist in the main code base as well.

@vladmandic
Copy link
Owner

closes #2712

@vladmandic
Copy link
Owner

btw, i haven't commented on this for past few days because it looks ok, need to actually test it and i've been delaying that.

if len(batch[i]) == 0:
return None
else:
res.append(batch[i][step])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm getting immediate list-index-out-of-range runtime error here, triggered from diffusers_callback

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Signed-off-by: Vladimir Mandic <[email protected]>
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