diff --git a/install.js b/install.js index 56b0153..7797b56 100644 --- a/install.js +++ b/install.js @@ -28,19 +28,23 @@ module.exports = async kernel => { const config = { - requires: - [ - { - type: 'conda', - name: - [ - 'ffmpeg' - ], - args: '-c conda-forge' - } - ], run: [ + { + when: '{{ gpu === "nvidia" }}', + method: 'shell.run', + params: + { + message: + [ + 'conda install -y --override-channels cudatoolkit 11.8.0 cudnn 8.4.1.50 -c conda-forge' + ], + conda: + { + name: '{{ gpu === "nvidia" ? "cu118" : "base" }}' + } + } + }, { method: 'shell.run', params: @@ -52,13 +56,17 @@ module.exports = async kernel => method: 'shell.run', params: { + message: install(kernel), + path: 'facefusion', + venv: 'env', env: { PYTHONNOUSERSITE: 'True' }, - message: install(kernel), - path: 'facefusion', - venv: 'env' + conda: + { + name: '{{ gpu === "nvidia" ? "cu118" : "base" }}' + } } }, { @@ -66,7 +74,7 @@ module.exports = async kernel => params: { title: 'Install complete', - description: 'Go back to the dashboard and launch the application.' + description: 'Go back to the dashboard to launch the application.' } }, { diff --git a/pinokio.js b/pinokio.js index 2de1206..3e7361e 100644 --- a/pinokio.js +++ b/pinokio.js @@ -1,6 +1,6 @@ module.exports = { - version: '1', + version: '1.4', title: 'FaceFusion 2.4.0', description: 'Next generation face swapper and enhancer', icon: 'icon.png', diff --git a/start.js b/start.js index 357910c..52fdccd 100644 --- a/start.js +++ b/start.js @@ -15,16 +15,20 @@ module.exports = () => method: 'local.set', params: { - mode: '{{input.mode}}' + mode: '{{ input.mode }}' } }, { method: 'shell.run', params: { - message: '{{self.cmd[local.mode]}}', + message: '{{ self.cmd[local.mode ]}}', path: 'facefusion', venv: 'env', + conda: + { + name: '{{ gpu === "nvidia" ? "cu118" : "base" }}' + }, on: [ { @@ -38,14 +42,14 @@ module.exports = () => method: 'local.set', params: { - url: '{{input.stdout.match(/(http:\\S+)/gi)[0]}}' + url: '{{ input.stdout.match(/(http:\\S+)/gi)[0] }}' } }, { method: 'browser.open', params: { - uri: '{{local.url}}', + uri: '{{ local.url }}', target: '_blank' } }