Open PrometheusDante opened 1 month ago
try pip install fairseq==0.12.2
and let me know if that works
I tried and it installed with no issues. I also updated to your most recent version and loaded your updated workflow file as well. Still get the same error, but at a slightly later node, which might be an improvement or just random.
This is the error:
Error occurred when executing RVCNode:
File "D:\VER_13_AI\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\VER_13_AI\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\VER_13_AI\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "D:\VER_13_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC\custom_nodes\rvc.py", line 68, in convert output_audio = vc_single(hubert_model=hubert_model(),input_audio=input_audio,f0_up_key=f0_up_key,model(),**pitch_extraction_params) File "D:\VER_13_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC\vc_infer_pipeline.py", line 290, in vc_single assert hubert_path is not None
Go to the root folder of Comfy-RVC and run pip install -r requirements.txt
in your terminal. Does that result in any errors?
Does this result in any errors python -c "from fairseq import checkpoint_utils"
?
Reinstalling the requirements through pip install -r requirements.txt
resulted in this error at the end:
And running python -c "from fairseq import checkpoint_utils"
resulted in this error:
D:\VER_13_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC>python -c "from fairseq import checkpoint_utils" Traceback (most recent call last): File "
", line 1, in File "C:\Users\Red Rusty Ruins\AppData\Roaming\Python\Python312\site-packages\fairseq__init__.py", line 20, in from fairseq.distributed import utils as distributed_utils File "C:\Users\Red Rusty Ruins\AppData\Roaming\Python\Python312\site-packages\fairseq\distributed__init.py", line 6, in from .distributed_timeout_wrapper import DistributedTimeoutWrapper File "C:\Users\Red Rusty Ruins\AppData\Roaming\Python\Python312\site-packages\fairseq\distributed\distributed_timeout_wrapper.py", line 11, in init__.py", line 141, infrom torch import nn File "C:\Users\Red Rusty Ruins\AppData\Roaming\Python\Python312\site-packages\torch\ raise err OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\Red Rusty Ruins\AppData\Roaming\Python\Python312\site-packages\torch\lib\shm.dll" or one of its dependencies.
When I then run this however: py -3.10 -m pip install monotonic_align
it doesn't run into an error, this is the result:
D:\VER_13_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC>py -3.10 -m pip install monotonic_align Requirement already satisfied: monotonic_align in c:\users\red rusty ruins\appdata\local\programs\python\python310\lib\site-packages (1.0.0) DEPRECATION: omegaconf 2.0.6 has a non-standard dependency specifier PyYAML>=5.1.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of omegaconf or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
And then reinstalling the requirements the same way with: py -3.10 -m pip install -r requirements.txt
executed like this:
Trying to run the complete-voice-changer workflow resulted in this error: Error occurred when executing RVCNode:
File "D:\VER_13_AI\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\VER_13_AI\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\VER_13_AI\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "D:\VER_13_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC\custom_nodes\rvc.py", line 68, in convert output_audio = vc_single(hubert_model=hubert_model(),input_audio=input_audio,f0_up_key=f0_up_key,model(),**pitch_extraction_params) File "D:\VER_13_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC\vc_infer_pipeline.py", line 290, in vc_single assert hubert_path is not None
But it ran exceptionally fast this time, when you look at the execution time at the bottom of the following console log.
It looks like there is something wrong with your python environment since it's not recognizing fairseq even though you installed it. What's the OS you're using?
If you're using windows, I recommend you install conda: https://docs.anaconda.com/free/miniconda/miniconda-install/
And then try running the conda-start.bat script.
I am on Win11. So I've installed miniconda, but due to my user profile name containing spaces I installed it not for just me but all users to bypass that issue. I had to edit the bat file to reflect that change by changing the fifth line to:
SET INSTALL_DIR=C:\ProgramData\miniconda3
otherwise it didn't run.
Doing so made it run, but it didn't succeed.
When you run your conda-start.bat, you should see this:
Which version of fairseq do you see (should be 0.12.2 like the picture)?
Next, make sure there's a file called "hubert_base.pt" in your ComfyUI/models folder. This should have been automatically downloaded. If you don't see it, you can get that here: https://huggingface.co/datasets/SayanoAI/RVC-Studio/blob/main/hubert_base.pt
The conda file does result in an error, as it's not setup properly, but I don't potentially cause more harm than good, by switching over entirely. In my regular pip installs it already said fairseq==0.12.2
multiple times, it's definitely there.
Something I just noticed is that the models folder is not exactly where it's supposed to be I believe, but one "directory" too high in the order.
See where all the other models are? Your installation newly created a
models
folder one too high up. But manually copying the files to the other folder does not resolve the issue, I tried.
And hubert_base.pt is there, also shows up in the dropdown menu of the Load Hubert Model
node.
Your first screenshot is correct, the model folder should be in the root ComfyUI folder like this:
I'm not sure why you have a second ComfyUI subfolder for your other models. You might have to reinstall your comfyui project... Can you show me what your first ComfyUI folder looks like? It should be something like this:
I think it was because of creating a ComfyUI folder manually and then git cloning ComfyUI from within that folder that resulted in this. But all other nodes work fine despite this. Do you think I could just manually move everything up one step and delete the second folder without too much of a problem? I'll give it a try and backup a copy of it first. I have my models and lora still in the auto1111 folder from when I started and just referenced them in the yaml, so my ComfyUI folder is a lightweight with only 93gb :D
Yeah, that shouldn't be a problem as long as your extra_model_paths yaml is pointing to the right locations.
If your environment is set up correctly then the following code should work for you:
from fairseq import checkpoint_utils
models, _, _ = checkpoint_utils.load_model_ensemble_and_task([path_to_hubert_model],suffix="",)
hubert_model = models[0]
hubert_model.eval()
Turns out all I did was to delete the _windows_portable part of the folder, so it should be the default hierarchy, but might have caused some confusion still, so I renamed it to the default again. Didn't change anything about the error unfortunately.
Where exactly am I supposed to execute that code? I'm fairly at beginner level when it comes to commandline prompting. Sorry for the inconvenience.
I just made a batch file from it and nothing happens when I execute it. That a good thing?
from fairseq import checkpoint_utils
models, _, _ = checkpoint_utils.load_model_ensemble_and_task(["D:\VER_13\_AI\ComfyUI_windows_portable\models\hubert_base.pt"],suffix="",)
hubert_model = models[0]
hubert_model.eval()
Type in python
in your command line terminal and copy the code line by line after pressing
It should look something like this if your environment is working properly:
I get an error on the first line:
I added a safetensors version of the model. Update your repo and change your hubert loader to contentvec like below and it should work:
It did work! ... but only to a degree unfortunately.
simple-ai-voice-changer
provided and default settings. That executed fully and saved the file.
Then the issues started. Opening a new ComfyUI tab was not possible, the UI did not load anymore. I could still load new workflows into the already open tab though. Trying to do so with a regular text to image workflow resulted in preview images not showing and errors in the cmd log about not finding images. complete-ai-voice-changer
workflow this time. It ran up until the Voice Changer node, where it got stuck without errors. Tried multiple times and the result was always the same with the CPU going up to some value between 60-100% and staying on there indefinitely, while the GPU was basically idle.
I thought it had something to do with using rmvpe+ or outputting 2 channels by default on the complete workflow contrary to the simple one, but that was not the issue. It did manage to fully execute using the simple workflow with rmvpe+ as well as 2 channels, so that wasn't it. This seems to be the issue:
Could not open Faiss index file for reading. stat: path should be string, bytes, os.PathLike or integer, not NoneType
leading to the getting stuck problem upon selecting an index file from the dropdown, which I did in the stuck case:
Attempting to load D:\VER_13\_AI\ComfyUI\models\RVC\.index\added_IVF1063_Flat_nprobe_1_Sayano_v2.index
Inputting custom RVC models into the [...]\ComfyUI\models\RVC
folder, as well as the corresponding .index file into [...]\ComfyUI\models\RVC\.index
resulted in the RVC model .pth file being recognized and selectable in the Load RVC Model
node, but the index file did not appear in its dropdown. The selectable index files also showed entries that were not in the .index folder, whereas the models dropdown was accurately corresponding to the files within the folder.
Leaving the index selection at none is the only way it managed to execute for me, but the result sounded pretty much the same no matter the model selected, including manually input ones.
Ran into another error using the complete-ai-voice-changer workflow:
The console log also shows the dreaded
No module named 'fairseq'
Full console log
> [rgthree] Using rgthree's optimized recursive execution. > [rgthree] First run patching recursive_output_delete_if_changed and recursive_will_execute. > [rgthree] Note: If execution seems broken due to forward ComfyUI changes, you can disable the optimization from rgthree settings in ComfyUI. > args=() kwargs={'model': 'karafan/MDX23C-8KFFT-InstVoc_HQ.ckpt', 'agg': 10, 'format': 'wav', 'use_cache': True, 'audio': None} > args=() kwargs={'model': 'UVR/UVR-DeEcho-DeReverb.pth', 'agg': 10, 'format': 'wav', 'use_cache': True, 'audio': None} > args=() kwargs={'model': 'UVR/HP5-vocals+instrumentals.pth', 'agg': 10, 'format': 'wav', 'use_cache': True, 'audio': None} > args=() kwargs={'model': 'UVR/5_HP-Karaoke-UVR.pth', 'agg': 10, 'format': 'wav', 'use_cache': True, 'audio': None} > args=() kwargs={'sr': 'None', 'merge_type': 'mean', 'normalize': True, 'audio1': None, 'audio2': None} > args=() kwargs={'sr': 'None', 'merge_type': 'min', 'normalize': True, 'audio1': None, 'audio2': None} > args=() kwargs={'sr': 'None', 'merge_type': 'mean', 'normalize': True, 'audio1': None, 'audio2': None} > args=() kwargs={'f0_up_key': 0, 'format': 'wav', 'use_cache': True, 'audio': None, 'model': None, 'hubert_model': None, 'pitch_extraction_params': None} > before remix: shape=(9320832,), max=1.6189756393432617, min=-1.5827065706253052, mean=7.237118552438915e-05 sr=44100 > after remix: shape=(9320832,), max=0.9900000095367432, min=-0.9678215980529785, mean=4.425482256920077e-05, sr=44100 > loading sound fname='D:\\VER_13\\_AI\\ComfyUI\\ComfyUI\\input\\A Welcome Burden.MP3' audio.ndim=1 audio.max()=0.99 audio.min()=-0.9678216 audio.dtype=dtype('float32') sr=44100 > audio.shape=(9320832,) > audio.shape=(9320832,) > saving sound to D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\75935a1628c2bd04d2dfe86df663bd91.wav > audio.shape=(9320832,) > File saved to $D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\75935a1628c2bd04d2dfe86df663bd91.wav > 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 51/51 [00:01<00:00, 29.15it/s] > vocals done: (2, 9320640) > before remix: shape=(2, 9320640), max=0.42588382959365845, min=-0.4332875907421112, mean=-8.084320143098012e-06 sr=44100 > after remix: shape=(9320640,), max=13928, min=-14187, mean=-0.25855520650942426, sr=44100 > instruments done: (2, 9320640) > before remix: shape=(2, 9320640), max=0.9888100624084473, min=-0.9512075185775757, mean=3.7090692785568535e-05 sr=44100 > after remix: shape=(9320640,), max=32367, min=-31169, mean=1.2215339290005836, sr=44100 > saving sound to D:\VER_13\_AI\ComfyUI\.cache\uvr\75935a1628c2bd04d2dfe86df663bd91\.vocals\UVR-DeEcho-DeReverb_is_half=True_agg=10_format=wav.wav > audio.shape=(9320640,) > saving sound to D:\VER_13\_AI\ComfyUI\.cache\uvr\75935a1628c2bd04d2dfe86df663bd91\.instrumental\UVR-DeEcho-DeReverb_is_half=True_agg=10_format=wav.wav > audio.shape=(9320640,) > successfully downloaded: D:\VER_13\_AI\ComfyUI\models\karafan\MDX23C-8KFFT-InstVoc_HQ.ckpt > audio.shape=(9320640,) > audio.shape=(9320640,) > saving sound to D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\faef800914397c074e96f68008abfb21.wav > audio.shape=(9320640,) > File saved to $D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\faef800914397c074e96f68008abfb21.wav > Go with : faef800914397c074e96f68008abfb21 audio_file='D:\\VER_13\\_AI\\ComfyUI\\ComfyUI\\temp\\uvr\\faef800914397c074e96f68008abfb21.wav' > Load the audio file from User's input > Audio loaded: original_audio.shape=(2, 9320640) self.sample_rate=44100 > 211 sec. - Rate : 44100 Hz / Cut-OFF : 22050 Hz > ► Normalizing audio : -1 dB > ► Extract Vocals with "MDX23C 8K FFT" (Overlap : 4) > ► Apply High 70 Hz & Low 16.5 KHz Pass on Vocals > ► Get Music by subtracting Vocals from original audio > ► Save Vocals FINAL ! > before remix: shape=(2, 9320640), max=0.7428862452507019, min=-0.8297719955444336, mean=-1.941201713262508e-11 sr=44100 > after remix: shape=(9320640,), max=24332, min=-27081, mean=-0.006259334122978679, sr=44100 > ► Save Music FINAL ! > before remix: shape=(2, 9320640), max=0.8424515724182129, min=-0.8699514865875244, mean=-8.499577708320771e-10 sr=44100 > after remix: shape=(9320640,), max=27601, min=-28500, mean=0.012761570020942768, sr=44100 > --> Processing DONE ! > Elapsed Time for faef800914397c074e96f68008abfb21 : 00:00:17 sec.> audio.shape=(9320640,) > audio.shape=(9320640,) > saving sound to D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\ade230afdcded8c6385e1b260991351f.wav > audio.shape=(9320640,) > File saved to $D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\ade230afdcded8c6385e1b260991351f.wav > 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 76/76 [00:01<00:00, 45.63it/s] > vocals done: (2, 9320640) > before remix: shape=(2, 9320640), max=0.8629193902015686, min=-0.8975500464439392, mean=3.225217994895502e-07 sr=44100 > after remix: shape=(9320640,), max=28274, min=-29388, mean=0.004294447591581694, sr=44100 > instruments done: (2, 9320640) > before remix: shape=(2, 9320640), max=0.9376914501190186, min=-0.9064560532569885, mean=3.695829218486324e-05 sr=44100 > after remix: shape=(9320640,), max=30724, min=-29702, mean=1.2226841719023587, sr=44100 > saving sound to D:\VER_13\_AI\ComfyUI\.cache\uvr\ade230afdcded8c6385e1b260991351f\.vocals\HP5-vocals+instrumentals_is_half=True_agg=10_format=wav.wav > audio.shape=(9320640,) > saving sound to D:\VER_13\_AI\ComfyUI\.cache\uvr\ade230afdcded8c6385e1b260991351f\.instrumental\HP5-vocals+instrumentals_is_half=True_agg=10_format=wav.wav > audio.shape=(9320640,) > audio.shape=(9320640,) > audio.shape=(9320640,) > audio.shape=(9320640,) > audio.shape=(9320640,) > merging audio audio1=((9320640,), 44100) audio2=((9320640,), 44100) sr=None > before remix: shape=(9320640,), max=0.7425537109375, min=-0.826446533203125, mean=-1.9101972270618717e-07 sr=44100 > after remix: shape=(9320640,), max=29147, min=-32440, mean=-0.013612477254780788, sr=44100 > before remix: shape=(9320640,), max=0.86285400390625, min=-0.8968505859375, mean=1.3105614016239997e-07 sr=44100 > after remix: shape=(9320640,), max=31210, min=-32440, mean=2.285250798228448e-05, sr=44100 > before remix: shape=(2, 9320640), max=31210.0, min=-32440.0, mean=-0.00679481215775013 sr=44100 > after remix: shape=(9320640,), max=29147, min=-32440, mean=-255.37203325093554, sr=44100 > saving sound to D:\VER_13\_AI\ComfyUI\ComfyUI\temp\preview\57bf60a1e49a8b4f251e9e9d544b7624.flac > audio.shape=(9320640,) > File saved to $D:\VER_13\_AI\ComfyUI\ComfyUI\temp\preview\57bf60a1e49a8b4f251e9e9d544b7624.flac > successfully downloaded: D:\VER_13\_AI\ComfyUI\models\UVR\5_HP-Karaoke-UVR.pth > audio.shape=(9320640,) > audio.shape=(9320640,) > saving sound to D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\22928b4259e0d3662a4df6316a234ba1.wav > audio.shape=(9320640,) > File saved to $D:\VER_13\_AI\ComfyUI\ComfyUI\temp\uvr\22928b4259e0d3662a4df6316a234ba1.wav > 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 76/76 [00:01<00:00, 40.88it/s] > vocals done: (2, 9320640) > before remix: shape=(2, 9320640), max=0.8867124319076538, min=-0.9914352297782898, mean=-0.006732961628586054 sr=44100 > after remix: shape=(9320640,), max=29017, min=-32440, mean=-220.30942424554536, sr=44100 > instruments done: (2, 9320640) > before remix: shape=(2, 9320640), max=0.12878338992595673, min=-0.1648065149784088, mean=-0.0010603641858324409 sr=44100 > after remix: shape=(9320640,), max=4218, min=-5396, mean=-34.49217725392248, sr=44100 > saving sound to D:\VER_13\_AI\ComfyUI\.cache\uvr\22928b4259e0d3662a4df6316a234ba1\.vocals\5_HP-Karaoke-UVR_is_half=True_agg=10_format=wav.wav > audio.shape=(9320640,) > saving sound to D:\VER_13\_AI\ComfyUI\.cache\uvr\22928b4259e0d3662a4df6316a234ba1\.instrumental\5_HP-Karaoke-UVR_is_half=True_agg=10_format=wav.wav > audio.shape=(9320640,) > successfully downloaded: D:\VER_13\_AI\ComfyUI\models\RVC\Claire.pth > successfully downloaded: D:\VER_13\_AI\ComfyUI\models\hubert_base.pt > successfully downloaded: D:\VER_13\_AI\ComfyUI\models\rmvpe.pt > audio.shape=(9320640,) > audio.shape=(9320640,) > No module named 'fairseq' > File index was empty. > vc_single unused args: {'model_name': 'Claire', 'sr': 32000} > !!! Exception during processing!!! > Traceback (most recent call last): > File "D:\VER_13\_AI\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute > output_data, output_ui = get_output_data(obj, input_data_all) > File "D:\VER_13\_AI\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data > return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) > File "D:\VER_13\_AI\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list > results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) > File "D:\VER_13\_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC\custom_nodes\rvc.py", line 67, in convert > output_audio = vc_single(hubert_model=hubert_model(),input_audio=input_audio,**model(),**pitch_extraction_params,**kwargs) > File "D:\VER_13\_AI\ComfyUI\ComfyUI\custom_nodes\Comfy-RVC\vc_infer_pipeline.py", line 290, in vc_single > assert hubert_path is not None > AssertionError > > Prompt executed in 217.51 seconds
Thank you!