Hi guys,
when gpt-image-1 was released I found it can generate images in the same NFT-like style. I was able to generate different characters and poses over and over by simply providing one prompt and then ask chat to generate a new one.
With the recent API release I wanted to do the same, to generate hundreds of them, but I struggle with character randomization, here is the prompt I use:
Generate a single pixel art avatar. The image size is 512x512 pixels. The background color must be exactly #F68813. Choose exactly one random character from the following list: Pepe the Frog, GigaChad, Wojak (Feels Guy), Doge, Trollface, Cheems (Shiba Inu), Stonks guy, NPC character, Ugandan Knuckles, Dat Boi, Ricardo Milos, Big Chungus, Grumpy Cat, Nyan Cat, Shrek, Among Us Crewmate. Use only one character per image, centered, showing head and shoulders clearly. Randomize the pose and facial expression. Do not repeat characters or include multiple characters. Do not deviate from the background color provided. Deliver the image as a PNG file.
Using Playground it does generate the images in the style I want, but it keeps generating same character over and over, the first one from the list provided. If I delete Pepe the Frog and leave Chad first, it keeps generating Chad no matter what I do.
Is there anyone who can help me how to randomize the characters via Playground or API, so I can generate like 500 or 1000 images?
Thank you.
The new model might not be as good as dalle-3 at randomization. Perhaps it would work better if you randomize your prompt and make each one unique.
Also, size and file type is determined by api parameters. You can also make it transparent.
Randomize your prompt like this:
import random
# List of available characters
characters = [
"Pepe the Frog", "GigaChad", "Wojak (Feels Guy)", "Doge", "Trollface",
"Cheems (Shiba Inu)", "Stonks guy", "NPC character", "Ugandan Knuckles",
"Dat Boi", "Ricardo Milos", "Big Chungus", "Grumpy Cat",
"Nyan Cat", "Shrek", "Among Us Crewmate"
]
# List of possible poses and facial expressions
poses_expressions = [
"smiling with a tilted head",
"facing forward with a neutral expression",
"winking and smirking",
"looking slightly upwards, appearing thoughtful",
"grinning widely with raised eyebrows",
"tilting head sideways with a frown",
"giving a thumbs-up expression",
"with eyes closed in laughter",
"facing left with a confident look",
"glaring with intensity",
"surprised with mouth open",
"sad with teary eyes",
"joyfully excited with a sparkle in the eye",
"stoic and serious expression"
]
def generate_prompt():
character = random.choice(characters)
pose = random.choice(poses_expressions)
prompt = (
f"Generate a single pixel art avatar. "
f"The background color must be exactly #F68813. "
f"Use this character: {character}. "
f"Center it showing head and shoulders clearly. "
f"The character pose should be: {pose}. "
f"Do not deviate from the background color provided. "
)
return prompt
# Example: Generate 3 unique prompts
for _ in range(3):
print(generate_prompt())
print("---")
1 Like