Skip to content
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

ValueError: attempt to get argmax of an empty sequence #44

Open
nitinmukesh opened this issue Apr 30, 2024 · 1 comment
Open

ValueError: attempt to get argmax of an empty sequence #44

nitinmukesh opened this issue Apr 30, 2024 · 1 comment

Comments

@nitinmukesh
Copy link

nitinmukesh commented Apr 30, 2024

Any suggestions how to fix this issue
I am using the default provided with the repository, only updated the following in \TokenFlow\configs\config_pnp.yaml

batch_size: 8
to
batch_size: 1

data_path: 'data/woman-running'
to
data_path: 'data/woman-running.mp4'

(tokenflow) C:\tut\TokenFlow>python run_tokenflow_pnp.py --config_path "configs/config_pnp.yaml"
A matching Triton is not available, some optimizations will not be enabled
Traceback (most recent call last):
  File "C:\Users\nitin\miniconda3\envs\tokenflow\lib\site-packages\xformers\__init__.py", line 55, in _is_triton_available
    from xformers.triton.softmax import softmax as triton_softmax  # noqa
  File "C:\Users\nitin\miniconda3\envs\tokenflow\lib\site-packages\xformers\triton\softmax.py", line 11, in <module>
    import triton
ModuleNotFoundError: No module named 'triton'
{'seed': 1, 'device': 'cuda', 'output_path': 'tokenflow-results_pnp_SD_2.1\\woman-running\\a marble sculpture of a woman running, Venus de Milo\\attn_0.5_f_0.8\\batch_size_1\\50', 'data_path': 'data/woman-running.mp4', 'latents_path': 'latents', 'n_inversion_steps': 500, 'n_frames': 40, 'sd_version': '2.1', 'guidance_scale': 7.5, 'n_timesteps': 50, 'prompt': 'a marble sculpture of a woman running, Venus de Milo', 'negative_prompt': 'ugly, blurry, low res, unrealistic, unaesthetic', 'batch_size': 1, 'pnp_attn_t': 0.5, 'pnp_f_t': 0.8}
{'seed': 1, 'device': 'cuda', 'output_path': 'tokenflow-results_pnp_SD_2.1\\woman-running\\a marble sculpture of a woman running, Venus de Milo\\attn_0.5_f_0.8\\batch_size_1\\50', 'data_path': 'data/woman-running.mp4', 'latents_path': 'latents', 'n_inversion_steps': 500, 'n_frames': 40, 'sd_version': '2.1', 'guidance_scale': 7.5, 'n_timesteps': 50, 'prompt': 'a marble sculpture of a woman running, Venus de Milo', 'negative_prompt': 'ugly, blurry, low res, unrealistic, unaesthetic', 'batch_size': 1, 'pnp_attn_t': 0.5, 'pnp_f_t': 0.8}
Loading SD model
model_index.json: 100%|████████████████████████████████████████████████████████████████| 543/543 [00:00<00:00, 673kB/s]
tokenizer/special_tokens_map.json: 100%|██████████████████████████████████████████████| 460/460 [00:00<00:00, 10.6kB/s]
tokenizer/tokenizer_config.json: 100%|████████████████████████████████████████████████| 807/807 [00:00<00:00, 50.9kB/s]
(…)ature_extractor/preprocessor_config.json: 100%|████████████████████████████████████| 342/342 [00:00<00:00, 57.9kB/s]
unet/config.json: 100%|███████████████████████████████████████████████████████████████| 911/911 [00:00<00:00, 83.5kB/s]
tokenizer/merges.txt: 100%|██████████████████████████████████████████████████████████| 525k/525k [00:00<00:00, 822kB/s]
scheduler/scheduler_config.json: 100%|████████████████████████████████████████████████| 346/346 [00:00<00:00, 33.6kB/s]
text_encoder/config.json: 100%|███████████████████████████████████████████████████████| 613/613 [00:00<00:00, 40.8kB/s]
vae/config.json: 100%|█████████████████████████████████████████████████████████████████| 553/553 [00:00<00:00, 217kB/s]
tokenizer/vocab.json: 100%|████████████████████████████████████████████████████████| 1.06M/1.06M [00:01<00:00, 544kB/s]
vae/diffusion_pytorch_model.safetensors: 100%|██████████████████████████████████████| 335M/335M [01:04<00:00, 5.20MB/s]
text_encoder/model.safetensors: 100%|█████████████████████████████████████████████| 1.36G/1.36G [02:50<00:00, 7.98MB/s]
unet/diffusion_pytorch_model.safetensors: 100%|███████████████████████████████████| 3.46G/3.46G [06:49<00:00, 8.45MB/s]
Fetching 13 files: 100%|███████████████████████████████████████████████████████████████| 13/13 [06:51<00:00, 31.69s/it]
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:06<00:00,  1.02s/it]
SD model loadedpytorch_model.safetensors: 100%|███████████████████████████████████| 3.46G/3.46G [06:49<00:00, 12.7MB/s]
Traceback (most recent call last):
  File "C:\tut\TokenFlow\run_tokenflow_pnp.py", line 301, in <module>
    run(config)
  File "C:\tut\TokenFlow\run_tokenflow_pnp.py", line 279, in run
    editor = TokenFlow(config)
  File "C:\tut\TokenFlow\run_tokenflow_pnp.py", line 60, in __init__
    self.latents_path = self.get_latents_path()
  File "C:\tut\TokenFlow\run_tokenflow_pnp.py", line 119, in get_latents_path
    latents_path = latents_path[np.argmax(n_frames)]
  File "<__array_function__ internals>", line 200, in argmax
  File "C:\Users\nitin\miniconda3\envs\tokenflow\lib\site-packages\numpy\core\fromnumeric.py", line 1242, in argmax
    return _wrapfunc(a, 'argmax', axis=axis, out=out, **kwds)
  File "C:\Users\nitin\miniconda3\envs\tokenflow\lib\site-packages\numpy\core\fromnumeric.py", line 54, in _wrapfunc
    return _wrapit(obj, method, *args, **kwds)
  File "C:\Users\nitin\miniconda3\envs\tokenflow\lib\site-packages\numpy\core\fromnumeric.py", line 43, in _wrapit
    result = getattr(asarray(obj), method)(*args, **kwds)
ValueError: attempt to get argmax of an empty sequence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant