Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Image Stylization notebook doesn't work on Colab #78

@sebamacchia

Description

@sebamacchia

getting this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-3b16e573062a> in <module>()
     47 DownloadCheckpointFiles()
     48 image = np.expand_dims(image_utils.load_np_image(
---> 49           os.path.expanduser(input_image)), 0)
     50 if demo == 'monet':
     51     checkpoint = 'checkpoints/multistyle-pastiche-generator-monet.ckpt'

1 frames
/usr/local/lib/python3.6/dist-packages/magenta/models/image_stylization/image_utils.py in load_np_image_uint8(image_file)
    407     f.write(tf.gfile.GFile(image_file, 'rb').read())
    408     f.flush()
--> 409     image = scipy.misc.imread(f.name)
    410     # Workaround for black-and-white images
    411     if image.ndim == 2:

AttributeError: module 'scipy.misc' has no attribute 'imread'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions