lllyasviel / style2paints

sketch + style = paints :art: (TOG2018/SIGGRAPH2018ASIA)
Apache License 2.0
18.01k stars 2.09k forks source link

Error running v4.5 on Colab #199

Open sulaimangari opened 1 year ago

sulaimangari commented 1 year ago
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.

qingxian233 commented 1 year ago

您好(*?0?7▽`)ノノ青弦已经收到您的邮件啦!请耐心等待,10个工作日内会给您回复w

xinyeCH commented 1 year ago

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

AkTheBoss001 commented 1 year ago

Can u provide the colab link??

sulaimangari commented 1 year ago

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

AkTheBoss001 commented 1 year ago

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?

Flashbaurger888888 commented 1 year ago

Same for me. colab link: https://colab.research.google.com/drive/12jJn9cEVeDLGwA9bSjq4jV82AaaiG26G?usp=sharing

03stevensmi commented 1 year ago

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

AkTheBoss001 commented 1 year ago

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

03stevensmi commented 1 year ago

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! :)