Skip to content

How do I use keywords with multiple brackets? #6943

Closed Answered by mikf
plshelpidkwhatimdoing asked this question in Q&A
Discussion options

You must be logged in to vote

version['files'] is a list of objects, with [N] being the index into that list (e.g. a Number). -K or standard format strings can't handle these very well, but you should be able to access the first item with version['files'][0]['url'].

The JSON output from -j is more useful here:

      "version": {
        "files": [
          {
            "hashes": [],
            "id": 130654,
            "metadata": {
              "format": "SafeTensor",
              "fp": null,
              "size": null
            },
            "modelVersionId": 171702,
            "name": "Classic Western Dragons XL.safetensors",
            "pickleScanMessage": "No Pickle imports",
            "pickleScanResult"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@plshelpidkwhatimdoing
Comment options

Answer selected by mikf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants