AI extension: Stable Diffusion image generator for LibreOffice
LibreOffice does not include artificial intelligence (AI) out-of-the-box. But many users want AI features in the suite – so we encourage developers to make them available as optional extensions. And that’s what Igor Támara did, creating the “Stable Diffusion for LibreOffice” extension for AI-generated images powered by AI Horde (a volunteer crowd-sourced distributed cluster of image generation workers).
We talked to Igor about the extension – here’s what he had to say:
What does the extension do?
You write some text describing an image, and get an AI image generated from the given text. You can tweak parameters, choose a model and use the best result on written documents, presentations or the place you prefer. The images are generated on volunteer GPUs through AI Horde.
When did you start working on it?
Two weeks ago, starting from a Gimp plugin as a base. I’m brand new to the LibreOffice project, and started it as a macro to get this functionality in the software. One week later I put it on GitHub.
Later on I got help from friendly people on the forum to turn it into an extension. I also joined the the chat and filled some requests in the bug tracker.
What are the current limitations, and what’s coming next?
Be aware that the text you provide is sent to AI Horde and seen by the machines that create the image, so do not send sensitive data. Also, you can get better results if you send the description of the desired image in English. You are encouraged to try different languages to see the results.
You need internet connection to use it. If you wanted to create images locally on your machine, it would take time to configure your environment with local AI models, with gigabytes of memory dedicated to this purpose, and maybe processing for hours to get something useful.
Sometimes the text can be marked as NSFW (“not safe for work”) – in which case you end up with black and white text saying so.
For now, the extension works in Writer and Impress; when invoked from other LibreOffice components, it opens a new text document and inserts the image along with the provided text.
The roadmap includes:
- Translating the plugin to other languages
- An option to pre-translate the text to English
- Better integration with LibreOffice Calc and Draw
- Earn kudos, rating the images to have more priority when requesting an image
How can others help to improve it?
Report any problems you find, and help to translate into your language. Please do so by filling an issue with your intention saying which language.
If you have a GPU (and good graphics hardware in general), you can volunteer as a worker joining the horde, to add to the computing power – and you can earn kudos to have higher priority when you need it.
If you work with a friendly company that wants to make use of the existing hardware, you can join the horde too.
One of the purposes of AI Horde is to aid education, having a special program for that.
This plugin and AI Horde are all open source, so everyone can learn and be as transparent as possible in this changing and revolutionary world of AI times.
There might be concerns about the use of products and the ownership of work. As I see it, we are always learning by example and reusing what others have invented from thousands of years ago, like how to walk, make fire, communicate, explore, recreate and mix. We can continue to learn and make fair use of resources – and contribute too.