Add support for Windows path names

This commit is contained in:
patriceac 2023-01-25 02:47:50 -08:00
parent a8fba8f3fb
commit 01368ac496

View File

@ -363,7 +363,7 @@ function readUI() {
}
function getModelPath(filename, extensions)
{
if (filename.includes('/models/stable-diffusion/')) {
if (filename.includes('/models/stable-diffusion/') || filename.includes('\\models\\stable-diffusion\\')) {
let pathIdx = filename.lastIndexOf('/') // Linux, Mac paths
if (pathIdx < 0) {
pathIdx = filename.lastIndexOf('\\') // Windows paths.