shinich39 / comfyui-parse-image

Extract metadata from image
MIT License
2 stars 1 forks source link

How to query a second one of same class type? #1

Closed kenjibailly closed 2 months ago

kenjibailly commented 2 months ago

So I have two LoraLoaders in my metadata, example below. When doing a query LoraLoader.lora_name I only get the first one. Would be nice if I could do something like LoraLoader[1].lora_name to get the second one, I tried it but that doesn't work.

Is there a way to do this?

   "11":{
      "inputs":{
         "lora_name":"Anime_detail_eye.safetensors",
         "strength_model":1,
         "strength_clip":1,
         "model":[
            "12",
            0
         ],
         "clip":[
            "12",
            1
         ]
      },
      "class_type":"LoraLoader"
   },
   "72":{
      "inputs":{
         "lora_name":"arataki-itto.safetensors",
         "strength_model":1.0,
         "strength_clip":1.0,
         "model":[
            "12",
            0
         ],
         "clip":[
            "12",
            1
         ]
      },
      "class_type":"LoraLoader"
   },

Anyway really cool nodes, thanks for that. Been trying to find something like this for some time now.

shinich39 commented 2 months ago

You can use two ways right now.

Case 1: Use Node ID Node ID not changed before node removed. You can use this way when loaded images are generated by same workflow. 11.lora_name 72.lora_name

Case 2: Use Node Title after setting title of node ckpt1.lora_name ckpt2.lora_name

I will update it to work like this "LoraLoader[1].lora_name" Thanks for your interest :)

2024년 9월 15일 (일) 오전 5:46, Mind Glowing @.***>님이 작성:

So I have two LoraLoaders in my metadata, example below. When doing a query LoraLoader.lora_name I only get the first one. Would be nice if I could do something like LoraLoader[1].lora_name to get the second one, I tried it but that doesn't work.

Is there a way to do this?

"11":{ "inputs":{ "lora_name":"Anime_detail_eye.safetensors", "strength_model":1, "strength_clip":1, "model":[ "12", 0 ], "clip":[ "12", 1 ] }, "class_type":"LoraLoader" }, "72":{ "inputs":{ "lora_name":"arataki-itto.safetensors", "strength_model":1.0, "strength_clip":1.0, "model":[ "12", 0 ], "clip":[ "12", 1 ] }, "class_type":"LoraLoader" },

Anyway really cool nodes, thanks for that. Been trying to find something like this for some time now.

— Reply to this email directly, view it on GitHub https://github.com/shinich39/comfyui-parse-image/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB6ZYYWCCFY5GTQSAGFNN4LZWSOCDAVCNFSM6AAAAABOHEYCNCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDMNRQGE2TKMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

shinich39 commented 2 months ago

Now updated.

kenjibailly commented 2 months ago

Whoa that was fast! Thank you! I do have another question, is there any batch image loaders out there that work with this? I haven't found any, I think those I've tried don't pass on the metadata.

shinich39 commented 2 months ago

This node only supports 5 loaders now.

Try this node. Start generation after check auto queue and set mode to increment.

https://github.com/shinich39/comfyui-put-image

2024년 9월 15일 (일) 오전 7:41, Mind Glowing @.***>님이 작성:

Whoa that was fast! Thank you! I do have another question, is there any batch image loaders out there that work with this? I haven't found any, I think those I've tried don't pass on the metadata.

— Reply to this email directly, view it on GitHub https://github.com/shinich39/comfyui-parse-image/issues/1#issuecomment-2351202000, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB6ZYYVH3BX24BIPD7O2QJLZWS3STAVCNFSM6AAAAABOHEYCNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRGIYDEMBQGA . You are receiving this because you modified the open/close state.Message ID: @.***>

kenjibailly commented 2 months ago

It's working thanks!

I made 3 workflows:

Since Flux takes some time to upscale the images, I found it better to queue up a bunch of images with the simple workflow and then choose those I want to upscale, so I don't lose unnecessary time upscaling images that aren't good

If you're interested:

Simple Flux Workflow + Single + Batch Upscale From Image Automatic.zip

Thanks again for your hard work and advice!

shinich39 commented 2 months ago

It was used in follow intention of development. glad it worked!