Skip to content

Color channel order for watermark embedding #6292

@btlorch

Description

@btlorch

Describe the bug

The encoder from the invisible watermark library expects input images with the channel order BGR, which is the default in OpenCV. This can be seen here.

As far as I can see from here, diffusers passes the images in RGB order.

The watermark encoder then converts the given image from BGR to YUV. When the image is passed with the wrong channel order, this will lead to unexpected U and V channel values.

Reproduction

n/a

Logs

No response

System Info

Python 3.10, diffusers 0.24.0, invisible-watermark-0.2.0

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions