'commit'
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
from Liblib.LibLibGenerator import LibLibGenerator
|
from Liblib.LibLibGenerator import LibLibGenerator
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
# - Checkpoint默认为官方模型
|
||||||
|
"""
|
||||||
|
- Checkpoint默认为官方模型
|
||||||
|
- 可用模型范围:基础算法F.1
|
||||||
|
- 支持additional network
|
||||||
|
"""
|
||||||
generate_params = {
|
generate_params = {
|
||||||
"templateUuid": "6f7c4652458d4802969f8d089cf5b91f", # 参数模板ID F.1文生图
|
"templateUuid": "6f7c4652458d4802969f8d089cf5b91f", # 参数模板ID F.1文生图
|
||||||
"generateParams": {
|
"generateParams": {
|
39
dsLightRag/Liblib/T4_WenShengTu_CustomCheckPoint.py
Normal file
39
dsLightRag/Liblib/T4_WenShengTu_CustomCheckPoint.py
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
from Liblib.LibLibGenerator import LibLibGenerator
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
generate_params = {
|
||||||
|
"templateUuid": "e10adc3949ba59abbe56e057f20f883e",
|
||||||
|
"generateParams": {
|
||||||
|
"checkPointId": "0ea388c7eb854be3ba3c6f65aac6bfd3", # 底模 modelVersionUUID
|
||||||
|
"prompt": "Asian portrait,A young woman wearing a green baseball cap,covering one eye with her hand", # 选填
|
||||||
|
"negativePrompt": "ng_deepnegative_v1_75t,(badhandv4:1.2),EasyNegative,(worst quality:2),", #选填
|
||||||
|
"sampler": 15, # 采样方法
|
||||||
|
"steps": 20, # 采样步数
|
||||||
|
"cfgScale": 7, # 提示词引导系数
|
||||||
|
"width": 768, # 宽
|
||||||
|
"height": 1024, # 高
|
||||||
|
"imgCount": 1, # 图片数量
|
||||||
|
"randnSource": 0, # 随机种子生成器 0 cpu,1 Gpu
|
||||||
|
"seed": 2228967414, # 随机种子值,-1表示随机
|
||||||
|
"restoreFaces": 0, # 面部修复,0关闭,1开启
|
||||||
|
|
||||||
|
# 高分辨率修复
|
||||||
|
"hiResFixInfo": {
|
||||||
|
"hiresSteps": 20, # 高分辨率修复的重绘步数
|
||||||
|
"hiresDenoisingStrength": 0.75, # 高分辨率修复的重绘幅度
|
||||||
|
"upscaler": 10, # 放大算法模型枚举
|
||||||
|
"resizedWidth": 1024, # 放大后的宽度
|
||||||
|
"resizedHeight": 1536 # 放大后的高度
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
liblib = LibLibGenerator()
|
||||||
|
|
||||||
|
# 调用生成接口
|
||||||
|
response = liblib.post_request(
|
||||||
|
"/api/generate/webui/text2img",
|
||||||
|
generate_params
|
||||||
|
)
|
||||||
|
# {'generateUuid': 'f16463d55e144214ae12d5177f8256fc'}
|
||||||
|
print(response)
|
Reference in New Issue
Block a user