save code
This commit is contained in:
+69
-23
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"3": {
|
"3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"seed": 578821909416451,
|
"seed": 154943414582783,
|
||||||
"steps": 20,
|
"steps": 20,
|
||||||
"cfg": 1,
|
"cfg": 1,
|
||||||
"sampler_name": "euler",
|
"sampler_name": "euler",
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
},
|
},
|
||||||
"22": {
|
"22": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"image": "微信图片_20250713223619.jpg"
|
"image": "cloth_20250715_232138_50414b8f.jpg"
|
||||||
},
|
},
|
||||||
"class_type": "LoadImage",
|
"class_type": "LoadImage",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
@@ -486,7 +486,7 @@
|
|||||||
},
|
},
|
||||||
"61": {
|
"61": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"image": "微信图片_20250713223607.jpg"
|
"image": "75857233_00001_.png"
|
||||||
},
|
},
|
||||||
"class_type": "LoadImage",
|
"class_type": "LoadImage",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
@@ -639,7 +639,7 @@
|
|||||||
},
|
},
|
||||||
"94": {
|
"94": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"value": 1536
|
"value": 1024
|
||||||
},
|
},
|
||||||
"class_type": "PrimitiveInt",
|
"class_type": "PrimitiveInt",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
@@ -819,7 +819,7 @@
|
|||||||
},
|
},
|
||||||
"110": {
|
"110": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"preview": "1638400",
|
"preview": "1180672",
|
||||||
"source": [
|
"source": [
|
||||||
"106",
|
"106",
|
||||||
0
|
0
|
||||||
@@ -832,7 +832,7 @@
|
|||||||
},
|
},
|
||||||
"111": {
|
"111": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"preview": "2048",
|
"preview": "768",
|
||||||
"source": [
|
"source": [
|
||||||
"108",
|
"108",
|
||||||
0
|
0
|
||||||
@@ -845,7 +845,7 @@
|
|||||||
},
|
},
|
||||||
"112": {
|
"112": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"preview": "2048",
|
"preview": "1025",
|
||||||
"source": [
|
"source": [
|
||||||
"109",
|
"109",
|
||||||
0
|
0
|
||||||
@@ -858,7 +858,7 @@
|
|||||||
},
|
},
|
||||||
"113": {
|
"113": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"preview": "4096",
|
"preview": "1793",
|
||||||
"source": [
|
"source": [
|
||||||
"107",
|
"107",
|
||||||
0
|
0
|
||||||
@@ -871,7 +871,7 @@
|
|||||||
},
|
},
|
||||||
"114": {
|
"114": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"preview": "2048",
|
"preview": "1024",
|
||||||
"source": [
|
"source": [
|
||||||
"107",
|
"107",
|
||||||
1
|
1
|
||||||
@@ -882,30 +882,76 @@
|
|||||||
"title": "Preview Any"
|
"title": "Preview Any"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"115": {
|
"117": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"preview": "800",
|
"anything": [
|
||||||
"source": [
|
"8",
|
||||||
"104",
|
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"class_type": "PreviewAny",
|
"class_type": "easy clearCacheAll",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "Preview Any"
|
"title": "Clear Cache All"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"116": {
|
"118": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"preview": "800",
|
"anything": [
|
||||||
"source": [
|
"8",
|
||||||
"104",
|
0
|
||||||
1
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"class_type": "PreviewAny",
|
"class_type": "easy cleanGpuUsed",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "Preview Any"
|
"title": "Clean VRAM Used"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"119": {
|
||||||
|
"inputs": {
|
||||||
|
"anything": [
|
||||||
|
"10",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "easy cleanGpuUsed",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Clean VRAM Used"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"120": {
|
||||||
|
"inputs": {
|
||||||
|
"anything": [
|
||||||
|
"10",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "easy clearCacheAll",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Clear Cache All"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"121": {
|
||||||
|
"inputs": {
|
||||||
|
"anything": [
|
||||||
|
"3",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "easy cleanGpuUsed",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Clean VRAM Used"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"123": {
|
||||||
|
"inputs": {
|
||||||
|
"anything": [
|
||||||
|
"3",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "easy clearCacheAll",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Clear Cache All"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"71:0": {
|
"71:0": {
|
||||||
@@ -928,7 +974,7 @@
|
|||||||
},
|
},
|
||||||
"71:2": {
|
"71:2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"prompt": "shoes",
|
"prompt": "cloth",
|
||||||
"threshold": 0.3,
|
"threshold": 0.3,
|
||||||
"sam_model": [
|
"sam_model": [
|
||||||
"71:0",
|
"71:0",
|
||||||
|
|||||||
+21
@@ -423,5 +423,26 @@ def change_cloth():
|
|||||||
|
|
||||||
return process_change_cloth(human_filename, cloth_filename, output_format, cloth_url, is_generated)
|
return process_change_cloth(human_filename, cloth_filename, output_format, cloth_url, is_generated)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/change_cloth_one_step', methods=['POST'])
|
||||||
|
def change_cloth_one_step():
|
||||||
|
# 获取参数
|
||||||
|
data = request.get_json()
|
||||||
|
if not data:
|
||||||
|
return jsonify({"ret":-1,'msg': 'No JSON data provided'}), 400
|
||||||
|
|
||||||
|
input_type = data.get("input_type")
|
||||||
|
if input_type == 'base64':
|
||||||
|
human_img = data.get("human_url")
|
||||||
|
if not human_img:
|
||||||
|
return jsonify({"error": "Missing 'human_img' parameter"}), 400
|
||||||
|
else:
|
||||||
|
human_url = data.get("human_url")
|
||||||
|
if not human_url:
|
||||||
|
return jsonify({"error": "Missing 'human_url' parameter"}), 400
|
||||||
|
cloth_url = data.get("cloth_url")
|
||||||
|
if not cloth_url:
|
||||||
|
return jsonify({"error": "Missing 'cloth_url' parameter"}), 400
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host="0.0.0.0", port=8888, debug=True)
|
app.run(host="0.0.0.0", port=8888, debug=True)
|
||||||
Reference in New Issue
Block a user