mikael-alafriz-deel / lucid-sonic-dreams

MIT License
774 stars 158 forks source link

Hallucinating Errors #19

Open jonnyhoff opened 3 years ago

jonnyhoff commented 3 years ago

This is such a cool project. Please have a look at this.

Errors:

Hallucinating...

  0%|                                                                                                                                                                                                          | 0/4405 [00:00<?, ?it/s]2021-03-28 19:04:09.816474: E tensorflow/core/common_runtime/executor.cc:642] Executor failed to create kernel. Invalid argument: Conv2DCustomBackpropInputOp only supports NHWC.
         [[{{node G_synthesis_1/_Run/G_synthesis/cond/cond/cond/cond/128x128/Conv0_up/conv2d_transpose}}]]
  0%|                                                                                                                                                                                                          | 0/4405 [00:02<?, ?it/s]
Traceback (most recent call last):
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call
    return fn(*args)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn
    target_list, run_metadata)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Conv2DCustomBackpropInputOp only supports NHWC.
         [[{{node G_synthesis_1/_Run/G_synthesis/cond/cond/cond/cond/128x128/Conv0_up/conv2d_transpose}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "stylegan2/lsd-01.py", line 7, in <module>
    L.hallucinate(file_name = 'song.mp4')
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/lucidsonicdreams/main.py", line 680, in hallucinate
    self.generate_frames()
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/lucidsonicdreams/main.py", line 528, in generate_frames
    .synthesis.run(w_batch, **Gs_syn_kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/stylegan2/dnnlib/tflib/network.py", line 629, in run
    mb_out = tf.get_default_session().run(out_expr, dict(zip(in_expr, mb_in)))
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/client/session.py", line 956, in run
    run_metadata_ptr)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run
    run_metadata)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Conv2DCustomBackpropInputOp only supports NHWC.
         [[node G_synthesis_1/_Run/G_synthesis/cond/cond/cond/cond/128x128/Conv0_up/conv2d_transpose (defined at /home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]

Original stack trace for 'G_synthesis_1/_Run/G_synthesis/cond/cond/cond/cond/128x128/Conv0_up/conv2d_transpose':
  File "stylegan2/lsd-01.py", line 7, in <module>
    L.hallucinate(file_name = 'song.mp4')
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/lucidsonicdreams/main.py", line 680, in hallucinate
    self.generate_frames()
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/lucidsonicdreams/main.py", line 528, in generate_frames
    .synthesis.run(w_batch, **Gs_syn_kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/stylegan2/dnnlib/tflib/network.py", line 604, in run
    out_gpu = net_gpu.get_output_for(*in_gpu, return_as_list=True, **dynamic_kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/stylegan2/dnnlib/tflib/network.py", line 369, in get_output_for
    out_expr = self._build_func(*final_inputs, **build_kwargs)
  File "<string>", line 556, in G_synthesis
  File "<string>", line 555, in grow
  File "<string>", line 549, in <lambda>
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1224, in cond
    orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1061, in BuildCondBranch
    original_result = fn()
  File "<string>", line 554, in <lambda>
  File "<string>", line 555, in grow
  File "<string>", line 549, in <lambda>
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1224, in cond
    orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1061, in BuildCondBranch
    original_result = fn()
  File "<string>", line 554, in <lambda>
  File "<string>", line 555, in grow
  File "<string>", line 549, in <lambda>
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1224, in cond
    orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1061, in BuildCondBranch
    original_result = fn()
  File "<string>", line 554, in <lambda>
  File "<string>", line 555, in grow
  File "<string>", line 549, in <lambda>
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1224, in cond
    orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1061, in BuildCondBranch
    original_result = fn()
  File "<string>", line 554, in <lambda>
  File "<string>", line 551, in grow
  File "<string>", line 520, in block
  File "<string>", line 191, in upscale2d_conv2d
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/nn_ops.py", line 2204, in conv2d_transpose
    name=name)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/nn_ops.py", line 2275, in conv2d_transpose_v2
    name=name)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/ops/gen_nn_ops.py", line 1407, in conv2d_backprop_input
    name=name)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
    op_def=op_def)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3357, in create_op
    attrs, op_def, compute_device)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
    op_def=op_def)
  File "/home/user/PycharmProjects/lucidsonicdreams/venv/lib64/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 1748, in __init__
    self._traceback = tf_stack.extract_stack()
Javi-Python commented 3 years ago

I'm having the same error :(

Gresliebear commented 3 years ago

What packages have you installed?

Javi-Python commented 3 years ago

What packages have you installed?

hey I actually got it to work on google collab, although I think my problem was I was trying to use . m4a files. Really awesome work, do you mind if I post some creations on youtube? I know a ton of people that would love to watch these

Gresliebear commented 3 years ago

I didnt make the project I am stuck on the same error with Hallucinating Errors on windows 10


Hallucinating...

  0%|                                                                                                                                                                                  | 0/7723 [00:00<?, ?it/s]Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1356, in _do_call
    return fn(*args)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1341, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation G_mapping_1/_Run/G_mapping/latents_in: {{node G_mapping_1/_Run/G_mapping/latents_in}}was explicitly assigned 
to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0 ]. Make sure the device specification refers to a valid device.     
         [[G_mapping_1/_Run/G_mapping/latents_in]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test_file.py", line 16, in <module>
    L.hallucinate(file_name = 'redone.mp4')
  File "/home/project/lucidsonicdreams/main.py", line 682, in hallucinate
    self.generate_frames()
  File "/home/project/lucidsonicdreams/main.py", line 527, in generate_frames
    np.tile(class_batch, (batch_size, 1)))
  File "/usr/local/lib/python3.6/dist-packages/dnnlib/tflib/network.py", line 443, in run
    mb_out = tf.get_default_session().run(out_expr, dict(zip(in_expr, mb_in)))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 950, in run
    run_metadata_ptr)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1173, in _run
    feed_dict_tensor, options, run_metadata)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1350, in _do_run
    run_metadata)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1370, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation G_mapping_1/_Run/G_mapping/latents_in: node G_mapping_1/_Run/G_mapping/latents_in (defined at /usr/local/lib/python3.6/dist-packages/dnnlib/tflib/network.py:218) was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0 ]. Make sure the device specification refers to a valid device.
         [[G_mapping_1/_Run/G_mapping/latents_in]]

Errors may have originated from an input operation.
Input Source operations connected to node G_mapping_1/_Run/G_mapping/latents_in:
 G_mapping_1/_Run/split (defined at /usr/local/lib/python3.6/dist-packages/dnnlib/tflib/network.py:404) ```
Gresliebear commented 3 years ago

basically what I found out unless your GPU has tenorcores it wont run

https://stackoverflow.com/questions/47362590/tensorflow-gpu-error-invalidargumenterror-cannot-assign-a-device-for-operation