The Rutkowski Function

or

A Simple Hack for Stable Diffusion Prompts

September 2022



If you've followed recent developments surrounding the open sourcing of pretrained weights for the generative model Stable Diffusion, you may have seen the name "Greg Rutkowski" mentioned in prompts, used as input for the model.

Grzegorz Rutkowski is a prolific digital artist who created much of the input used to train the model. Rutkowski's art is featured in Dungeons & Dragons, Magic the Gathering, and various fantasy and adventure themed games.

Invoking Greg's name guides the neural network towards a certain aesthetic style. But, more than that, saying his name appears to inspire the network to simply work harder, and output art of a higher quality. Below are a few examples.

Scrooge McDuck with gold coins
Scrooge McDuck with gold coins greg rutkowski
Batman holding a machine gun
Batman holding a machine gun greg rutkowski
A dinosaur fighting a robot
A dinosaur fighting a robot greg rutkowski

Obviously, the network is just an autoencoder and doesn't have any concept of working harder, Greg's name is not the only token that will guide the network toward higher quality, and not all simple prompts will default to crude, childlike drawings. The Rutkowski function is not proven or guaranteed to improve visual quality in all cases.

But, if you're setting up a text-to-image model for users, especially if they're the kind of users who are likely to input "batman", consider implementing the Rutkowski function, defined below.


def rutkowski(text, model):
    image = model(text + " greg rutkowski")
    return image

Thanks for reading. For infinitely more content, click here

Please read the rules before commenting