Skip to content

A Twitter bot that feeds magical realism prompts into the Stable Diffusion AI image generator.

License

Notifications You must be signed in to change notification settings

jeffposnick/magic-realism-dream-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Illustrated Magical Realism Bot

Follow the bot on Twitter

Follow @ImagicalRealism to see the generated output.

Technical details

The Twitter API

This bot uses the fantastic twitter-api-v2 library to interact with Twitter.

OAuth 1.0a tokens are used for authentication. I followed the library's guide to generate all of the necessary tokens.

Generating images

The Stability Diffusion API's gRPC service generates an image for a given prompt.

The @grpc/grpc-js library talks to the backend service. You can find details on how the gRPC client definitions were generated in the proto directory.

Running the bot

A GitHub Actions workflow definition executes npm run tweet on a one-hour schedule. If there is already a generated image for the latest @MagicRealismBot tweet, then npm run tweet will exit without posting anything.

About

A Twitter bot that feeds magical realism prompts into the Stable Diffusion AI image generator.

Topics

Resources

License

Stars

Watchers

Forks