Files
dsProject/dsLightRag/Liblib/T3_WenShengTu.py

39 lines
1.5 KiB
Python
Raw Normal View History

2025-09-04 11:30:58 +08:00
from Liblib.Kit.LibLibGenerator import LibLibGenerator
2025-09-04 11:09:36 +08:00
if __name__ == '__main__':
liblib = LibLibGenerator()
2025-09-04 11:27:59 +08:00
# 设置高分辨率修复参数
hi_res_fix_info = {
"hiresSteps": 20,
"hiresDenoisingStrength": 0.75,
"upscaler": 10,
"resizedWidth": 1024,
"resizedHeight": 1536
}
# 调用自定义Checkpoint方法进行文生图
result = liblib.generate_custom_checkpoint_text_to_image(
2025-09-04 11:37:51 +08:00
template_uuid="e10adc3949ba59abbe56e057f20f883e",# 1.5和XL文生图 - 自定义完整参数
2025-09-04 11:39:48 +08:00
# https://www.liblib.art/imageinfo/ad1be0a3d6b44e4890881958fe0154d1
# https://liblibai-online.liblib.cloud/img/4c208e8657b548b5ba941c34d2166d71/d1764f7b6e07b7b30678578ef6925fb23650d59c30cc508873383c2340f78e8d.png?x-oss-process=image/resize,w_1146,m_lfit/format,webp
2025-09-04 11:37:51 +08:00
checkpoint_id="0ea388c7eb854be3ba3c6f65aac6bfd3",# Dream Tech XL | 筑梦工业XL v6.0 - 寄语星河
2025-09-04 11:27:59 +08:00
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
2025-09-04 11:09:36 +08:00
)
2025-09-04 11:27:59 +08:00
if result:
print(f"🎉 生图任务完成最终OBS地址: {result}")
else:
print("❌ 生图任务失败")