Merge pull request #26 from facefusion/3.0.0

3.0.0
This commit is contained in:
Henry Ruhs
2024-09-21 15:17:45 +02:00
committed by GitHub
9 changed files with 108 additions and 136 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.'
}
},
{
+71 -112
View File
@@ -2,141 +2,100 @@ const path = require('path');
module.exports = async kernel =>
{
const hasInstall = await kernel.exists(__dirname, 'facefusion') && !await kernel.running(__dirname, 'install.js');
const menu = [];
let menu = [];
if (hasInstall)
if (!await kernel.exists(__dirname, 'facefusion', '.git'))
{
if (kernel.running(__dirname, 'start.js'))
menu.push(
{
const memory = kernel.memory.local[path.resolve(__dirname, 'start.js')];
icon: 'fa-solid fa-plug',
text: 'Install',
href: 'install.js',
params:
{
run: true,
fullscreen: true
}
});
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(
return menu;
}
if (!await kernel.running(__dirname, 'run.js') && !await kernel.running(__dirname, 'install.js') && !await kernel.running(__dirname, 'update.js') && !await kernel.running(__dirname, 'reset.js'))
{
[
[ 'fa-solid fa-power-off', 'Run Default', 'Default' ],
[ 'fa-solid fa-gauge', 'Run Benchmark', 'Benchmark' ],
[ 'fa-solid fa-robot', 'Run Jobs', 'Jobs' ],
[ 'fa-solid fa-camera', 'Run Webcam', 'Webcam' ]
]
.forEach(([ icon, text, mode ]) =>
{
menu.push(
{
icon: 'fa-solid fa-rotate',
text: 'Update',
href: 'update.js',
icon,
text,
href: 'run.js',
params:
{
run: true,
fullscreen: true,
mode
}
});
});
}
if (await kernel.running(__dirname, 'run.js'))
{
const memory = await kernel.memory.local[path.resolve(__dirname, 'run.js')];
if (memory && memory.url && memory.mode)
{
menu.push(
{
icon: 'fa-solid fa-rocket',
text: 'UI (' + memory.mode + ')',
href: memory.url,
params:
{
run: true,
fullscreen: true
}
},
});
}
menu.push(
{
icon: 'fa-solid fa-desktop',
text: 'CLI',
href: 'run.js',
params:
{
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
}
run: true,
fullscreen: true
}
]);
});
}
else
{
menu =
[
[ '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.push(
{
icon: 'fa-solid fa-plug',
text: 'Install',
href: 'install.js',
icon,
text,
href,
params:
{
run: true,
fullscreen: true
}
}
];
});
});
}
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'
}
}