Let the language of wit become universal, for laughter transcends borders

Get UBot Studio Enterprise Here!

Hey there, botmasters! Today, we’re once again pushing the envelope of what’s possible with cutting edge generative AI. In particular, we’ll be creating a bot that generates single panel comics using ChatGPT and Stable Diffusion! So, let’s embark on yet another artistic adventure, and bring laughter and joy to our followers as we explore the vast potential of AI-generated humor.

First things first, let’s use ui console view to open our console to log the comic creations of our AI.

We will also connect to dreambooth using our API key.

Now, let’s set up some crucial paths for our images. We’ll set the #image path and the #comic path for where they’ll be generated.

We’re also going to set a #context to help our AI understand its role as a comic creator.

Time to create the chat GPT agent! We’ll name it “ComicGPT” and feed it the #context we’ve set:

Now, we can ask ComicGPT to provide us with a hilarious scene description! We’ll take its response and set it as the #scene variable:

And we’ll log the scene to the console using the log command:

Next, we’ll request the caption for the comic and set it as the #caption variable:

Don’t forget to log the caption, so we can see what our AI has in store for us:

Here comes the fun part – generating the image! We’ll use the generate dreambooth image command, passing in our #image path and #scene:

Then we can take a look at the generated image with log image command:

Now, we need to create some space for the caption by using pad image on our initial image:

Again, we’ll use log image to see the modified image.

Alright, it’s time to fit our funny text onto the image! We’ll do this using the fit text to image command:

And, of course, we’ll use log image to admire our AI’s masterpiece.

And there you have it, intrepid Bot masters! Our UBot Studio script is now fully equipped to generate ingenious comics. With each delightful comic, we not only showcase the astounding capabilities of artificial intelligence but also bring smiles to countless faces. So, let’s celebrate our accomplishment and revel in the boundless possibilities of AI-driven creativity. Here’s to transforming the world, one laughter-filled comic at a time!

Get UBot Studio Enterprise Here!
ui console view
config openai("YOUR_API_KEY")
connect to dreambooth("YOUR_API_KEY")
set(#image path,"C:\\Documents\\UBot Studio\\Workspace\\image.png","Local")
set(#comic path,"C:\\Documents\\UBot Studio\\Workspace\\comic.png","Local")
set(#context,"you are comicGPT, an ai that conceptualizes and writes single-panel comics. given a topic, you\'ll first describe the scene that\'s happening in the comic, and then provide a caption. Your description will be given to an image generator like dall-e, so make the scene description as visually simple as possible. I want to emphasize again that the scene should be simple. the most important thing is that the comic is funny, insightful, profound, or otherwise emotionally evocative.","Local")
create chat gpt agent("ComicGPT",#context,"gpt-4")
set(#scene,$chat gpt response("Give me just the scene description for a single-panel comic. Make it really funny.","ComicGPT"),"Local")
log(#scene)
set(#caption,$chat gpt response("Give me just the caption for the comic. Make it really funny.","ComicGPT"),"Local")
log(#caption)
generate dreambooth image(#image path,#scene,"Stable Diffusion XL Beta v2.2.2",512,384)
log image(#image path,50)
pad image(#image path,#comic path,0,0,100,0,"white")
log image(#comic path,50)
fit text to image(#image path,#caption,#comic path,"top",90,392,20,20,20,"Comic Neue","black","False","black",50,"True")
log image(#comic path,50)

Published by Seth Turin