lllyasviel / style2paints

sketch + style = paints :art: (TOG2018/SIGGRAPH2018ASIA)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running v4.5 on Colab

sulaimangari opened this issue · comments

Traceback (most recent call last):
  File "style2paints/V4.5/s2p_v45_server/Style2PaintsV45_source.py", line 231, in <module>
    tail_op_g, head_op_g, render_op_g, refs_img_g = make_graph()
  File "style2paints/V4.5/s2p_v45_server/Style2PaintsV45_source.py", line 197, in make_graph
    features = reader(ip3 / 255.0)
  File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/usr/local/lib/python3.8/dist-packages/keras/engine/input_spec.py", line 295, in assert_input_compatibility
    raise ValueError(
ValueError: Input 0 of layer "model_1" is incompatible with the layer: expected shape=(None, 224, 224, 3), found shape=(None, 128, 128, 3)

Keep returning error. Colab doesn't support tf1 so I running this on tf2.
I assumed this code compatible with tf2 because this exist on source code:

import tensorflow

tensorflow.compat.v1.disable_v2_behavior()
tf = tensorflow.compat.v1

Help is appreciated, thanks.

@sulaimangari Hello, I have the same problem, can I ask that how did you solve it?

Can u provide the colab link??

I end up using v4.0, it looks like the dev just focused on the new released with UI now.

I end up using v4.0, it looks like the dev just focused on the new released with UI now.

Please can you provide colab link?

If it helps anyone:
https://highcwu-style2paints-4-5-gradio.hf.space/file/ui/web-mobile/index.html
https://huggingface.co/spaces/HighCWu/Style2Paints-4.5-Gradio

Bro thanks,this is a big help. I will try it soon. 😊 thanks

Lol no problem bro. Enjoy! :)