-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
base: dev
Are you sure you want to change the base?
Refactor prompt parser #3535
Conversation
return True | ||
|
||
|
||
def prepare_model(): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
closes #2712 |
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. |
Signed-off-by: Vladimir Mandic <[email protected]>
modules/prompt_parser_diffusers.py
Outdated
if len(batch[i]) == 0: | ||
return None | ||
else: | ||
res.append(batch[i][step]) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Vladimir Mandic <[email protected]>
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