37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
from Liblib.LibLibGenerator import LibLibGenerator
|
||
|
||
if __name__ == '__main__':
|
||
liblib = LibLibGenerator()
|
||
|
||
# 设置高分辨率修复参数
|
||
hi_res_fix_info = {
|
||
"hiresSteps": 20,
|
||
"hiresDenoisingStrength": 0.75,
|
||
"upscaler": 10,
|
||
"resizedWidth": 1024,
|
||
"resizedHeight": 1536
|
||
}
|
||
|
||
# 调用自定义Checkpoint方法进行文生图
|
||
result = liblib.generate_custom_checkpoint_text_to_image(
|
||
template_uuid="e10adc3949ba59abbe56e057f20f883e",
|
||
checkpoint_id="0ea388c7eb854be3ba3c6f65aac6bfd3",
|
||
prompt="Asian portrait,A young woman wearing a green baseball cap,covering one eye with her hand",
|
||
negative_prompt="ng_deepnegative_v1_75t,(badhandv4:1.2),EasyNegative,(worst quality:2),",
|
||
sampler=15,
|
||
steps=20,
|
||
cfg_scale=7,
|
||
width=768,
|
||
height=1024,
|
||
img_count=1,
|
||
randn_source=0,
|
||
seed=2228967414,
|
||
restore_faces=0,
|
||
hi_res_fix_info=hi_res_fix_info
|
||
)
|
||
|
||
if result:
|
||
print(f"🎉 生图任务完成!最终OBS地址: {result}")
|
||
else:
|
||
print("❌ 生图任务失败")
|