-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6a84b53
Showing
10 changed files
with
287 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Ommit the DS_Store folder automatically created by macOS | ||
.DS_Store/ | ||
# Python cache | ||
__pycache__/ | ||
/*/__pycache__/ | ||
/*/*/__pycache__/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# READ2ME | ||
|
||
A pinokio script for <https://huggingface.co/spaces/Wismut/StyleTTS2_Studio> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module.exports = { | ||
run: [ | ||
// Edit this step to customize the git repository to use | ||
{ | ||
method: "shell.run", | ||
params: { | ||
message: [ | ||
"git clone https://huggingface.co/spaces/Wismut/StyleTTS2_Studio app", | ||
] | ||
} | ||
}, | ||
// Delete this step if your project does not use torch | ||
{ | ||
method: "script.start", | ||
params: { | ||
uri: "torch.js", | ||
params: { | ||
venv: "env", // Edit this to customize the venv folder path | ||
path: "app", // Edit this to customize the path to start the shell from | ||
// xformers: true // uncomment this line if your project requires xformers | ||
} | ||
} | ||
}, | ||
// Edit this step with your custom install commands | ||
{ | ||
method: "shell.run", | ||
params: { | ||
venv: "env", // Edit this to customize the venv folder path | ||
path: "app", // Edit this to customize the path to start the shell from | ||
message: [ | ||
"uv run app.py" | ||
] | ||
} | ||
}, | ||
{ | ||
method: "fs.link", | ||
params: { | ||
venv: "app/env" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
const path = require('path') | ||
module.exports = { | ||
version: "0.1", | ||
title: "StyleTTS2 Studio", | ||
description: "Build your own voice for StyleTTS2", | ||
icon: "icon.png", | ||
menu: async (kernel, info) => { | ||
let installed = info.exists("app/env") | ||
let running = { | ||
install: info.running("install.js"), | ||
start: info.running("start.js"), | ||
update: info.running("update.js"), | ||
reset: info.running("reset.js") | ||
} | ||
if (running.install) { | ||
return [{ | ||
default: true, | ||
icon: "fa-solid fa-plug", | ||
text: "Installing", | ||
href: "install.js", | ||
}] | ||
} else if (installed) { | ||
if (running.start) { | ||
let local = info.local("start.js") | ||
if (local && local.url) { | ||
return [{ | ||
default: true, | ||
icon: "fa-solid fa-rocket", | ||
text: "Open Web UI", | ||
href: local.url, | ||
}, { | ||
icon: 'fa-solid fa-terminal', | ||
text: "Terminal", | ||
href: "start.js", | ||
}] | ||
} else { | ||
return [{ | ||
default: true, | ||
icon: 'fa-solid fa-terminal', | ||
text: "Terminal", | ||
href: "start.js", | ||
}] | ||
} | ||
} else if (running.update) { | ||
return [{ | ||
default: true, | ||
icon: 'fa-solid fa-terminal', | ||
text: "Updating", | ||
href: "update.js", | ||
}] | ||
} else if (running.reset) { | ||
return [{ | ||
default: true, | ||
icon: 'fa-solid fa-terminal', | ||
text: "Resetting", | ||
href: "reset.js", | ||
}] | ||
} else { | ||
return [{ | ||
default: true, | ||
icon: "fa-solid fa-power-off", | ||
text: "Start", | ||
href: "start.js", | ||
}, { | ||
icon: "fa-solid fa-dumbbell", | ||
text: "Train", | ||
href: "train.js", | ||
}, { | ||
icon: "fa-solid fa-plug", | ||
text: "Update", | ||
href: "update.js", | ||
}, { | ||
icon: "fa-solid fa-plug", | ||
text: "Install", | ||
href: "install.js", | ||
}, { | ||
icon: "fa-regular fa-circle-xmark", | ||
text: "Reset", | ||
href: "reset.js", | ||
}] | ||
} | ||
} else { | ||
return [{ | ||
default: true, | ||
icon: "fa-solid fa-plug", | ||
text: "Install", | ||
href: "install.js", | ||
}] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"posts": [ | ||
"https://x.com/TommyFalkowski/status/1850254387874283838" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
run: [{ | ||
method: "fs.rm", | ||
params: { | ||
path: "app" | ||
} | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module.exports = { | ||
daemon: true, | ||
run: [ | ||
{ | ||
method: "shell.run", | ||
params: { | ||
venv: "env", // Edit this to customize the venv folder path | ||
env: { | ||
"PYTORCH_ENABLE_MPS_FALLBACK": 1 | ||
}, // Edit this to customize environment variables (see documentation) | ||
path: "app", // Edit this to customize the path to start the shell from | ||
message: [ | ||
"uv run app.py" | ||
], | ||
on: [{ | ||
// The regular expression pattern to monitor. | ||
// When this pattern occurs in the shell terminal, the shell will return, | ||
// and the script will go onto the next step. | ||
"event": "/http:\/\/\\S+/", | ||
|
||
// "done": true will move to the next step while keeping the shell alive. | ||
// "kill": true will move to the next step after killing the shell. | ||
"done": true | ||
}] | ||
} | ||
}, | ||
{ | ||
// This step sets the local variable 'url'. | ||
// This local variable will be used in pinokio.js to display the "Open WebUI" tab when the value is set. | ||
method: "local.set", | ||
params: { | ||
// the input.event is the regular expression match object from the previous step | ||
url: "{{input.event[0]}}" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
module.exports = { | ||
run: [ | ||
// windows nvidia | ||
{ | ||
"when": "{{platform === 'win32' && gpu === 'nvidia'}}", | ||
"method": "shell.run", | ||
"params": { | ||
"venv": "{{args && args.venv ? args.venv : null}}", | ||
"path": "{{args && args.path ? args.path : '.'}}", | ||
"message": "pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu121" | ||
} | ||
}, | ||
// windows amd | ||
{ | ||
"when": "{{platform === 'win32' && gpu === 'amd'}}", | ||
"method": "shell.run", | ||
"params": { | ||
"venv": "{{args && args.venv ? args.venv : null}}", | ||
"path": "{{args && args.path ? args.path : '.'}}", | ||
"message": "pip install torch-directml torchaudio torchvision numpy==1.26.4" | ||
} | ||
}, | ||
// windows cpu | ||
{ | ||
"when": "{{platform === 'win32' && (gpu !== 'nvidia' && gpu !== 'amd')}}", | ||
"method": "shell.run", | ||
"params": { | ||
"venv": "{{args && args.venv ? args.venv : null}}", | ||
"path": "{{args && args.path ? args.path : '.'}}", | ||
"message": "pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1" | ||
} | ||
}, | ||
// mac | ||
{ | ||
"when": "{{platform === 'darwin'}}", | ||
"method": "shell.run", | ||
"params": { | ||
"venv": "{{args && args.venv ? args.venv : null}}", | ||
"path": "{{args && args.path ? args.path : '.'}}", | ||
"message": "pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1" | ||
} | ||
}, | ||
// linux nvidia | ||
{ | ||
"when": "{{platform === 'linux' && gpu === 'nvidia'}}", | ||
"method": "shell.run", | ||
"params": { | ||
"venv": "{{args && args.venv ? args.venv : null}}", | ||
"path": "{{args && args.path ? args.path : '.'}}", | ||
"message": "pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu121" | ||
} | ||
}, | ||
// linux rocm (amd) | ||
{ | ||
"when": "{{platform === 'linux' && gpu === 'amd'}}", | ||
"method": "shell.run", | ||
"params": { | ||
"venv": "{{args && args.venv ? args.venv : null}}", | ||
"path": "{{args && args.path ? args.path : '.'}}", | ||
"message": "pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 --index-url https://download.pytorch.org/whl/rocm6.0" | ||
} | ||
}, | ||
// linux cpu | ||
{ | ||
"when": "{{platform === 'linux' && (gpu !== 'amd' && gpu !=='nvidia')}}", | ||
"method": "shell.run", | ||
"params": { | ||
"venv": "{{args && args.venv ? args.venv : null}}", | ||
"path": "{{args && args.path ? args.path : '.'}}", | ||
"message": "pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 --index-url https://download.pytorch.org/whl/cpu" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = { | ||
run: [{ | ||
method: "shell.run", | ||
params: { | ||
message: "git pull" | ||
} | ||
}, { | ||
method: "shell.run", | ||
params: { | ||
path: "app", | ||
message: "git pull" | ||
} | ||
}, | ||
{ | ||
method: "fs.link", | ||
params: { | ||
venv: "app/env" | ||
} | ||
}] | ||
} |