-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error assert hubert_path is not None and no fairseq #2
Comments
try |
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:
Full console log
|
Go to the root folder of Comfy-RVC and run |
Reinstalling the requirements through Full console log
And running
When I then run this however:
And then reinstalling the requirements the same way with: Full console log
Trying to run the complete-voice-changer workflow resulted in this error:
But it ran exceptionally fast this time, when you look at the execution time at the bottom of the following console log. Full 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: |
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 |
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? |
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. 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() |
I get an error on the first line: Console logPython 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from fairseq import checkpoint_utils
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\__init__.py", line 33, in <module>
import fairseq.criterions # noqa
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\criterions\__init__.py", line 36, in <module>
importlib.import_module("fairseq.criterions." + file_name)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\criterions\ctc.py", line 19, in <module>
from fairseq.tasks import FairseqTask
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\tasks\__init__.py", line 15, in <module>
from .fairseq_task import FairseqTask, LegacyFairseqTask # noqa
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\tasks\fairseq_task.py", line 17, in <module>
from fairseq.optim.amp_optimizer import AMPOptimizer
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\optim\__init__.py", line 48, in <module>
importlib.import_module("fairseq.optim." + file_name)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\optim\composite.py", line 14, in <module>
from fairseq.optim.lr_scheduler import FairseqLRScheduler, build_lr_scheduler
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\optim\lr_scheduler\__init__.py", line 36, in <module>
importlib.import_module("fairseq.optim.lr_scheduler." + file_name)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\fairseq\optim\lr_scheduler\tri_stage_lr_scheduler.py", line 51, in <module>
class TriStageLRSchedule(FairseqLRScheduler):
cs.store(name=name, group=registry_name, node=node, provider="fairseq")
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\core\config_store.py", line 85, in store
cfg = OmegaConf.structured(node)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\omegaconf.py", line 133, in structured
return OmegaConf.create(obj, parent)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\omegaconf.py", line 170, in create
return OmegaConf._create_impl(obj=obj, parent=parent)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\omegaconf.py", line 214, in _create_impl
return DictConfig(
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\dictconfig.py", line 74, in __init__
self._set_value(content)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\dictconfig.py", line 549, in _set_value
data = get_structured_config_data(value)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\_utils.py", line 233, in get_structured_config_data
return get_dataclass_data(obj)
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\_utils.py", line 176, in get_dataclass_data
d[name] = _maybe_wrap(
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\omegaconf.py", line 677, in _maybe_wrap
return _node_wrap(
File "C:\Users\Red Rusty Ruins\AppData\Local\Programs\Python\Python310\lib\site-packages\omegaconf\omegaconf.py", line 642, in _node_wrap
elif issubclass(type_, Enum):
TypeError: issubclass() arg 1 must be a class
>>> |
It did work! ... but only to a degree unfortunately.
Successful console log. Workflow: simple-ai-voice-changergot prompt
[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.
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,)
before remix: shape=(9320640,), max=0.8636474609375, min=-0.904388427734375, mean=1.7412160957519518e-07 sr=44100
after remix: shape=(9320640,), max=0.8636474609375, min=-0.904388427734375, mean=1.7412160957519518e-07, sr=44100
loading sound fname='D:\\VER_13\\_AI\\ComfyUI\\.cache\\uvr\\aa59ba738d2f5b42b5ebd8428a9cb118\\primary.flac' audio.ndim=1 audio.max()=0.86364746 audio.min()=-0.9043884 audio.dtype=dtype('float32') sr=44100
before remix: shape=(9320640,), max=0.989898681640625, min=-0.951446533203125, mean=2.917085657827556e-05 sr=44100
after remix: shape=(9320640,), max=0.989898681640625, min=-0.951446533203125, mean=2.917085657827556e-05, sr=44100
loading sound fname='D:\\VER_13\\_AI\\ComfyUI\\.cache\\uvr\\aa59ba738d2f5b42b5ebd8428a9cb118\\secondary.flac' audio.ndim=1 audio.max()=0.9898987 audio.min()=-0.95144653 audio.dtype=dtype('float32') sr=44100
audio.shape=(9320640,)
audio.shape=(9320640,)
Could not open Faiss index file for reading. stat: path should be string, bytes, os.PathLike or integer, not NoneType
vc_single unused args: {'model_name': 'Sayano', 'sr': 40000}
before remix: shape=(9320640,), max=0.8636474609375, min=-0.904388427734375, mean=1.7412160957519518e-07 sr=44100
after remix: shape=(3381639,), max=0.8237226009368896, min=-0.8413206934928894, mean=1.7411672104117315e-07, sr=16000
File index was empty.
get_f0 rmvpe+ unused params: {}
vc torch.Size([1, 7336, 768]) torch.Size([1, 7336]) torch.Size([1, 7336])
vc torch.Size([1, 5476, 768]) torch.Size([1, 5476]) torch.Size([1, 5476])
vc torch.Size([1, 7530, 768]) torch.Size([1, 7530]) torch.Size([1, 7530])
vc torch.Size([1, 3190, 768]) torch.Size([1, 3190]) torch.Size([1, 3190])
Returning completed audio...
-------------------
saving sound to D:\VER_13\_AI\ComfyUI\.cache\rvc\cf7a796e8e60349f0878310b19b6724a.flac
audio.shape=(8452800,)
File saved to $D:\VER_13\_AI\ComfyUI\.cache\rvc\cf7a796e8e60349f0878310b19b6724a.flac
before remix: shape=(9319212,), max=0.9927683472633362, min=-0.8608676195144653, mean=-0.00041942865937016904 sr=44100
after remix: shape=(9319212,), max=0.9900000095367432, min=-0.8584671020507812, mean=-0.00041825955850072205, sr=44100
loading sound fname='D:\\VER_13\\_AI\\ComfyUI\\.cache\\rvc\\cf7a796e8e60349f0878310b19b6724a.flac' audio.ndim=1 audio.max()=0.99 audio.min()=-0.8584671 audio.dtype=dtype('float32') sr=44100
audio.shape=(9319212,)
audio.shape=(9320640,)
before remix: shape=(9319212,), max=0.989990234375, min=-0.858489990234375, mean=-0.0004334201803430915 sr=44100
after remix: shape=(9319212,), max=0.9900000691413879, min=-0.8584985136985779, mean=-0.00043342437129467726, sr=44100
before remix: shape=(9320640,), max=0.989898681640625, min=-0.951446533203125, mean=2.917085657827556e-05 sr=44100
after remix: shape=(9320640,), max=0.9900000691413879, min=-0.9515439867973328, mean=2.9173848815844394e-05, sr=44100
saving sound to D:\VER_13\_AI\ComfyUI\ComfyUI\temp\preview\8950e777fb4dc53406f9dd68f776aee1.flac
audio.shape=(9320640,)
File saved to $D:\VER_13\_AI\ComfyUI\ComfyUI\temp\preview\8950e777fb4dc53406f9dd68f776aee1.flac
before remix: shape=(9320640,), max=0.52032470703125, min=-0.595916748046875, mean=-0.0002021940890699625 sr=44100
after remix: shape=(9320640,), max=0.52032470703125, min=-0.595916748046875, mean=-0.0002021940890699625, sr=44100
loading sound fname='D:\\VER_13\\_AI\\ComfyUI\\ComfyUI\\temp\\preview\\8950e777fb4dc53406f9dd68f776aee1.flac' audio.ndim=1 audio.max()=0.5203247 audio.min()=-0.59591675 audio.dtype=dtype('float32') sr=44100
audio.shape=(9320640,)
saving sound to D:\VER_13\_AI\ComfyUI\ComfyUI\output\audio\A Welcome Burden.flac
audio.shape=(9320640, 2)
File saved to $D:\VER_13\_AI\ComfyUI\ComfyUI\output\audio\A Welcome Burden.flac
Prompt executed in 9.93 seconds Stuck console loggot prompt
[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.
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,)
before remix: shape=(9320640,), max=0.8636474609375, min=-0.904388427734375, mean=1.7412160957519518e-07 sr=44100
after remix: shape=(9320640,), max=0.8636474609375, min=-0.904388427734375, mean=1.7412160957519518e-07, sr=44100
loading sound fname='D:\\VER_13\\_AI\\ComfyUI\\.cache\\uvr\\aa59ba738d2f5b42b5ebd8428a9cb118\\primary.flac' audio.ndim=1 audio.max()=0.86364746 audio.min()=-0.9043884 audio.dtype=dtype('float32') sr=44100
before remix: shape=(9320640,), max=0.989898681640625, min=-0.951446533203125, mean=2.917085657827556e-05 sr=44100
after remix: shape=(9320640,), max=0.989898681640625, min=-0.951446533203125, mean=2.917085657827556e-05, sr=44100
loading sound fname='D:\\VER_13\\_AI\\ComfyUI\\.cache\\uvr\\aa59ba738d2f5b42b5ebd8428a9cb118\\secondary.flac' audio.ndim=1 audio.max()=0.9898987 audio.min()=-0.95144653 audio.dtype=dtype('float32') sr=44100
audio.shape=(9320640,)
audio.shape=(9320640,)
Loading faiss with AVX2 support.
Successfully loaded faiss with AVX2 support.
Attempting to load D:\VER_13\_AI\ComfyUI\models\RVC\.index\added_IVF1063_Flat_nprobe_1_Sayano_v2.index....
loaded index: (<faiss.swigfaiss_avx2.IndexIVFFlat; proxy of <Swig Object of type 'faiss::IndexIVFFlat *' at 0x00000283B77F14A0> >, array([[ -0.15344, 0.18567, 0.42798, ..., -0.61768, 0.22327, 0.16272],
[ -0.2345, -0.24976, 0.323, ..., 0.45972, 0.10327, 0.17529],
[ 0.16785, 0.030289, -0.20984, ..., -0.10199, -0.024582, -0.057587],
...,
[ -0.0079575, -0.14136, 0.059906, ..., 0.070618, -0.0020618, 0.00047541],
[ -0.038727, 0.013245, 0.21533, ..., -0.0098343, -0.023911, -0.010025],
[ -0.21094, -0.1438, 0.10089, ..., -0.17603, 0.0006237, -0.054993]], dtype=float32))
vc_single unused args: {'model_name': 'Sayano', 'sr': 40000}
before remix: shape=(9320640,), max=0.8636474609375, min=-0.904388427734375, mean=1.7412160957519518e-07 sr=44100
after remix: shape=(3381639,), max=0.8237226009368896, min=-0.8413206934928894, mean=1.7411672104117315e-07, sr=16000
Using preloaded file index.
get_f0 rmvpe+ unused params: {} This seems to be the issue: Inputting custom RVC models into the 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. |
The latest version of ComfyUI seemed to have broken the index loading.
Try using VHS's (https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite) Audio to legacy VHS_AUDIO and legacy VHS_AUDIO to Audio nodes to convert between the formats. All the nodes here uses the old VHS_AUDIO format before comfy implemented their own format. |
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
Thank you!
The text was updated successfully, but these errors were encountered: