nextcloud / text2image_stablediffusion

2 stars 1 forks source link

Failure to unpack models tarball correctly #6

Open sergiupapuc opened 6 months ago

sergiupapuc commented 6 months ago

[text2image_stablediffusion] Warning: Stable diffusion process failed with exit code "1": /var/www/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:24 __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer, options); ^

Error: Load model from /var/www/nextcloud/apps/text2image_stablediffusion/src/../models/stable-diffusion-xl/text_encoder/model.onnx failed:Load model /var/www/nextcloud/apps/text2image_stablediffusion/src/../models/stable-diffusion-xl/text_encoder/model.onnx failed. File doesn't exist at new OnnxruntimeSessionHandler (/var/www/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:24:92) at /var/www/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:64:29 at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v18.12.1

from ? by -- at 21 dec. 2023, 08:55:09
manumitted commented 5 months ago

I get the same thing.

After some thought, maybe this is related to the other issue listed, regarding unpacking the model.

I just installed this all yesterday after upgrading Nextcloud to 28.0.2.

sbe-arg commented 3 months ago

same thing on 28 but not on 27 both instances installed fresh

sthag commented 3 months ago

I also seem to have this issue. I think I also installed the app after upgrading to version 28. Nextcloud log is telling:

{
    "reqId": "<id-replaced>",
    "level": 2,
    "time": "2024-04-02T16:40:03+00:00",
    "remoteAddr": "",
    "user": "--",
    "app": "text2image_stablediffusion",
    "method": "",
    "url": "--",
    "message": "Stable diffusion process failed with exit code \"1\": /path/to/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:24
\n            __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, \"f\").loadModel(pathOrBuffer, options);
\n                                                                                           ^

\n\nError: Load model from /path/to/nextcloud/apps/text2image_stablediffusion/src/../models/stable-diffusion-xl/text_encoder/model.onnx failed:Load model /path/to/nextcloud/apps/text2image_stablediffusion/src/../models/stable-diffusion-xl/text_encoder/model.onnx failed. File doesn't exist
\n    at new OnnxruntimeSessionHandler (/path/to/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:24:92)
\n    at /path/to/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:64:29
\n    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

\n\nNode.js v18.12.1
\n",
    "userAgent": "--",
    "version": "28.0.4.1",
    "data": {
        "app": "text2image_stablediffusion"
    }
}

Looking at the folder models/stable-diffusion-xl/ there is no subfolder /text_encoder so the error .//text_encoder/model.onnx failed. File doesn't exist is correct. There are three folders inside:

Maybe the title of the issue should be changed as the error is quite specific.

DaphneMuller commented 3 months ago

@marcelklehr can you provide an effort estimate for fixing this issue? It's among our top voted issues of our team's apps so I want to see if we can schedule it. or do you think it will be solved by migrating the app to the external app ecosystem?

marcelklehr commented 3 months ago

@DaphneMuller Yes, this would be fixed by moving the app to the External App Ecosystem. The underlying issue here is a failure during unzipping of the models zip archive, which is due to a bug in a dependency of nextcloud. Moving to docker will circumvent all of this.

steffaaannnn commented 1 month ago

i have the same problem

Debian 11.9 Nextcloud 28.0.2 Local Image Generation withe stable diffusion 1.0.2

and when i make

occ text2image_stablediffusion:download-models

download suces

[text2image_stablediffusion] Avertissement: Stable diffusion process failed with exit code "1": /var/www/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:24 __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer, options); ^

Error: Load model from /var/www/nextcloud/apps/text2image_stablediffusion/src/../models/stable-diffusion-xl/text_encoder/model.onnx failed:Load model /var/www/nextcloud/apps/text2image_stablediffusion/src/../models/stable-diffusion-xl/text_encoder/model.onnx failed. File doesn't exist at new OnnxruntimeSessionHandler (/var/www/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:24:92) at /var/www/nextcloud/apps/text2image_stablediffusion/node_modules/onnxruntime-node/dist/backend.js:64:29 at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

rgischig commented 1 month ago

Hi Guys, Is there a way to manually download and unpack the model and place the files into the right place? I really like to test this on my system many thanks

DrRSatzteil commented 1 month ago

I cloned the hugging face repo in my addons folder but it did not work either. Got a different error message when I tried to use it. I didn't bother to dig any deeper from there...

sbe-arg commented 1 month ago

Hi Guys, Is there a way to manually download and unpack the model and place the files into the right place? I really like to test this on my system many thanks

https://github.com/nextcloud/text2image_stablediffusion/issues/5#issuecomment-2026626730