mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
no delete exist model
This commit is contained in:
parent
ef89e9aefa
commit
4d3a725d5d
@ -142,18 +142,7 @@ export const useMicrophoneOptions = () => {
|
||||
await clientState.loadModel(serverSetting.configFile, serverSetting.pyTorchModel, serverSetting.onnxModel)
|
||||
setUploadProgress(0)
|
||||
setIsUploading(false)
|
||||
// await clientState.updateSettings(ServerSettingKey.framework, serverSetting.framework)
|
||||
// await clientState.updateSettings(ServerSettingKey.onnxExecutionProvider, serverSetting.onnxExecutionProvider)
|
||||
// await clientState.updateSettings(ServerSettingKey.srcId, speakerSetting.srcId)
|
||||
// await clientState.updateSettings(ServerSettingKey.dstId, speakerSetting.dstId)
|
||||
// await clientState.updateSettings(ServerSettingKey.gpu, convertSetting.gpu)
|
||||
// await clientState.updateSettings(ServerSettingKey.crossFadeOffsetRate, convertSetting.crossFadeOffsetRate)
|
||||
// await clientState.updateSettings(ServerSettingKey.crossFadeEndRate, convertSetting.crossFadeEndRate)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
setLoadModelFunc(loadModel)
|
||||
}, [serverSetting.configFile, serverSetting.pyTorchModel, serverSetting.onnxModel,
|
||||
|
@ -155,7 +155,6 @@ export const useClient = (props: UseClientProps): ClientState => {
|
||||
const uploadFile = useMemo(() => {
|
||||
return async (file: File, onprogress: (progress: number, end: boolean) => void) => {
|
||||
await initializedPromise
|
||||
console.log("uploaded.....")
|
||||
const num = await voiceChangerClientRef.current.uploadFile(file, onprogress)
|
||||
const res = await voiceChangerClientRef.current.concatUploadedFile(file, num)
|
||||
console.log("uploaded", num, res)
|
||||
@ -164,7 +163,6 @@ export const useClient = (props: UseClientProps): ClientState => {
|
||||
|
||||
const loadModel = useMemo(() => {
|
||||
return async (configFile: File, pyTorchModelFile: File | null, onnxModelFile: File | null) => {
|
||||
console.log("load model....")
|
||||
await initializedPromise
|
||||
await voiceChangerClientRef.current.loadModel(configFile, pyTorchModelFile, onnxModelFile)
|
||||
console.log("loaded model")
|
||||
|
@ -68,8 +68,6 @@ class VoiceChanger():
|
||||
**self.hps.model)
|
||||
self.net_g.eval()
|
||||
utils.load_checkpoint(pyTorch_model_file, self.net_g, None)
|
||||
else:
|
||||
self.net_g = None
|
||||
|
||||
# ONNXモデル生成
|
||||
if onnx_model_file != None:
|
||||
@ -79,9 +77,6 @@ class VoiceChanger():
|
||||
onnx_model_file,
|
||||
providers=providers
|
||||
)
|
||||
else:
|
||||
self.onnx_session = None
|
||||
|
||||
|
||||
def destroy(self):
|
||||
if hasattr(self, "net_g"):
|
||||
|
Loading…
Reference in New Issue
Block a user