mirror of
https://github.com/power88/webui-fooocus-prompt-expansion.git
synced 2026-11-05 01:38:03 +00:00
[PR #1] [MERGED] fixes simplification improvements #1
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
power88/webui-fooocus-prompt-expansion#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/power88/webui-fooocus-prompt-expansion/pull/1
Author: @w-e-w
Created: 6/9/2024
Status: ✅ Merged
Merged: 6/9/2024
Merged by: @power88
Base:
master← Head:master📝 Commits (10+)
8a38384.gitignore pycache/7486e59reformat979e5e6fix models_path483fdc4download the model on first usec59d9d1use InputAccordion90ace75disable ext on apply infotext3b7cb8dlru_cache create_positive211e563simplify device68b1975Implement preview UI22e7b1csimplifies and remove unused code📊 Changes
3 files changed (+91 additions, -171 deletions)
View changed files
➕
.gitignore(+1 -0)➖
install.py(+0 -23)📝
scripts/expansion.py(+90 -148)📄 Description
fixes the model download destination
model on first use as opposed to install.py
reading this section of unused code
github.com/power88/webui-fooocus-prompt-expansion@c57db7e4dd/scripts/expansion.py (L242-L249)I assume that you trying to achieve some sort of generate the prompt and then apply the prompt prompy box functionality
I've implemented this for you in Implement preview UI
remove it if it's not your intention
I also implemented so that if you read your prompt firm infotax it will automatically disable extension
reason being since the prompt is directly modified when you read infotext you will
already have the prompt inside the prompt and don't need the extension to be enabled
as a result is deterministic it make sense to lru_cache create_positive
the expansion prompt is cached so that if the input prompt and the seed is the same it immediately returns the results as opposed to calculated again
it's also solves the issue when you have assuming that all prompts are the same it will basically have to calculate the same thing multiple times wasting compute when
len(p.all_prompts) > 0simplify device selection operation
I can see that you clearly copied your code from fooocus, which contain lots of code that are completely not applicable
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.