Api 请求参数:

{
    "steps": 10,
    "width": 512,
    "height": 768,
    "prompt": image_prompt,
    "cfg_scale": 1.5,
    "batch_size": batch_size,
    "scheduler": "Karras",
    "sampler_name": "DPM++ SDE",
    "negative_prompt": negetive_prompt,
    "alwayson_scripts": {
        "ADetailer": {
            "args": [
                true,
                false,
                {
                    "ad_vae": "Use same VAE",
                    "ad_model": "face_yolov8n.pt",
                    "ad_steps": 28,
                    "ad_prompt": "",
                    "ad_sampler": "DPM++ 2M Karras",
                    "ad_use_vae": false,
                    "ad_x_offset": 0,
                    "ad_y_offset": 0,
                    "ad_cfg_scale": 7,
                    "ad_clip_skip": 1,
                    "ad_mask_blur": 4,
                    "ad_use_steps": true,
                    "ad_checkpoint": "Use same checkpoint",
                    "ad_confidence": 0.3,
                    "ad_use_sampler": false,
                    "ad_dilate_erode": 32,
                    "ad_restore_face": false,
                    "ad_inpaint_width": 512,
                    "ad_model_classes": "",
                    "ad_use_cfg_scale": false,
                    "ad_use_clip_skip": false,
                    "ad_inpaint_height": 512,
                    "ad_mask_k_largest": 0,
                    "ad_mask_max_ratio": 1,
                    "ad_mask_min_ratio": 0,
                    "ad_use_checkpoint": false,
                    "ad_negative_prompt": "",
                    "ad_controlnet_model": "None",
                    "ad_noise_multiplier": 1,
                    "ad_controlnet_module": "None",
                    "ad_controlnet_weight": 1,
                    "ad_mask_merge_invert": "None",
                    "ad_denoising_strength": 0.4,
                    "ad_inpaint_only_masked": true,
                    "ad_use_noise_multiplier": false,
                    "ad_controlnet_guidance_end": 1,
                    "ad_use_inpaint_width_height": false,
                    "ad_controlnet_guidance_start": 0,
                    "ad_inpaint_only_masked_padding": 0
                }
            ]
        },
        "controlnet": {
            "args": [
                {
                    "image": { "image": image_guidance },
                    "model": "ip-adapter-faceid-plus_sd15 [d86a490f]",
                    "module": "ip-adapter_face_id_plus",
                    "weight": 1,
                    "enabled": image_guidance === '' ? false : true,
                    "low_vram": false,
                    "resize_mode": "Just Resize",
                    "threshold_a": 64,
                    "threshold_b": 64,
                    "control_mode": "Balanced",
                    "guidance_end": 1,
                    "pixel_perfect": false,
                    "processor_res": 64,
                    "guidance_start": 0
                }
            ]
        }
    },
    "override_settings": {
        // @ts-ignore
        "sd_model_checkpoint": CREATE_DEFAULT_STYLE[style]
    }
}

参考内容

image_prompt

(masterpiece:1.3),best quality,extremely detailed CG,perfect lighting,8k wallpaper,unreal engine,perfect hands,ultra-detailed,photorealistic,realistics

negative_prompt

(worst quality:2),(low quality:2),(normal quality:2),lowres,normal quality,((monochrome)),((grayscale)),skin spots,acnes,skin blemishes,age spot,(ugly:1.331),(duplicate:1.331),(morbid:1.21),(mutilated:1.21),(tranny:1.331),mutated hands,(poorly drawn hands:1.5),blurry,(bad anatomy:1.21),(bad proportions:1.331),extra limbs,(disfigured:1.331),(missing arms:1.331),(extra legs:1.331),(fused fingers:1.61051),(too many fingers:1.61051),(unclear eyes:1.331),lowers,bad hands,missing fingers,extra digit,bad hands,missing fingers,(((extra arms and legs)))
(nsfw:1.3),(nude:1.3),text,b&w,illustration,painting,cartoon,3d,bad art,poorly drawn,close up,blurry,disfigured,deformed,extra limbs,((3d, cartoon, anime, sketches)),(worst quality:2),(low quality:2),(normal quality:2),lowres,normal quality,((monochrome)),((grayscale)),bad anatomy,out of view,cut off,ugly,deformed,mutated,EasyNegative,paintings,sketches,(worst quality:2),(low quality:2),(normal quality:2),lowres,normal quality,((monochrome)),((grayscale)),skin spots,acnes,skin blemishes,age spot,glans,extra fingers,fewer fingers,(ugly eyes, deformed iris, deformed pupils, fused lips and teeth:1.2),(un-detailed skin, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.2),text,close up,cropped,out of frame,worst quality,low quality,jpeg artifacts,ugly,duplicate,morbid,mutilated,extra fingers,mutated hands,poorly drawn hands,poorly drawn face,mutation,deformed,blurry,dehydrated,bad anatomy,bad proportions,extra limbs,cloned face,disfigured,gross proportions,malformed limbs,missing arms,missing legs,extra arms,extra legs,fused fingers,too many fingers,long neck

使用 Ai 生成 SD 提示词

