FOSSPicks
Stable Diffusion
Over the past few months, we've been inundated, and even bored by, endless images generated by artificial intelligence. Images arrive fully formed from a simple line or two of text entered into online portals, albeit occasionally with misaligned limbs and uncanny valley faces. OpenAI's DALL-E was the first to grab the headlines, quickly followed by Discord's Midjourney, and announcements from both Google and Meta state they're working on their own. These all work by scraping images off the Internet and using them as the inputs for a machine-learning model that can generate images from natural language inputs. But they're also closed source, at least for now, with one significant exception, a piece of software called Stable Diffusion. Stable Diffusion is a (non-OSI compliant) open source project that generates exactly the same kind of images from its own kind of model, all of which can be installed on your local hardware and used without sharing any information or even being online. And the model won't take you a week to download either.
This is the cutting edge of computing and it is consequently complex, but the results are astounding. Fortunately, you can also get these results without understanding the first thing about machine learning or neural networks. Stable Diffusion is only available as an API, which means its features need to be accessed via a client. There are a few different web front ends, but the project also includes a simple command-driven Python client. All of this is easy to install, and the fully trained model containing "the visual information of humanity" is a mere 5GB download. All of this is built and installed locally, with no requirement for a network connection while Stable Diffusion is running, although you do realistically need a modern GPU with CUDA support to reduce the rendering times to less than a minute, or even less than 10 seconds on the best hardware NVIDIA makes. Without any of this you might be waiting hours.
The two most important scripts in the project are txt2img.py
and img2img.py
. These will transform either text into an AI-generated image, or another image into an AI-generated image, and it's the first one that's been grabbing attention. This takes the text from a --prompt
argument to generate an image, and the text can be almost anything. Providing a style can help, such as "photographic," or "impressionist," and you'll need a subject and environment. You might want to propose "A renaissance-style image of a flying car in a sunlit cityscape in the year 2040," for example, but there are no rules and experimentation is key. There are other options for the resolution, downsampling, and scale, but the default values work well. The -seed
parameter can be passed to generate the same image again from the same input; otherwise, every image you generate even from the same text will be remarkably different.
Stable Diffusion builds images from noise, using its neural network to synthesize images from the original lower-dimensional sources. The text you input is used as context when images are teased from the noise, using the model as a guide to what an image should consist of. The output is both fascinating and terrifying, and is surely a harbinger of doom for freelance artists and designers (and ultimately, all of us), at least for ideas and planning. It's especially empowering if you've never had any particular artistic talent because now you can generate almost any kind of image and take credit for its creation. With just the default values, it is often difficult to believe an image isn't a composite. But the lighting, perspective, style, and subject are all utterly unique to the generated image, and it's something that really needs to be played with to be believed.
Project Website
https://huggingface.co/CompVis/stable-diffusion
Steam compatibility tool
Luxtorpeda
Valve's Steam Deck is bringing a lot of new users to Linux, and this is reinvigorating some older projects that might otherwise have been left to languish. Luxtorpeda is one of these. While it's very useful for people playing old games on a Steam Deck, Luxtorpeda is just as useful for anyone playing old games on their PC through Steam. It calls itself a "compatibility tool" for Steam, but what it really does is vastly simplify your Steam configuration for the huge selection of games and titles that exists outside of the Steam ecosystem. We all have these, and we often want them to be incorporated into Steam to help make it a single place for game launching and also to help with accessing such titles over remote streaming or Steam Link. This is even more important on the Steam Deck when the default view only runs the Steam client by default.
Adding external games manually takes a lot of time and research. You need to understand how those games are launched and what tools they require before you even wade into the Steam properties page and add the title manually. Luxtorpeda does all this for you by becoming the tool to run for any of the games it's compatible with. These include most of the old Quake II releases, Jedi Knight, HeXen, Morrowind, Doom, Doom 2, and Doom 3. Luxtorpeda won't just set up Steam for you; it will install and configure Linux-native clients for all these games to get the absolute best performance and output from these still brilliant games. After installation, your Steam games properties simply need to be configured to run Luxtorpeda rather than whatever engine is used by default. Luxtorpeda will then run and create the optimum install and configuration for your game, regardless of whether you're on your Linux desktop or the Steam Deck, and it works brilliantly.
Project Website
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.