civitai / civitai

A repository of models, textual inversions, and more
https://civitai.com
Apache License 2.0
6.2k stars 617 forks source link

[Bug]: modelVersions.images.meta removed? #1037

Open miaoshouai opened 8 months ago

miaoshouai commented 8 months ago

What happened?

Is modelVersions.images.meta removed from the api response? seems you can no longer see it when you query by modelId.

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

this is a sample of the api call of a model, meta used to be under images

{"id":4855,"name":"AnythingElse V4","description":"

Note: We've been told that this is just a troll and not an official version of Anything V4.

Originally <a target=\"_blank\" rel=\"ugc\" href=\"https://huggingface.co/andite/anything-v4.0\">posted to Hugging Face by Andite

Thanks to <a target=\"_blank\" rel=\"ugc\" href=\"https://huggingface.co/Linaqruf\">Linaqruf for letting me borrow his model card for reference.

Welcome to Anything V4 - a latent diffusion model for weebs. The newest version of Anything. This model is intended to produce high-quality, highly detailed anime style with just a few prompts. Like other anime-style Stable Diffusion models, it also supports danbooru tags to generate images.

e.g. 1girl, white hair, golden eyes, beautiful eyes, detail, flower meadow, cumulonimbus clouds, lighting, detailed sky, garden

I think the V4.5 version better though, it's in this repo. feel free 2 try it

","type":"Checkpoint","poi":false,"nsfw":false,"allowNoCredit":true,"allowCommercialUse":["Image","RentCivit","Rent","Sell"],"allowDerivatives":true,"allowDifferentLicense":true,"stats":{"downloadCount":42458,"favoriteCount":4587,"commentCount":26,"ratingCount":447,"rating":4.75,"tippedAmountCount":19971},"creator":{"username":"civitai","image":null},"tags":["anime","anythingv4"],"modelVersions":[{"id":5581,"modelId":4855,"name":"v4.5","createdAt":"2023-01-20T01:02:12.229Z","updatedAt":"2023-01-28T15:48:51.968Z","status":"Published","publishedAt":"2023-01-28T15:48:51.968Z","trainedWords":[],"trainingStatus":null,"trainingDetails":null,"baseModel":"SD 1.5","baseModelType":"Standard","earlyAccessTimeFrame":0,"description":null,"vaeId":null,"stats":{"downloadCount":42460,"ratingCount":447,"rating":4.75},"files":[{"id":5771,"sizeKB":7523103.314453125,"name":"anythingelseV4_v45.ckpt","type":"Model","metadata":{"fp":"fp16","size":"full","format":"PickleTensor"},"pickleScanResult":"Success","pickleScanMessage":"Detected Pickle imports (3)\n\ntorch.FloatStorage\ntorch._utils._rebuild_tensor_v2\ncollections.OrderedDict\n","virusScanResult":"Success","virusScanMessage":null,"scannedAt":"2023-01-21T02:01:15.288Z","hashes":{"AutoV1":"6030DABE","AutoV2":"FBCF965A62","SHA256":"FBCF965A62D9D82E935D3D17E97522C29F44550AA9E120A6886F19B578521EC5","CRC32":"5327CBAB","BLAKE3":"E9E08F98BF19B1F95736F6813D2838C98087C6965014144F8B9F19AEDAF70249"},"downloadUrl":"https://civitai.com/api/download/models/5581?type=Model&format=PickleTensor&size=full&fp=fp16"},{"id":5767,"sizeKB":4165358.732421875,"name":"anythingelseV4_v45.ckpt","type":"Pruned Model","metadata":{"fp":"fp16","size":"pruned","format":"PickleTensor"},"pickleScanResult":"Success","pickleScanMessage":"Detected Pickle imports (3)\n\ncollections.OrderedDict\ntorch.FloatStorage\ntorch._utils._rebuild_tensor_v2\n","virusScanResult":"Success","virusScanMessage":null,"scannedAt":"2023-01-20T02:01:58.009Z","hashes":{"AutoV1":"65745D25","AutoV2":"E4B17CE185","SHA256":"E4B17CE185857A3A20D778EFB5222F32DFB65B89F258B29014A5659D319CB4BD","CRC32":"3336E596","BLAKE3":"3B2C6A50569B0D27478F3B81A27AE09820DA907E56D7762D6DC998A0AD6E8F11"},"downloadUrl":"https://civitai.com/api/download/models/5581?type=Pruned%20Model&format=PickleTensor&size=pruned&fp=fp16"},{"id":5770,"sizeKB":7522729.383789062,"name":"anythingelseV4_v45.safetensors","type":"Model","metadata":{"fp":"fp16","size":"full","format":"SafeTensor"},"pickleScanResult":"Success","pickleScanMessage":"No Pickle imports","virusScanResult":"Success","virusScanMessage":null,"scannedAt":"2023-01-21T02:12:03.748Z","hashes":{"AutoV1":"9E3128CD","AutoV2":"1D1E459F9F","SHA256":"1D1E459F9F549A404746390DE21DF33B8C8134F863B3B5DA7D784843E782900A","CRC32":"CDD24AFF","BLAKE3":"C9797B7AC78C5EF5CD320E1B318941D4AFD97C652C37B5F8701C99F462AC1CD5"},"downloadUrl":"https://civitai.com/api/download/models/5581?type=Model&format=SafeTensor&size=full&fp=fp16"},{"id":5768,"sizeKB":4165133.515625,"name":"anythingelseV4_v45.safetensors","type":"Pruned Model","metadata":{"fp":"fp16","size":"pruned","format":"SafeTensor"},"pickleScanResult":"Success","pickleScanMessage":"No Pickle imports","virusScanResult":"Success","virusScanMessage":null,"scannedAt":"2023-01-20T01:54:17.623Z","hashes":{"AutoV1":"25A25911","AutoV2":"6E430EB514","SHA256":"6E430EB51421CE5BF18F04E2DBE90B2CAD437311948BE4EF8C33658A73C86B2A","CRC32":"D52E778B","BLAKE3":"A1B25B82307FD01689169AA417969CD85D63054C1A3ABD8CAAFCB03FA7B7C549"},"downloadUrl":"https://civitai.com/api/download/models/5581","primary":true}],"images":[{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/c128dda2-207b-4d6f-0d20-33bb8e3b6d00/width=450/44683.jpeg","nsfw":"None","width":768,"height":1152,"hash":"UeIhKmi^x@R:~pIUbbt7RiE1Rlt5M|t5Rlj?","type":"image","metadata":{"hash":"UeIhKmi^x@R:~pIUbbt7RiE1Rlt5M|t5Rlj?","width":768,"height":1152},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/d350d0d1-90e5-46a6-eab2-d50af8545300/width=450/44691.jpeg","nsfw":"None","width":768,"height":1152,"hash":"UFHL3p00_M?H~VM|OFxZIVI.4.ob00x]IURj","type":"image","metadata":{"hash":"UFHL3p00_M?H~VM|OFxZIVI.4.ob00x]IURj","width":768,"height":1152},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/d43e31b8-3e24-4a68-aafa-5746a32ad700/width=450/44690.jpeg","nsfw":"None","width":768,"height":1152,"hash":"UdIEIdV@xu%M~VR+ogozS1xuWBRjIobGn$sT","type":"image","metadata":{"hash":"UdIEIdV@xu%M~VR+ogozS1xuWBRjIobGn$sT","width":768,"height":1152},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/6f943e09-2d8c-411b-da92-ed8ae5ef5700/width=450/44688.jpeg","nsfw":"None","width":768,"height":1152,"hash":"UMHeOaIVS09v~Xt700WC~qD%s8xZS%t7nlof","type":"image","metadata":{"hash":"UMHeOaIVS09v~Xt700WC~qD%s8xZS%t7nlof","width":768,"height":1152},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/8677f0a3-1a38-4f4a-f07a-b0bfc9fc6700/width=450/44687.jpeg","nsfw":"None","width":768,"height":1152,"hash":"UfJtez9aNZxZ~WjuD%oy-;WCxaWCRkn%jboL","type":"image","metadata":{"hash":"UfJtez9aNZxZ~WjuD%oy-;WCxaWCRkn%jboL","width":768,"height":1152},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/e174616a-3339-42bc-5d89-47d690a94400/width=450/44686.jpeg","nsfw":"None","width":768,"height":1152,"hash":"UNIq.W00-:Nf_4r=00bb?cxZIUoe.9IUxaRk","type":"image","metadata":{"hash":"UNIq.W00-:Nf_4r=00bb?cxZIUoe.9IUxaRk","width":768,"height":1152},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/318cdfb8-edac-4040-b3e2-d4f6d2b4b600/width=450/44685.jpeg","nsfw":"None","width":768,"height":1152,"hash":"UHI4^l4;kVbc~q?H00oc^*-p9ER%o}bI={M{","type":"image","metadata":{"hash":"UHI4^l4;kVbc~q?H00oc^*-p9ER%o}bI={M{","width":768,"height":1152},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/592a19d5-cdd6-487b-a1bd-dc55fa36d100/width=450/44684.jpeg","nsfw":"None","width":1408,"height":896,"hash":"USEy_EI9RPNKT5nyjXs;9FRjt5oMMcx@S6WV","type":"image","metadata":{"hash":"USEy_EI9RPNKT5nyjXs;9FRjt5oMMcx@S6WV","width":1408,"height":896},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/1e005dba-0af8-4eaf-df03-3e7a7d739700/width=450/50611.jpeg","nsfw":"None","width":512,"height":512,"hash":"UBJ8Ca4o00%M0LRj0L~pVrIpwb4.yDMx_3aK","type":"image","metadata":{"hash":"UBJ8Ca4o00%M0LRj0L~pVrIpwb4.yDMx_3aK","width":512,"height":512},"availability":"Public"},{"url":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/5264da30-df11-4a08-abfc-ee90f29bea00/width=450/50610.jpeg","nsfw":"None","width":512,"height":512,"hash":"UBKw,{9G00ITkWxu4;_N9EE1sk4nNe0K?aWU","type":"image","metadata":{"hash":"UBKw,{9G00ITkWxu4;_N9EE1sk4nNe0K?aWU","width":512,"height":512},"availability":"Public"}],"downloadUrl":"https://civitai.com/api/download/models/5581"}]}

What platforms do you use to access the site?

Windows

What browsers do you use to access the site?

No response

Additional information, context and logs

No response

tadams0 commented 8 months ago

As far as I can tell this change was introduced in commit 94034cd with the change to remove the 'meta' include in the model.controller.ts in getModelsWithVersionsHandler.

You can still get the meta data from the images api, but it is a bit tricky to link the data coming out of there with the images returned from the model api. The meta data did tend to bloat the model responses, but I would like an easier way to restore the data if possible. Hopefully we get an official response or clarification.

ivucica commented 2 months ago

It is returned in the /model-versions/ as well, not just the images API.

Doesn't completely simplify fixing my local Civitai Shortcuts extension (since it insists on having the model versions in a single .civitai.info), but it makes it feasible. It'll needlessly increase the number of calls to the API, of course; it'd be nicer if include=meta or similar were available, as a get argument, on the /models/ endpoint too.