jitcoder / lora-info

56 stars 4 forks source link

[FEATURE REQUEST] Automatically read the LoRA selected in Efficient Loader node and other LoRA loader nodes #3

Open alessandroperilli opened 9 months ago

alessandroperilli commented 9 months ago

This request might be too onerous to satisfy given the enormous amount of LoRA loaders that are out there.

I'd argue that, at minimum, two main loaders could be supported: the default ComfyUI one, and the Efficiency Loader node, which many users adopt to simplify their workflows.

Or, perhaps, there's a non-resource-intensive way, to read the loaded LoRA model name, no matter what type of node does the operation?

For example:

The LoRA Info node could accept any input coming from a LoRA loading node and, if connected in that way, it would search for the LoRA model information accordingly.

In the following situation, I would link a random output from the Efficiency Loader node (let's say Model, or VAE) to the input of LoRA Info, and the latter would do its job.

Screenshot 2023-12-09 at 10 26 54

I've seen this trick used by rghtree in nodes like Fast Bypasser, so maybe it's possible.

In any way, thank you for considering my request.

jitcoder commented 9 months ago

I like this idea a lot. I'll do some research on it. the only blocker that is coming to mind is getting non-'outputted' data out of another node, ill mess around though and see if its possible

camoody1 commented 9 months ago

Check out the Automatic1111 extension called CivitAI Helper. This is EXACTLY what we need and your node is about 75% there!

That extension downloads the CIvitAI information in json form as well as a sample jpg and stores that information with the same model name as the Lora and in the same folder. That way, A1111 doesn't have to keep doing polling to CivitAI every time you want to find Lora info. If you could code YOUR node to look for that same data structure before heading out to Civit, it would be super fast.

I would LOVE if your node could show a sample jpg for each Lora. That's really how I remember what each Lora does. The names are usually pretty awful.

Thank you!

Example of the file structure: image

jitcoder commented 9 months ago

Check out the Automatic1111 extension called CivitAI Helper. This is EXACTLY what we need and your node is about 75% there!

That extension downloads the CIvitAI information in json form as well as a sample jpg and stores that information with the same model name as the Lora and in the same folder. That way, A1111 doesn't have to keep doing polling to CivitAI every time you want to find Lora info. If you could code YOUR node to look for that same data structure before heading out to Civit, it would be super fast.

I would LOVE if your node could show a sample jpg for each Lora. That's really how I remember what each Lora does. The names are usually pretty awful.

Thank you!

Example of the file structure: image

The node currently already does cache data from civitai, it doesn't actually hit civit every time. The image preview is a good idea, I'll add that when I get back into comfyui. It might be a while, I've actually deleted comfyui and stable diffusion stuff after getting frustrated with performance (I'm on a M1 Pro Mac), tried the coreml migration stuff but its so buggy and glitchy. taking a break from it for a while, but will definitely be back

alessandroperilli commented 9 months ago

@jitcoder I'm on a M2 with 96GB RAM and it takes me 4min to generate an SDXL image of 1344x768px. If I enable any ControlNet (or a FreeU node) even worse. So I know exactly how you feel.

I'm following closely the development of the Core ML Suite by aszc-dev, but there are too many limitations at the moment. Plus, with the release of the new MLX framework, I'm not sure that effort will continue.

Have a nice break.

jitcoder commented 9 months ago

@jitcoder I'm on a M2 with 96GB RAM and it takes me 4min to generate an SDXL image of 1344x768px. If I enable any ControlNet (or a FreeU node) even worse. So I know exactly how you feel.

I'm following closely the development of the Core ML Suite by aszc-dev, but there are too many limitations at the moment. Plus, with the release of the new MLX framework, I'm not sure that effort will continue.

Have a nice break.

yeah hopefully something comes around and makes this more feasible on macos.

jitcoder commented 8 months ago

just dropping a small comment here. I haven't forgotten about this request, I'll eventually come to this. short term I'm going to be working on the preview image feature requested by @camoody1.

I'm also about to drop another node "Load Image From URL", its already done, just testing it out n stuff