w-okada / voice-changer

リアルタイムボイスチェンジャー Realtime Voice Changer
Other
16.65k stars 1.81k forks source link

'HParams' object has no attribute 'c_dim' #248

Closed 7est closed 1 year ago

7est commented 1 year ago

When I try to upload my sovits4.0v2 model, it shows the error like below:

ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 407, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 78, in call File "engineio\async_drivers\asgi.py", line 67, in call File "fastapi\applications.py", line 270, in call File "starlette\applications.py", line 124, in call File "starlette\middleware\errors.py", line 184, in call File "starlette\middleware\errors.py", line 162, in call File "starlette\middleware\cors.py", line 92, in call File "starlette\middleware\cors.py", line 147, in simple_response File "starlette\middleware\exceptions.py", line 79, in call File "starlette\middleware\exceptions.py", line 68, in call File "fastapi\middleware\asyncexitstack.py", line 21, in call File "fastapi\middleware\asyncexitstack.py", line 18, in call File "starlette\routing.py", line 706, in call File "starlette\routing.py", line 276, in handle File "starlette\routing.py", line 66, in app File "fastapi\routing.py", line 235, in app File "fastapi\routing.py", line 163, in run_endpoint_function File "starlette\concurrency.py", line 41, in run_in_threadpool File "anyio\to_thread.py", line 31, in run_sync File "anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread File "anyio_backends_asyncio.py", line 867, in run File "restapi\MMVC_Rest_Fileuploader.py", line 69, in post_load_model File "voice_changer\VoiceChangerManager.py", line 14, in loadModel File "voice_changer\VoiceChanger.py", line 84, in loadModel File "voice_changer\SoVitsSvc40v2\SoVitsSvc40v2.py", line 109, in loadModel File "F:\MMVCServerSIO\MMVCServerSIOBak\so-vits-svc-40v2\models.py", line 857, in init hps.data.c_dim, AttributeError: 'HParams' object has no attribute 'c_dim'

w-okada commented 1 year ago

The most likely cause is using the wrong file. Please chekc.

w-okada commented 1 year ago

OK? close.

7est commented 1 year ago

OK? close.

ご返信ありがとうございます。

Sure, I have dealt with it.

wzh7 commented 1 year ago

i meet the same problem,do you know how to import models correctly?

mhmtemnacr commented 1 year ago

How did you manage to solve?

7est commented 1 year ago

Use the so-vits-svc-40v2 that voice-changer provides to train the model again.