Early version for 3.0.0

This commit is contained in:
henryruhs
2024-09-21 11:55:19 +02:00
parent 7c2b0778eb
commit debf6d6261
9 changed files with 156 additions and 146 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
FaceFusion Pinokio
==================
> Next generation face swapper and enhancer.
> Industry leading face manipulation platform.
[![Build Status](https://img.shields.io/github/actions/workflow/status/facefusion/facefusion-pinokio/ci.yml.svg?branch=master)](https://github.com/facefusion/facefusion-pinokio/actions?query=workflow:ci)
[![Pinokio](https://img.shields.io/badge/open-pinokio-blue.svg)](https://pinokio.computer/item?uri=https://github.com/facefusion/facefusion-pinokio)
Executable
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

+25 -13
View File
@@ -2,25 +2,25 @@ function install(kernel)
{
const { platform, gpu } = kernel;
if (platform === 'darwin')
{
return 'python install.py --onnxruntime default';
}
if ([ 'linux', 'win32' ].includes(platform) && gpu === 'nvidia')
{
return 'python install.py --onnxruntime cuda-11.8';
}
if (gpu === 'amd')
{
if (platform === 'linux')
{
return 'python install.py --onnxruntime rocm-5.4.2';
return 'python install.py --onnxruntime rocm';
}
if (platform === 'win32')
{
return 'python install.py --onnxruntime directml';
}
}
if (gpu === 'intel')
{
return 'python install.py --onnxruntime openvino';
}
if (gpu === 'nvidia')
{
return 'python install.py --onnxruntime cuda';
}
return 'python install.py --onnxruntime default';
}
@@ -34,7 +34,19 @@ module.exports = async kernel =>
method: 'shell.run',
params:
{
message: 'git clone https://github.com/facefusion/facefusion --branch 2.6.1 --single-branch'
message: 'git clone https://github.com/facefusion/facefusion --branch 3.0.0 --single-branch'
}
},
{
when: '{{ gpu === "intel" }}',
method: 'shell.run',
params:
{
message: 'conda install conda-forge::openvino=2024.3.0 --yes',
conda:
{
name: 'facefusion'
}
}
},
{
@@ -42,7 +54,7 @@ module.exports = async kernel =>
method: 'shell.run',
params:
{
message: 'conda install cudatoolkit=11.8 cudnn=8.9.2.26 conda-forge::gputil=1.4.0 --yes',
message: 'conda install conda-forge::cuda-runtime=12.4.1 cudnn=9.2.1.18 --yes',
conda:
{
name: 'facefusion'
@@ -69,8 +81,8 @@ module.exports = async kernel =>
method: 'input',
params:
{
title: 'Install complete',
description: 'Go back to the dashboard to launch the application.'
title: 'Installation completed',
description: 'Return to the dashboard to start FaceFusion.'
}
},
{
+119 -122
View File
@@ -2,129 +2,9 @@ const path = require('path');
module.exports = async kernel =>
{
const hasInstall = await kernel.exists(__dirname, 'facefusion') && !await kernel.running(__dirname, 'install.js');
let menu = [];
if (hasInstall)
if (!kernel.exists(__dirname, 'facefusion'))
{
if (kernel.running(__dirname, 'start.js'))
{
const memory = kernel.memory.local[path.resolve(__dirname, 'start.js')];
if (memory && memory.url && memory.mode)
{
menu =
[
{
icon: 'fa-solid fa-rocket',
text: 'Open session',
href: memory.url,
target: '_blank'
},
{
icon: 'fa-solid fa-desktop',
text: 'Server (' + memory.mode + ')',
href: 'start.js',
params:
{
fullscreen: true
}
}
];
}
else
{
menu =
[
{
icon: 'fa-solid fa-desktop',
text: 'Server',
href: 'start.js',
params:
{
fullscreen: true
}
}
];
}
}
else
{
menu =
[
{
icon: 'fa-solid fa-power-off',
text: 'Launch default',
href: 'start.js',
params:
{
run: true,
fullscreen: true,
mode: 'Default'
}
},
{
icon: 'fa-solid fa-gauge',
text: 'Launch benchmark',
href: 'start.js',
params:
{
run: true,
fullscreen: true,
mode: 'Benchmark'
}
},
{
icon: 'fa-solid fa-camera',
text: 'Launch webcam',
href: 'start.js',
params:
{
run: true,
fullscreen: true,
mode: 'Webcam'
}
}
];
}
menu = menu.concat(
[
{
icon: 'fa-solid fa-rotate',
text: 'Update',
href: 'update.js',
params:
{
run: true,
fullscreen: true
}
},
{
icon: 'fa-solid fa-plug',
text: 'Install',
href: 'install.js',
params:
{
run: true,
fullscreen: true
}
},
{
icon: 'fa-regular fa-circle-xmark',
text: 'Reset',
href: 'reset.js',
params:
{
run: true,
fullscreen: true
}
}
]);
}
else
{
menu =
const menu =
[
{
icon: 'fa-solid fa-plug',
@@ -137,6 +17,123 @@ module.exports = async kernel =>
}
}
];
return menu;
}
[
[ 'Installing', 'install.js' ],
[ 'Updating', 'update.js' ],
[ 'Resetting', 'reset.js' ]
]
.forEach(([ text, href ]) =>
{
if (kernel.running(__dirname, script))
{
const menu =
[
{
icon: 'fa-solid fa-spinner',
text,
href,
params:
{
run: true,
fullscreen: true
}
}
];
return menu;
}
});
const menu = [];
if (kernel.running(__dirname, 'start.js'))
{
const start_path = path.resolve(__dirname, 'start.js');
const memory = kernel.memory.local[start_path];
if (memory && memory.url && memory.mode)
{
menu.concat(
[
{
icon: 'fa-solid fa-rocket',
text: 'Open Session',
href: memory.url
},
{
icon: 'fa-solid fa-desktop',
text: 'Server (' + memory.mode + ')',
href: 'start.js',
params:
{
fullscreen: true
}
}
]);
}
else
{
menu.concat(
[
{
icon: 'fa-solid fa-desktop',
text: 'Server',
href: 'start.js',
params:
{
fullscreen: true
}
}
]);
}
}
[
[ 'fa-solid fa-plug', 'Install', 'install.js' ],
[ 'fa-solid fa-rotate', 'Update', 'update.js' ],
[ 'fa-regular fa-circle-xmark', 'Reset', 'reset.js' ]
]
.forEach(([ icon, text, href ]) =>
{
menu.concat(
[
{
icon,
text,
href,
params:
{
run: true,
fullscreen: true
}
}
]);
});
[
[ 'fa-solid fa-power-off', 'Launch Default', 'Default' ],
[ 'fa-solid fa-gauge', 'Launch Benchmark', 'Benchmark' ],
[ 'fa-solid fa-robot', 'Launch Jobs', 'Jobs' ],
[ 'fa-solid fa-camera', 'Launch Webcam', 'Webcam' ]
]
.forEach(([ icon, text, mode ]) =>
{
menu.push({
icon,
text,
href: 'start.js',
params:
{
run: true,
fullscreen: true,
mode
}
});
});
return menu;
};
+3 -3
View File
@@ -1,12 +1,12 @@
{
"name": "facefusion-pinokio",
"description": "Next generation face swapper and enhancer",
"version": "2.6.1",
"description": "Industry leading face manipulation platform",
"version": "3.0.0",
"license": "MIT",
"devDependencies":
{
"@isnotdefined/eslint-config": "9.8.0",
"eslint": "8.56.0"
"eslint": "8.57.1"
},
"scripts":
{
+3 -3
View File
@@ -1,8 +1,8 @@
module.exports =
{
version: '1.5',
title: 'FaceFusion 2.6.1',
description: 'Next generation face swapper and enhancer',
icon: 'icon.png',
title: 'FaceFusion 3.0.0',
description: 'Industry leading face manipulation platform',
icon: 'facefusion.png',
menu: require(__dirname + '/menu.js')
};
+4 -3
View File
@@ -5,9 +5,10 @@ module.exports = () =>
daemon: true,
cmd:
{
Default: 'python run.py',
Benchmark: 'python run.py --ui-layouts benchmark',
Webcam: 'python run.py --ui-layouts webcam'
Default: 'python facefusion.py run',
Benchmark: 'python facefusion.py run --ui-layouts benchmark',
Jobs: 'python facefusion.py run --ui-layouts jobs',
Webcam: 'python facefusion.py run --ui-layouts webcam'
},
run:
[
+1 -1
View File
@@ -23,7 +23,7 @@ module.exports = () =>
method: 'shell.run',
params:
{
message: 'git checkout 2.6.1',
message: 'git checkout 3.0.0',
path: 'facefusion'
}
}