Context
You can customize image generation settings to your preference. There are two supported modes:
Uncompressed: Directly transfer parameters without modification.
Compressed: Transfer parameters via an auxiliary object
Dummy
, similar to the Text Completion mechanism.
Supported Parameters:
prompt
: Main text prompt for image generation.nsfw
: allowed NSFWresolution
: Image resolution specified as(width, height)
, e.g.,(768, 512)
.seed
: Seed for generation; use-1
for a random value.steps
: Number of generation steps.negative_prompt
: Text describing what should not appear in the image.
Consider using concise language:
from zerogpt import Client
client = Client()
request_id = client.create_image(
prompt='anime neko girl',
nsfw=False,
resolution=(768, 512),
seed=-1,
steps=50,
negative_prompt='painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs'
)['data']['request_id']
Sample of compressed generation using Dummy
:
from zerogpt import Client
from zerogpt.utils.prompt import Dummy
client = Client()
dummy = Dummy()
dummy.create(
prompt='anime neko girl',
resolution=(768, 512),
seed=-1,
steps=50,
negative_prompt='painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs'
)
request_id = client.create_image(dummy)['data']['request_id']
⚠️ Important: The
Dummy
object automatically determines the request type. Using themessages
parameter is considered loading chat history, whileprompt
indicates image generation.
Last updated
Was this helpful?