##Role: You are a character design master with over 30 years of experience, familiar with and proficient in the physical characteristics and features of people from different ethnicities around the world.

###Task
Please describe character's appearance(physical attributes, demeanour, and clothing) like: ${name},a ${personality} ${ethnicity} ${gender} who matches the description: ${tagline} ${description}.

## Workflow
1:Enrich and refine the character's basic features.
{ethnicity}:Character's ethnicity(such as Caucasian,Latina,Asian,Arab,Black)
{Nationality}:Character's Nationality
{gender}:Character's gender(such as male,female,other)
{age}:Character's age
{Hair_Style}:Character's Hair_Style
{Hair_Color}:Character's Hair_Color
{Face_shape}:Character's Face_shape(such as slender face,round face,oval face,baby face,inverted triangle face,heart shaped face,diamond face,square face,long face,triangular face)
{Eyes_Color}:Character's Eyes_Color
{Makeup_style}:Character's Makeup_style
{Nose_type}:Character's Nose_type
{Mouth_type}:Character's Mouth_type
{Body_Type}:character's Body_Type(such as Petite figure,Slim figure,Athletic figure,Voluptuous figure,CurvyCur figure... )
{Breast_Size}:Character's Breast_Size(such as FlatBreast,SmallBreast,MediumBreast,LargeBreast,XXLBreast,SaggyBreast,SiliconeBreast... )
{Butt_Size}:Character's Butt_Size(such as Small butt,Medium butt,Large butt,Skinny butt,Athletic butt...)
{Accessories}:Character's Accessories(Necklace、Glasses、Candles、Scarf、Baseball Cap...)
{Face_expression}:Character's expression(such as Sexy,Angry,Sad,Nerd,Smiling...)
{scene}:Description of the scene that the character is in(such as Garden, Forest, Taxi, bedroom, office, sunset, snowy, desert, beach, hospital, hotel, restaurant, pool, school, Jungle, Oasis, Kitchen, Gym, Photo Studio, Street, Shower, Mountain, Yacht, Casino, Snow, Club, Bathroom...)
{Clothing}:Detailed description of clothing or Outfit in the scene
{Pose}:Detailed description of Character's Pose(such as standing, bending, sitting, lying, action, dynamic, static, headshot, waist-up, kneeling, walking...)

2: Output in JSON format.


##example
{"ethicity+Nationality+geder":"An Asian woman from China","age": 28 years old,"face_expression":"Smilig","eyes_color":"BlueEyes","Nose_type":"Straight Nose","mouth_type":"Small Cherry Lips","ear_type":"Roud Ears","hair_style":"Curly hair","hair_color":"Blodehair","body_type":"Athletic figure","breast_size":"MediumBreast","butt_size":"Large butt","Accessories":"Necklace","clothig":"naked","scene":"Beach","pose":"Sittig"}


##Rules
1: Only the character's accessories can be left empty.
2: The theme I provide might be described in Chinese; your output should be in English only.
3: Output in JSON format only, with no additional content.
Design and enrich a character's appearance based on provided details:

${name},a ${personality} ${ethnicity} ${gender} who matches the description: ${tagline} ${description}.

Enrich and refine the character's features considering ethnicity, nationality, gender, age, hair style, color, face shape, eye color, makeup style, nose type, mouth type, body type, breast size, butt size, accessories, face expression, scene, and clothing.

# Steps
1. Analyze the provided description.
2. Determine each feature based on the description.If the feature is not mentioned in the context, you can generate it.
3. Enriched and Detailed description of clothing or Outfit in the scene.Scene generation and optimization require making reasonable inferences about the environment or location based on the character or description, and describing specific objects within the environment.Add some detailed descriptions and scene characteristics to create atmospheres such as lively, tranquil, or tense
4. Format the output as JSON.

# Output Format
The output should be in JSON format with the following keys: "ethicity+Nationality+geder", "age", "Face_shape", "eyes_color", "Nose_type", "mouth_type", "ear_type", "hair_style", "hair_color", "body_type", "breast_size", "butt_size", "Accessories", "clothig", "scene", "pose".

# Examples
{"ethicity+Nationality+geder":"A Latina woman from Mexico","age": "35-year-old","Face_shape":"oval face","eyes_color":"BrownEyes","Nose_type":"Aquiline Nose","mouth_type":"Full Lips","ear_type":"Small Ears","hair_style":"Straight hair","hair_color":"Blackhair","body_type":"Voluptuous figure","breast_size":"LargeBreast","butt_size":"Large butt","Accessories":"Scarf","clothig":"Dress","scene":"Garden","pose":"Standing"}
{"ethicity+Nationality+geder":"A Black man from USA","age": "40-year-old","Face_shape":"square face","eyes_color":"DarkBrownEyes","Nose_type":"Wide Nose","mouth_type":"Broad Lips","ear_type":"Medium Ears","hair_style":"Afro hair","hair_color":"Blackhair","body_type":"Athletic figure","breast_size":"","butt_size":"Athletic butt","Accessories":"Baseball Cap","clothig":"Jeans and T-shirt","scene":"Street","pose":"Walking"}
# Notes
Remember to follow the rules. Only accessories can be left empty. Output must be in English and in JSON format only.