|
|
@ -83,9 +83,14 @@ def get_image_base64_str(image_path):
|
|
|
|
# 文生图,完成一个极小的图片创建,防止img_2_img暴显存
|
|
|
|
# 文生图,完成一个极小的图片创建,防止img_2_img暴显存
|
|
|
|
def txt_2_img_blank(webui_address):
|
|
|
|
def txt_2_img_blank(webui_address):
|
|
|
|
txt2img_url = 'http://' + webui_address + '/sdapi/v1/txt2img'
|
|
|
|
txt2img_url = 'http://' + webui_address + '/sdapi/v1/txt2img'
|
|
|
|
data = {'prompt': 'a dog', 'negative_prompt': '', 'seed': -1, 'steps': 1, 'width': 1, 'height': 1, 'cfg_scale': 1}
|
|
|
|
data = {"prompt": "a dog", "negative_prompt": "", "seed": -1, "steps": 1, "width": 1, "height": 1, "cfg_scale": 1,
|
|
|
|
|
|
|
|
"override_settings": {
|
|
|
|
|
|
|
|
"sd_model_checkpoint": "majicMix sombre 麦橘唯美_v2.0.safetensors [796bc0cc14]",
|
|
|
|
|
|
|
|
"sd_vae": "Automatic"
|
|
|
|
|
|
|
|
}}
|
|
|
|
submit_post(txt2img_url, data)
|
|
|
|
submit_post(txt2img_url, data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 将图片一切为四
|
|
|
|
# 将图片一切为四
|
|
|
|
def split_4_image(image_path, out_path):
|
|
|
|
def split_4_image(image_path, out_path):
|
|
|
|
res = []
|
|
|
|
res = []
|
|
|
|