diff --git a/change_new.json b/change_new.json index 2801ff9..37ec1ef 100644 --- a/change_new.json +++ b/change_new.json @@ -1,7 +1,7 @@ { "3": { "inputs": { - "seed": 578821909416451, + "seed": 154943414582783, "steps": 20, "cfg": 1, "sampler_name": "euler", @@ -196,7 +196,7 @@ }, "22": { "inputs": { - "image": "微信图片_20250713223619.jpg" + "image": "cloth_20250715_232138_50414b8f.jpg" }, "class_type": "LoadImage", "_meta": { @@ -486,7 +486,7 @@ }, "61": { "inputs": { - "image": "微信图片_20250713223607.jpg" + "image": "75857233_00001_.png" }, "class_type": "LoadImage", "_meta": { @@ -639,7 +639,7 @@ }, "94": { "inputs": { - "value": 1536 + "value": 1024 }, "class_type": "PrimitiveInt", "_meta": { @@ -819,7 +819,7 @@ }, "110": { "inputs": { - "preview": "1638400", + "preview": "1180672", "source": [ "106", 0 @@ -832,7 +832,7 @@ }, "111": { "inputs": { - "preview": "2048", + "preview": "768", "source": [ "108", 0 @@ -845,7 +845,7 @@ }, "112": { "inputs": { - "preview": "2048", + "preview": "1025", "source": [ "109", 0 @@ -858,7 +858,7 @@ }, "113": { "inputs": { - "preview": "4096", + "preview": "1793", "source": [ "107", 0 @@ -871,7 +871,7 @@ }, "114": { "inputs": { - "preview": "2048", + "preview": "1024", "source": [ "107", 1 @@ -882,30 +882,76 @@ "title": "Preview Any" } }, - "115": { + "117": { "inputs": { - "preview": "800", - "source": [ - "104", + "anything": [ + "8", 0 ] }, - "class_type": "PreviewAny", + "class_type": "easy clearCacheAll", "_meta": { - "title": "Preview Any" + "title": "Clear Cache All" } }, - "116": { + "118": { "inputs": { - "preview": "800", - "source": [ - "104", - 1 + "anything": [ + "8", + 0 ] }, - "class_type": "PreviewAny", + "class_type": "easy cleanGpuUsed", "_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": { @@ -928,7 +974,7 @@ }, "71:2": { "inputs": { - "prompt": "shoes", + "prompt": "cloth", "threshold": 0.3, "sam_model": [ "71:0", diff --git a/http_app.py b/http_app.py index 7aefade..bb89a7f 100644 --- a/http_app.py +++ b/http_app.py @@ -423,5 +423,26 @@ def change_cloth(): 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__': app.run(host="0.0.0.0", port=8888, debug=True) \ No newline at end of file