mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
some small bug fixed
This commit is contained in:
parent
34749d9d6a
commit
98db8862b5
2
client/demo/dist/index.js
vendored
2
client/demo/dist/index.js
vendored
File diff suppressed because one or more lines are too long
2640
client/demo/dist/index.js.LICENSE.txt
vendored
2640
client/demo/dist/index.js.LICENSE.txt
vendored
File diff suppressed because it is too large
Load Diff
@ -238,6 +238,7 @@ export const useModelSettingArea = (): ServerSettingState => {
|
||||
const onOnnxExecutionProviderChanged = async (val: OnnxExecutionProvider) => {
|
||||
appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, onnxExecutionProvider: val })
|
||||
}
|
||||
console.log("setting", appState.serverSetting.serverSetting)
|
||||
return (
|
||||
<div className="body-row split-3-7 left-padding-1">
|
||||
<div className="body-item-title left-padding-2">OnnxExecutionProvider</div>
|
||||
|
4
client/lib/package-lock.json
generated
4
client/lib/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.76",
|
||||
"version": "1.0.77",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.76",
|
||||
"version": "1.0.77",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.76",
|
||||
"version": "1.0.77",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"directories": {
|
||||
|
@ -91,6 +91,11 @@ export const useServerSetting = (props: UseServerSettingProps): ServerSettingSta
|
||||
const new_v = setting[k]
|
||||
if (cur_v != new_v) {
|
||||
const res = await props.voiceChangerClient.updateServerSettings(k, "" + new_v)
|
||||
if (res.onnxExecutionProviders.length > 0) {
|
||||
res.onnxExecutionProvider = res.onnxExecutionProviders[0]
|
||||
} else {
|
||||
res.onnxExecutionProvider = "CPUExecutionProvider"
|
||||
}
|
||||
|
||||
setServerSetting(res)
|
||||
const storeData = { ...res }
|
||||
|
@ -59,7 +59,7 @@ export const fileSelectorAsDataURL = async (regex: string) => {
|
||||
|
||||
export const validateUrl = (url: string) => {
|
||||
|
||||
if (url.endsWith("/")) {
|
||||
if (url?.endsWith("/")) {
|
||||
return url.substring(0, url.length - 1)
|
||||
}
|
||||
return url
|
||||
|
@ -205,7 +205,7 @@ class VoiceChanger():
|
||||
def get_info(self):
|
||||
data = asdict(self.settings)
|
||||
|
||||
data["onnxExecutionProvider"] = self.onnx_session.get_providers() if self.onnx_session != None else []
|
||||
data["onnxExecutionProviders"] = self.onnx_session.get_providers() if self.onnx_session != None else []
|
||||
files = ["configFile", "pyTorchModelFile", "onnxModelFile"]
|
||||
for f in files:
|
||||
if data[f] != None and os.path.exists(data[f]):
|
||||
|
Loading…
Reference in New Issue
Block a user