Fix reloading of tasks with no file path

In some conditions tasks may be reloaded with an empty file path (e.g. no face correction)
This commit is contained in:
patriceac 2023-02-14 02:31:13 -08:00 committed by GitHub
parent fa205f483a
commit 9799309db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,6 +375,10 @@ function readUI() {
}
function getModelPath(filename, extensions)
{
if (filename === null) {
return
}
let pathIdx
if (filename.includes('/models/stable-diffusion/')) {
pathIdx = filename.indexOf('/models/stable-diffusion/') + 25 // Linux, Mac paths