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

LORA preview as in styles #2029

Open
Nicolayka opened this issue Jan 23, 2024 · 7 comments
Open

LORA preview as in styles #2029

Nicolayka opened this issue Jan 23, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@Nicolayka
Copy link

Is it possible to pre-order (image) LORA the way it is done in mouse-over styles?
Only the image should be taken from the site. I ask you to do this, because you do not remember all the styles of LORA, and every time you have to go to the site for information

@mashb1t mashb1t added the enhancement New feature or request label Jan 23, 2024
@eddyizm
Copy link
Contributor

eddyizm commented Jan 24, 2024

This is a pretty good idea. In fact, It would be nice if there we could use the api to get information about the Lora, such as trigger words and ideal settings as that seems to be to be what is harder to remember. I have to stash that info in my notes. Thanks for suggesting it!

@Thorian
Copy link

Thorian commented Jan 26, 2024

In this it would be nice to force trigger a Lora (if not directly possible by adding the trigger words in the back to the command)

@MindOfMatter
Copy link
Contributor

MindOfMatter commented Jan 26, 2024

I started a code to do with pycivitai

but it become too complex to know after already downloaded model

also we need to do multiple research because it not find easily the model downloaded (also you may rename it)

I will try instead in my side to create the preview from last generated image attempt

so it will be more easily to update the preview from your last previous render

it will may generate the preview if only it was the one enabled (no conflict and make clean to undersand)

(except for SD checkpoints need to have base model with the refiner. so if it not defined, it will use by default the refiner one, if the preview is base, so overwrite it)

also this way you find the one that really work with the setup

(for lora it should be the only one enabled to update it)

the easiest first implementation will be to create a json (preview.json) in model folder (checkpoints an loras) in question that refer to output last attempt

preview.json :

"filename" : "preview output folder last location (png date image like in log)"

for the first version maybe you will need to restart app to affect change

so in the UI it will use the path output to preview it (like in log history)

I will use my custom tester feature to help me to fill the preview images
#2048

@MindOfMatter
Copy link
Contributor

MindOfMatter commented Jan 26, 2024

I will try something like that first (will add last date the new attempt to preview)

models\checkpoints\preview_log.json (same for loras)

{
    "juggernautXL_v8Rundiffusion.safetensors" : [
        "2024-01-20/2024-01-20_23-58-57_8208.png",
        "2024-01-21/2024-01-21_23-58-57_8208.png",
        "2024-01-22/2024-01-22_23-58-57_8208.png"
    ]
}

at app start, it cleanup outputs removed in the json (not exist image anymore)
i find the latest (or oldest) one

it load it in the ui as model preview

when creating log it will also append the new concerned preview in json file

if no image peview display as tooltip all the filename by default

@MindOfMatter
Copy link
Contributor

MindOfMatter commented Jan 27, 2024

locally, I set up the feature (preview based on last single attempt)

Sans titre

@MindOfMatter
Copy link
Contributor

Hi

I just created a fork fooocus project version just synced with the original project in main branch
https://github.com/MindOfMatter/Fooocus-MindOfMatter-Edition

I created a pr in my fork project to show what we need to change to enable the feature

MindOfMatter/Fooocus-MindOfMatter-Edition#14

If you want to test it, you need to replace your fooocus local folder with mine
(according to selected feature branch)

Also my dev branch contains all merged tested pr features in my fork project
https://github.com/MindOfMatter/Fooocus-MindOfMatter-Edition/tree/dev

I hope that it could help you :)

Have a nice day

@MindOfMatter
Copy link
Contributor

MindOfMatter commented Feb 8, 2024

done and a lot tested

#2211

@mashb1t mashb1t added this to the v2.5.0 milestone Jun 5, 2024
@mashb1t mashb1t removed this from the v2.5.0 milestone Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants