civitai / civitai-link-desktop

Manage your Civitai models for your Stable Diffusion Web UI models folder
17 stars 8 forks source link

Loading models process gets stuck #59

Open fcolecumberri opened 2 months ago

fcolecumberri commented 2 months ago

My system:

16:56:36.384 › App ready: {
  version: '1.20.2',
  platform: 'linux',
  platformVersion: '6.9.9-zen1-1-zen',
  arch: 'x64'
}

This is related to https://github.com/civitai/civitai-link-desktop/issues/58 in the sense that there is no progress in hours. The Files tab says I only have 553 models (by far, way less than what I have). It's showing me no Lora (except for a few I downloaded with the app). Also no LyCORIS, etc.

fcolecumberri commented 2 months ago

Ok, I managed to make this works by changing:

  try {
    const { modelHash, metadata } = await pool.exec('processTask', [pathname]);

for

  try {
    if(!pathname.endsWith(".safetensors")){
      new Error(`${pathname} is not a safetensors file`);
    }
    const { modelHash, metadata } = await pool.exec('processTask', [pathname]);

In https://github.com/civitai/civitai-link-desktop/blob/main/src/main/folder-watcher.ts

However I am not going to make a PR since I don't know if this is the best way to handle this (I almost never touches js and this is my first time ever to touch an electron code, I am more like a C++/Python dev, I have no idea if this is the way to do stuff).