From 7b4cdea2a44dda6eb042eed5af1439726a4c5e1a Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 20 May 2024 14:25:07 -0400 Subject: [PATCH] Update examples (#2921) --- example/inpaint_example/api_inpaint.py | 4 ++-- example/txt2img_example/api_txt2img.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/inpaint_example/api_inpaint.py b/example/inpaint_example/api_inpaint.py index a8a8362..92d6f47 100644 --- a/example/inpaint_example/api_inpaint.py +++ b/example/inpaint_example/api_inpaint.py @@ -66,7 +66,7 @@ img2img_payload = { "ControlNet": { "args": [ { - "control_mode": 0, + "control_mode": "Balanced", "enabled": True, "guidance_end": 1, "guidance_start": 0, @@ -75,7 +75,7 @@ img2img_payload = { "module": "inpaint_only", "pixel_perfect": True, "processor_res": 512, - "resize_mode": 1, + "resize_mode": "Crop and Resize", "threshold_a": 64, "threshold_b": 64, "weight": 1, diff --git a/example/txt2img_example/api_txt2img.py b/example/txt2img_example/api_txt2img.py index 1413379..018383b 100644 --- a/example/txt2img_example/api_txt2img.py +++ b/example/txt2img_example/api_txt2img.py @@ -37,14 +37,14 @@ class ControlnetRequest: "model": "canny", "weight": 1.0, "image": self.read_image(), - "resize_mode": 1, + "resize_mode": "Crop and Resize", "lowvram": False, "processor_res": 64, "threshold_a": 64, "threshold_b": 64, "guidance_start": 0.0, "guidance_end": 1.0, - "control_mode": 0, + "control_mode": "Balanced", "pixel_perfect": False } ]