civitai / civitai_comfy_nodes

Comfy Nodes that make utilizing resources from Civitas easy as copying and pasting
100 stars 16 forks source link

[Feature Request] display trigger words #5

Open tekakutli opened 1 year ago

tekakutli commented 1 year ago

maybe store them locally in a database?

WASasquatch commented 1 year ago

It should already do this in the download_history.json file.

I have ideas for how to do this in the UI. But not sure which is the best route and this moment. I think more discussion is needed. If you have any ideas, please share.

Current, for example in the case of this LoCon under trained_words:

    "119446": [
        {
            "id": 129771,
            "files": [
                {
                    "id": 94091,
                    "url": "https://civitai-delivery-worker-prod-2023-07-01.5ac0637cfd0766c97916cefa3764fbdf.r2.cloudflarestorage.com/103916/model/sdxlHolloaiV10.hC9e.safetensors",
                    "sizeKB": 7636.6171875,
                    "name": "SDXL_holloAI_v1.0.safetensors",
                    "type": "Model",
                    "metadata": {
                        "fp": null,
                        "size": null,
                        "format": "SafeTensor"
                    },
                    "pickleScanResult": "Success",
                    "pickleScanMessage": "No Pickle imports",
                    "virusScanResult": "Success",
                    "virusScanMessage": null,
                    "scannedAt": "2023-07-30T22:45:34.033Z",
                    "hashes": {
                        "AutoV1": "DDA7476C",
                        "AutoV2": "7B8AD89A06",
                        "SHA256": "7B8AD89A06760920306D945A68C0C2BD59D5A954D93ABF7292D042656509DBA7",
                        "CRC32": "95D3C71F",
                        "BLAKE3": "1CF74872F02499B064840B32E7F0839AEA47B4E3AA91E87FE2CD1D336C689D30"
                    },
                    "downloadUrl": "https://civitai.com/api/download/models/129771",
                    "primary": true,
                    "model_type": "LoCon",
                    "trained_words": [
                        "holloAI"
                    ]
                }
            ]
        }
    ],

Or this checkpoint:

    "118406": [
        {
            "id": 128439,
            "files": [
                {
                    "id": 92984,
                    "url": "https://civitai-delivery-worker-prod-2023-07-01.5ac0637cfd0766c97916cefa3764fbdf.r2.cloudflarestorage.com/3193/model/counterfeitxlCEB1.rwBX.safetensors",
                    "sizeKB": 6775430.65234375,
                    "name": "counterfeitxl_.safetensors",
                    "type": "Model",
                    "metadata": {
                        "fp": "fp16",
                        "size": "pruned",
                        "format": "SafeTensor"
                    },
                    "pickleScanResult": "Success",
                    "pickleScanMessage": "No Pickle imports",
                    "virusScanResult": "Success",
                    "virusScanMessage": null,
                    "scannedAt": "2023-07-29T09:30:46.898Z",
                    "hashes": {
                        "AutoV1": "0EA17FCA",
                        "AutoV2": "4635694AA3",
                        "SHA256": "4635694AA30697EC47211B320D4B47A655F8BC1D7257B3DF6F6F5BAD7AE2F75C",
                        "CRC32": "9584374E",
                        "BLAKE3": "E54C2698B6D4ED556C471FE9CFC135AF21AFC909820E9ED31482BEF4EA8B7754"
                    },
                    "downloadUrl": "https://civitai.com/api/download/models/128439",
                    "primary": true,
                    "model_type": "Checkpoint",
                    "trained_words": [
                        "girl"
                    ]
                }
            ]
        }
    ],
aegis72 commented 1 year ago

Is there a node (from anyone) that takes a list---either a CSV, or an XML, or even just a text file----and then shows each entry as a drop down list, with its output being whatever the value of the list item is? It seems like that would be ideal----a node that gathered the trigger words for the currently selected ckpt or lora, and then one could just use a concatenate node to add it to the front of the prompt. Or, similar to RGThree's "power prompt," it could be injected in the same manner that he does his "embeddings" drop down, similar to this: image

WASasquatch commented 1 year ago

We have a an idea for embeddings in the works.

Is there a node (from anyone) that takes a list---either a CSV, or an XML, or even just a text file----and then shows each entry as a drop down list, with its output being whatever the value of the list item is? It seems like that would be ideal----a node that gathered the trigger words for the currently selected ckpt or lora, and then one could just use a concatenate node to add it to the front of the prompt. Or, similar to RGThree's "power prompt," it could be injected in the same manner that he does his "embeddings" drop down, similar to this: image

donengel72 commented 1 year ago

The “load text from a list” would still be quite helpful. It looks like the code of David Fischer, “the upsider” can be easily modified to make a node that allows an arbitrary list to be selected from a csv . He made a node called style_loader_csv.py that could be made to load a different file than “styles.csv” by changing that hardcoded location in the py to something else. I’d like to load that filename from an external file rather than have to hardcode it in the text, or at least make it a variable at the top of the file, so it’s off to google to figure that out.