Can't Genarate Anything
Magratheuis opened this issue · 2 comments
When I Installed This Using Pinokeo I Got This
Loading model GrandaddyShmax/musicgen-melody
G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\torch\nn\utils\weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
new batch 1 [['driving rock']] [None] [None]
Traceback (most recent call last):
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\gradio\queueing.py", line 407, in call_prediction
output = await route_utils.call_process_api(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\gradio\blocks.py", line 1550, in process_api
result = await self.call_function(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\gradio\blocks.py", line 1185, in call_function
prediction = await anyio.to_thread.run_sync(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\anyio_backends_asyncio.py", line 2177, in run_sync_in_worker_thread
return await future
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\anyio_backends_asyncio.py", line 859, in run
result = context.run(func, *args)
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\gradio\utils.py", line 661, in wrapper
response = f(*args, **kwargs)
File "G:\pinokio\api\audiocraft_plus.git\app\app.py", line 914, in predict_full
outs, outs_audio, outs_backup, input_length = _do_predictions(
File "G:\pinokio\api\audiocraft_plus.git\app\app.py", line 584, in _do_predictions
outputs = MODEL.generate(texts, progress=progress, return_tokens=USE_DIFFUSION)
File "G:\pinokio\api\audiocraft_plus.git\app\audiocraft\models\musicgen.py", line 186, in generate
tokens = self._generate_tokens(attributes, prompt_tokens, progress)
File "G:\pinokio\api\audiocraft_plus.git\app\audiocraft\models\musicgen.py", line 349, in _generate_tokens
gen_tokens = self.lm.generate(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "G:\pinokio\api\audiocraft_plus.git\app\audiocraft\models\lm.py", line 452, in generate
tokenized = self.condition_provider.tokenize(conditions)
File "G:\pinokio\api\audiocraft_plus.git\app\audiocraft\modules\conditioners.py", line 1176, in tokenize
output[attribute] = self.conditioners[attribute].tokenize(batch)
File "G:\pinokio\api\audiocraft_plus.git\app\audiocraft\modules\conditioners.py", line 444, in tokenize
inputs = self.t5_tokenizer(entries, return_tensors='pt', padding=True).to(self.device)
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\transformers\tokenization_utils_base.py", line 3055, in call
encodings = self._call_one(text=text, text_pair=text_pair, **all_kwargs)
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\transformers\tokenization_utils_base.py", line 3142, in _call_one
return self.batch_encode_plus(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\transformers\tokenization_utils_base.py", line 3338, in batch_encode_plus
return self._batch_encode_plus(
File "G:\pinokio\api\audiocraft_plus.git\app\env\lib\site-packages\transformers\tokenization_utils.py", line 880, in _batch_encode_plus
ids, pair_ids = ids_or_pair_ids
ValueError: not enough values to unpack (expected 2, got 1)
Is This Pinokeos fualt?
Hey @Magratheuis, I do not know if you got it fixed yet. It's indeed Pinokio's error.
I checked the 'tokenization_utils.py', here is the file's code:
if not isinstance(ids_or_pair_ids, (list, tuple)):
ids, pair_ids = ids_or_pair_ids, None
elif is_split_into_words and not isinstance(ids_or_pair_ids[0], (list, tuple)):
ids, pair_ids = ids_or_pair_ids, None
else:
ids, pair_ids = ids_or_pair_ids
Your error happened when 'ids_or_pair_ids' cannot be unpacked. That mean 'ids_or_pair_ids' is not list or tuple (as it should have been).
Thank You @Linos1391 Sorry i've been away a while. I've not yet got this to work. But do let me know if they solve the fault. Thank you