Files
dsProject/dsLightRag/Liblib/T4_WenShengTu.py
2025-09-04 11:37:51 +08:00

37 lines
1.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from Liblib.Kit.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",# 1.5和XL文生图 - 自定义完整参数
checkpoint_id="0ea388c7eb854be3ba3c6f65aac6bfd3",# Dream Tech XL | 筑梦工业XL v6.0 - 寄语星河
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("❌ 生图任务失败")