IAHispano / Applio

A simple, high-quality voice conversion tool focused on ease of use and performance
https://applio.org
MIT License
1.82k stars 293 forks source link

[Bug]: JSONDecodeError when trying to do inference #767

Closed MarcoFederici1999 closed 1 month ago

MarcoFederici1999 commented 1 month ago

Project Version

3.2.6

Platform and OS Version

Windows 11 23H2

Affected Devices

All

Existing Issues

39

What happened?

Applio returned the error below.

_json.decoder.JSONDecodeError: Expecting valuC: line 1 column 1 (char 0)_

Steps to reproduce

  1. Start Applio.
  2. Upload an audio file and choose the model and index.
  3. Start the inference.

Expected behavior

The completion of the inference process.

Attachments

Traceback (most recent call last):
  File "C:\RVC\3.2.6\env\lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "C:\RVC\3.2.6\env\lib\site-packages\gradio\route_utils.py", line 321, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\RVC\3.2.6\env\lib\site-packages\gradio\blocks.py", line 1935, in process_api
    result = await self.call_function(
  File "C:\RVC\3.2.6\env\lib\site-packages\gradio\blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # typC: ignore
  File "C:\RVC\3.2.6\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "C:\RVC\3.2.6\env\lib\site-packages\anyio\_backends\_asyncio.py", line 2405, in run_sync_in_worker_thread
    return await future
  File "C:\RVC\3.2.6\env\lib\site-packages\anyio\_backends\_asyncio.py", line 914, in run
    result = context.run(func, *args)
  File "C:\RVC\3.2.6\env\lib\site-packages\gradio\utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
  File "C:\RVC\3.2.6\core.py", line 114, in run_infer_script
    infer_pipeline = import_voice_converter()
  File "C:\RVC\3.2.6\core.py", line 39, in import_voice_converter
    from rvc.infer.infer import VoiceConverter
  File "C:\RVC\3.2.6\rvc\infer\infer.py", line 26, in <module>
    from audio_upscaler import upscale
  File "C:\RVC\3.2.6\env\lib\site-packages\audio_upscaler\__init__.py", line 1, in <module>
    from .predict import upscale
  File "C:\RVC\3.2.6\env\lib\site-packages\audio_upscaler\predict.py", line 10, in <module>
    from .pipeline import build_model, super_resolution
  File "C:\RVC\3.2.6\env\lib\site-packages\audio_upscaler\pipeline.py", line 10, in <module>
    from audio_upscaler.latent_diffusion.models.ddpm import LatentDiffusion
  File "C:\RVC\3.2.6\env\lib\site-packages\audio_upscaler\latent_diffusion\models\ddpm.py", line 12, in <module>
    from audio_upscaler.latent_diffusion.modules.encoders.modules import *
  File "C:\RVC\3.2.6\env\lib\site-packages\audio_upscaler\latent_diffusion\modules\encoders\modules.py", line 5, in <module>
    from audio_upscaler.clap.training.data import get_audio_features
  File "C:\RVC\3.2.6\env\lib\site-packages\audio_upscaler\clap\training\data.py", line 41, in <module>
    tokenize = RobertaTokenizer.from_pretrained("roberta-base")
  File "C:\RVC\3.2.6\env\lib\site-packages\transformers\tokenization_utils_base.py", line 2210, in from_pretrained
    tokenizer_config = json.load(reader)
  File "C:\RVC\3.2.6\env\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\RVC\3.2.6\env\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\RVC\3.2.6\env\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\RVC\3.2.6\env\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting valuC: line 1 column 1 (char 0)

Additional Information

blaisewf commented 1 month ago

disable upscale option

MarcoFederici1999 commented 1 month ago

disable upscale option

The upscaler was and is disabled, yet Applio tries to interact with it nonetheless.

AznamirWoW commented 1 month ago

Additional Information I'm using the latest version of Python (3.12.6).

Yeah.. about that. Use 3.10

MarcoFederici1999 commented 1 month ago

Additional Information I'm using the latest version of Python (3.12.6).

Yeah.. about that. Use 3.10

I switched to 3.10 as you suggested but I still get the error.

blaisewf commented 1 month ago

could you try with the compiled version?

AznamirWoW commented 1 month ago

Since the error happens from the simple import (regardless whether upscale is used or not), the likely issue is an actually damaged model config.

Try looking for "models--roberta-base" folder under C:\users\xxxx\.cache\huggingface\hub and deleting it.

MarcoFederici1999 commented 1 month ago

Since the error happens from the simple import (regardless whether upscale is used or not), the likely issue is an actually damaged model config.

Try looking for "models--roberta-base" folder under C:\users\xxxx.cache\huggingface\hub and deleting it.

Yes, apparently this was the issue, I'm not really sure what caused it to be damaged though.