在 Stable Diffusion(SD)中,通过图反向退出提示词有以下几种情况:
- 图生图功能除了文本提词框外还有图片框输入口,可通过图片给与 AI 创作灵感。随便照一张照片拖入,文本输入框旁有两个反推提示词的按钮,CLIP 可通过图片反推出完整含义的句子,DeepBooru 可反推出关键词组。例如一张图通过两种反推方式得到的提示词分别为:CLIP——“a young boy sitting on a bench with a toy train and a lego train set on the floor next to him,Adam Rex,detailed product photo,a stock photo,lyco art”;DeepBooru——“shoes,solo,hat,orange_background,yellow_background,smile,socks,black_hair,sitting,sneakers”。但两种方式生成的提示词可能有瑕疵,需要手动补充信息,调整宽度和高度,使红框匹配图片,还要注意提示词相关性和重绘幅度这两个参数。
- 去除图像人物时,将图放入 WD 1.4 标签器中裁剪只保留背景部分,然后反推提示词,如“outdoors,no humans,tree,scenery,grass,sky,cloud,day,blue sky,mountain,road,house,path,building,nature,cloudy sky”,检查无误后发送到文生图中,开启 ControlNet,使用 inpaint 模型涂抹人物部分生成。可调整控制权重和控制模式来优化效果。
- 进行角色设计时,设置文生图提示词,如大模型“majicmixRealistic_v6.safetensors”,正向提示词“(a character sheet of a woman from different angles with a grey background:1.4),auburn hair,eyes open,cinematic lighting,Hyperrealism,depth of field,photography,ultra highres,photorealistic,8k,hyperrealism,studio lighting,photography”,负向提示词“EasyNegative,canvasframe,canvas frame,eyes shut,wink,blurry,hands,closed eyes,(easynegative),((((ugly)))),(((duplicate))),((morbid)),((mutilated)),out of frame,extra fingers,mutated hands,((poorly drawn hands)),((poorly drawn face)),((bad art)),blurry,(((mutation))),(((deformed))),blurry,((bad anatomy)),(((bad proportions))),((extra limbs)),cloned face,(((disfigured))),gross proportions,(malformed limbs),((missing arms)),((missing legs)),((floating limbs)),((disconnected limbs)),((malformed hands)),((missing fingers)),worst quality,((disappearing arms)),((disappearing legs)),(((extra arms))),(((extra legs))),(fused fingers),(too many fingers),(((long neck))),canvas frame,((worst quality)),((low quality)),lowres,sig,signature,watermark,username,bad,immature,cartoon,anime,3d,painting,b&w”,设置参数如迭代步数 50、采样方法 DPM++ 2M Karras、尺寸 1328×800px 后出图,可得到 15 个不同角度的人物图片。