Last 12 months, we shared a
blogpost on watermarking, explaining what it means to watermark generative AI content, and why it is vital. The necessity for watermarking has turn out to be much more critical as people all around the world have begun to generate and share AI-generated images, video, audio, and text. Images and video have turn out to be so realistic that they’re nearly unimaginable to tell apart from what you’d see captured by an actual camera. Addressing this issue is multi-faceted, but there may be one, clear, low-hanging fruit 🍇:
To ensure that people to know what’s real and what’s synthetic, use visible watermarks.
To assist out, we at Hugging Face have made visible watermarking trivially easy: At any time when you create a Space like an app or a demo, you should use our in-house app-building library Gradio to display watermarks with a single command.
For images and video, simply add the watermark parameter, like so:
gr.Image(my_generated_image, watermark=my_watermark_image)
gr.Video(my_generated_video, watermark=my_watermark_image)
See an illustration of this in motion: take a look at our example image and video watermarking Space.
Watermarks may be specified as filenames, and for images we moreover support open images and even numpy arrays, to work best with how you ought to arrange your interface. One option I particularly like is QR watermarks, which may be used to get rather more information in regards to the content, and might even be matched to the sort of your image or video.
You too can add custom visible watermarks for AI-generated text, in order that each time it’s copied, the watermark will appear. Like so:
gr.Chatbot(label=my_model_name, watermark=my_watermark_text, type="messages", show_copy_button=True, show_copy_all_button=True)
See an illustration of this in motion: take a look at our example chatbot watermarking Space.
This robotically adds attribution when users copy text from AI responses, further aiding in AI transparency and disclosure for text generation.
Try all of it out today, construct your individual watermark, have a good time!
Completely happy Coding!
Acknowledgements: Abubakar Abid and Yuvraj Sharma collaborated on this work and blog post.

