'commit'
This commit is contained in:
@@ -189,3 +189,36 @@ class LibLibUtil:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"处理生成任务时发生异常: {str(e)}")
|
print(f"处理生成任务时发生异常: {str(e)}")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
# 采样方法字典 - 包含28种采样方法及其枚举值和推荐度
|
||||||
|
SAMPLING_METHODS = {
|
||||||
|
"Euler a": 0,
|
||||||
|
"Euler": 1,
|
||||||
|
"LMS": 2,
|
||||||
|
"Heun": 3,
|
||||||
|
"DPM2": 4,
|
||||||
|
"DPM2 a": 5,
|
||||||
|
"DPM++ 2S a": 6,
|
||||||
|
"DPM++ 2M": 7,
|
||||||
|
"DPM++ SDE": 8,
|
||||||
|
"DPM fast": 9,
|
||||||
|
"DPM adaptive": 10,
|
||||||
|
"LMS Karras": 11,
|
||||||
|
"DPM2 Karras": 12,
|
||||||
|
"DPM2 a Karras": 13,
|
||||||
|
"DPM++ 2S a Karras": 14,
|
||||||
|
"DPM++ 2M Karras": 15,
|
||||||
|
"DPM++ SDE Karras": 16,
|
||||||
|
"DDIM": 17,
|
||||||
|
"PLMS": 18,
|
||||||
|
"UNIPC": 19,
|
||||||
|
"DPM++ 2M SDE Karras": 20,
|
||||||
|
"DPM++ 2M SDE EXPONENTIAL": 21,
|
||||||
|
"DPM++ 2M SDE Heun Karras": 24,
|
||||||
|
"DPM++ 2M SDE Heun Exponential": 25,
|
||||||
|
"DPM++ 3M SDE Karras": 27,
|
||||||
|
"DPM++ 3M SDE Exponential": 28,
|
||||||
|
"Restart": 29,
|
||||||
|
"LCM": 30
|
||||||
|
}
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
|
from Liblib.LibLibUtil import SAMPLING_METHODS
|
||||||
from PuLIDGenerator import PuLIDGenerator
|
from PuLIDGenerator import PuLIDGenerator
|
||||||
|
|
||||||
# 加载配置文件
|
# 加载配置文件
|
||||||
@@ -7,8 +9,11 @@ with open('config.json', 'r', encoding='utf-8') as f:
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# 获取第一个模型的配置
|
# 获取第一个模型的配置
|
||||||
model_config = config["models"][0]
|
model_config = config["models"][1]
|
||||||
|
|
||||||
|
# 通过枚举转换
|
||||||
|
print(f'使用采样方法: {model_config["sampler"]}')
|
||||||
|
model_config["sampler"] = SAMPLING_METHODS[model_config["sampler"]]
|
||||||
# 创建生成器实例
|
# 创建生成器实例
|
||||||
generator = PuLIDGenerator()
|
generator = PuLIDGenerator()
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
dsLightRag/Liblib/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
dsLightRag/Liblib/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
@@ -6,9 +6,26 @@
|
|||||||
"steps": 25,
|
"steps": 25,
|
||||||
"width": 800,
|
"width": 800,
|
||||||
"height": 1000,
|
"height": 1000,
|
||||||
|
"cfgScale": 3.5,
|
||||||
|
"sampler": "Euler",
|
||||||
|
"seed": -1,
|
||||||
"prompt": "filmfotos, Asian portrait,A young woman wearing a green baseball cap,covering one eye with her hand",
|
"prompt": "filmfotos, Asian portrait,A young woman wearing a green baseball cap,covering one eye with her hand",
|
||||||
"reference_image_url": "https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/Backup/HuangWanQiao.jpg",
|
"reference_image_url": "https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/Backup/HuangWanQiao.jpg",
|
||||||
"control_weight": 0.8
|
"control_weight": 0.8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "可铯AI—3d潮玩手办",
|
||||||
|
"template_uuid": "bc6863e816f44cb28062dda9ef616bca",
|
||||||
|
"steps": 30,
|
||||||
|
"width": 720,
|
||||||
|
"height": 1280,
|
||||||
|
"cfgScale": 3.5,
|
||||||
|
"sampler": "Euler",
|
||||||
|
"seed": -1,
|
||||||
|
"prompt": "3d,this image is a highly detailed,digital cgi rendering of a chibi-style character set against a blurred,domestic background,the centerpiece is a young,wide-eyed,anime-inspired girl with exaggeratedly large blue eyes,a small nose,and rosy cheeks,her dark,tousled hair is stylized with a large,red bow on the back and a few small stars clipped into her hair,enhancing a playful,whimsical appearance, the girl is dressed in a cozy,multicolored sweater that reads sweet in orange,featuring a rainbow stripe pattern underneath,suggestive of the brand cotton candy,she also wears red tights that extend up to mid-thigh,black shoes with thick soles,and is secured with black straps and a small belt-like accessory,the footwear is practical in design,resembling sturdy,athletic sneakers, the background is minimalist and softly blurred to ensure the chibi character stands out prominently,it hints at a cozy,modern room with light-colored wooden flooring and furniture,including a partial view of a bookshelf to the left and a large,beige wardrobe to the right,the overall atmosphere is serene and warm,with the cgi maintaining a soft,almost ethereal glow,contributing to the innocent,playful vibe of the image,",
|
||||||
|
"negative_prompt": "ng_deepnegative_v1_75t,(badhandv4:1.2),EasyNegative,(worst quality:2),",
|
||||||
|
"reference_image_url": "https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/Backup/HuangWanQiao.jpg",
|
||||||
|
"control_weight": 0.8
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Reference in New Issue
Block a user