Comments (4)
It will use the hash to query Civitai's API and use whatever civitai gives it. Currently the update will fail if the id does not match the current id in stored [model_name].civitai.info.
Stable-Diffusion-Webui-Civitai-Helper/scripts/ch_lib/model.py
Lines 127 to 132 in cff0903
from stable-diffusion-webui-civitai-helper.
Another bug found. It uses the version id I think or maybe modelid to get the JSON data. Not good as sometimes models are removed and then re-uploaded. So the model id changes but the SHA256 hasn't. So maybe check using first the version id and then the AutoV2 if version id json fails. The reason for both, is because for some unknown reason people can upload the exact same files, so you may have multiple models may have files with the same AutoV2 value. Not sure how the API treats this.
from stable-diffusion-webui-civitai-helper.
I lost a lot of data with this. I should've backed up. A mistake on my behalf.
I apologize for this. A scenario where a model has been deleted completely slipped my mind.
Finally not an issue. I thought you might end up merging the data into the json file and thus not needing the info file.
As you can already see with this issue, changing the underlying files can have unforeseen circumstances that I am at high-risk for not considering, so this is not something I'm looking to undertake at the moment. Just off the top of my head, I'd have to consider scenarios where the user already has working JSON, but the model itself was removed from Civitai, so if I forgot to consider that scenario, the user could end up with data that worked previously, but no longer does after a re-scan, just like it did here.
It uses the version id I think or maybe modelid to get the JSON data. Not good as sometimes models are removed and then re-uploaded.
We calculate the hash and then send the hash to Civitai's API, which gives us a model id / version id. There really isn't a way to compare a file against multiple entries in the API. I've written in a check so that if we already have a model id from a previous scan, new data with a mismatched model id will not overwrite old data (tho mismatched version ids are not considered.)
from stable-diffusion-webui-civitai-helper.
No problem. This is all for free, so I am very grateful.
`We calculate the hash and then send the hash to Civitai's API, which gives us a model id / version id. There really isn't a way to compare a file against multiple entries in the API. I've written in a check so that if we already have a model id from a previous scan, new data with a mismatched model id will not overwrite old data (tho mismatched version ids are not considered.)
Ignore the second post, it's a mess and wrong.
I was wondering how do you update? What happens when you downloaded the info file, but the model gets removed and then re-uploaded. Do you check using the saved id or save hash? That's it. Not sure how one would handle that. Because the old info file might be more useful than the re-upload.
from stable-diffusion-webui-civitai-helper.
Related Issues (20)
- Feature request: Integrate with PNG Info tab to translate civitai model numbers of extra networks into lora names
- Oversized button in extra networks
- Scan Models for Civitai: finds older version of model when duplicate versions exist on Civitai HOT 1
- Handling non-standard ss_tag_frequency properties. HOT 3
- Repeatedly adding the same example jpgs using Replace Old Metadata Formats option. HOT 1
- DoRA Support HOT 1
- Bug: All downloads fail
- Extra Networks Directory update breaks UI elements HOT 1
- Batch Download error HOT 4
- NSFW filter isn't working HOT 4
- [Bug] Civitai API NSFW Changes HOT 6
- Only the latest version of a model can be selected. HOT 3
- download function niot working HOT 3
- bug Cant download models or get info HOT 1
- If the model is archived, an error occurs HOT 9
- Checkpoint update fails with majicMix and others HOT 3
- Potential enhancement: collect downloaded model info before checking for updates HOT 1
- [BUG] The problem with the "Scan Models for Civitai" module for models that are not in Civitai HOT 1
- Save previews as jpeg instead of as png? HOT 3
- Specific model returning 404 Not Found (but model exists) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion-webui-civitai-helper.