Error running v4.5 on Colab

Author: sulaimangariCreated Dec 1, 2022Updated May 4, 2025
bash
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:

python
import tensorflow

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

Help is appreciated, thanks.