Giter VIP home page Giter VIP logo

Comments (14)

butaixianran avatar butaixianran commented on September 10, 2024 3

Hi, there are only 2 ways to get a model version from civitai: by hash or by id.

I'll add some buttons to force a model link to civitai with id. Not today though.

from stable-diffusion-webui-civitai-helper.

hempires47 avatar hempires47 commented on September 10, 2024 1

+1 for the search by ID button as I also pruned my files changing their hashes lol

no rush though, this is so helpful! thanks

from stable-diffusion-webui-civitai-helper.

butaixianran avatar butaixianran commented on September 10, 2024 1

This is done, update your version

from stable-diffusion-webui-civitai-helper.

butaixianran avatar butaixianran commented on September 10, 2024 1

I'll close this issue for now, since it is finished. If you don't think it is finished you can reply and reopen this issue.

from stable-diffusion-webui-civitai-helper.

geomorf128 avatar geomorf128 commented on September 10, 2024

Civitai Helper: Can not find model info file: C:\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\Stable-diffusion\madvision_v2.civitai.info
Civitai Helper: Failed to get model info for ckp madvision_v2
Civitai Helper: Start open_model_url
Civitai Helper: Start parse js msg
Civitai Helper: End parse js msg
Civitai Helper: Can not find model info file: C:\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\Stable-diffusion\beautyMix_v20.civitai.info
Civitai Helper: Failed to get model info for ckp beautyMix_v20
Civitai Helper: Start open_model_url
Civitai Helper: Start parse js msg
Civitai Helper: End parse js msg
Civitai Helper: Can not find model info file: C:\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\Stable-diffusion\beautyMixV1_v10.civitai.info
Civitai Helper: Failed to get model info for ckp beautyMixV1_v10
and etc. all model

from stable-diffusion-webui-civitai-helper.

Nacurutu avatar Nacurutu commented on September 10, 2024

Hi, there are only 2 ways to get a model version from civitai: by hash or by id.

I'll add some buttons to force a model link to civitai with id. Not today though.

Thanks a lot for that, waiting for this update...

No rush, take your time...

from stable-diffusion-webui-civitai-helper.

Nacurutu avatar Nacurutu commented on September 10, 2024

Hi, thank you for the update, may I ask, is there a way to compare the file name of the model with the one in Civitai?

For example, if my model is Model1.safetensor to look for Model1 in the civitai database and then scrap the info of that model automatically?

from stable-diffusion-webui-civitai-helper.

Nacurutu avatar Nacurutu commented on September 10, 2024

As i dnt know anything about coding, I asked bing if he can help to achieve that. Bing's response:


Sure, I can help you with that. To compare file names in JavaScript, you can use the path module to parse out just the base name (without extension or path) and then compare them using the === operator1. For example:

const path = require('path');
function compareFileNames(f1, f2) {
  let name1 = path.parse(f1).name;
  let name2 = path.parse(f2).name;
  return name1 === name2;
}

To look for the name of a file in the Civitai database, you can use the GET /models endpoint of the Civitai API2. This will return a list of models with their names and other properties. For example:

const axios = require('axios');
async function getModels() {
  try {
    let response = await axios.get('https://api.civitai.com/models');
    return response.data;
  } catch (error) {
    console.error(error);
  }
}

To combine these two functions, you can loop through the list of models and call the compareFileNames function for each model name and your local file name. For example:

const fs = require('fs');
async function findMatchingModel(localFileName) {
  let models = await getModels();
  for (let model of models) {
    if (compareFileNames(model.name, localFileName)) {
      return model;
    }
  }
  return null;
}

This function will return the matching model object if found, or null otherwise.


I don't know if this can help to look for the file's name and compare them with the ones we have in the disk.

To improve the Auto Scan option.

from stable-diffusion-webui-civitai-helper.

butaixianran avatar butaixianran commented on September 10, 2024

when you search a model on Civitai, you are searching the model name, which is the title of the model page, not the file name.

so, use your file name as a search keyword won't get the right result. Also user could change file name to anything they want.

from stable-diffusion-webui-civitai-helper.

Nacurutu avatar Nacurutu commented on September 10, 2024

Ok, in that case, im doing it manually... made a search on civitai's webpage, look for the model page, copy the URL, and paste it in the URL field...

If I do it that way, the model Is found, but just typing the model's name, nothing happens, get this error.

image

Im going to try again the Autoscan, and let u know if the models information are downloaded.

from stable-diffusion-webui-civitai-helper.

butaixianran avatar butaixianran commented on September 10, 2024

it already told you on UI, fill a url or model id, not a name

from stable-diffusion-webui-civitai-helper.

Nacurutu avatar Nacurutu commented on September 10, 2024

it already told you on UI, fill a url or model id, not a name

The model ID? where do I find that?

Also, Im running the Autoscan.. it is not detecting the models

For example, AllInOnePixelmodel_v1 is in this link:
https://civitai.com/models/34/all-in-one-pixel-model

but the Auto Scan is not detecting it:
(I prunned this model and changed it to safetensor but haven't changed the name of the file)

image

Sorry if I'm not getting what u r trying to explain me.

from stable-diffusion-webui-civitai-helper.

butaixianran avatar butaixianran commented on September 10, 2024

if you can use a model's url, just use it. the number in the url is the id.

document is already told you scan model is finding model by hash, file name doesn't matter.

from stable-diffusion-webui-civitai-helper.

Nacurutu avatar Nacurutu commented on September 10, 2024

Ok, got it.. thanks...

from stable-diffusion-webui-civitai-helper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.