From c9adf311b827f4935ce1fd78a7979b46f11a5135 Mon Sep 17 00:00:00 2001 From: ramyma Date: Fri, 16 Aug 2024 01:12:30 +0300 Subject: [PATCH] v0.8.0-beta Revamped the img2img workflow, added soft inapinting, added fooocus inpainting, added IPA integration with masking and added CN union integration --- assets/js/src/LayersControl.tsx | 42 ++ .../ComfySoftInpaintingFields.tsx | 46 ++ .../ComfySoftInpaintingFields/constants.ts | 24 + .../ComfySoftInpaintingFields/index.ts | 1 + assets/js/src/MainForm/MainForm.tsx | 20 +- assets/js/src/hooks/useControlnet.tsx | 13 +- assets/js/src/state/controlnetSlice.ts | 4 + lib/ex_sd/comfy_client.ex | 17 + lib/ex_sd/sd.ex | 3 + lib/ex_sd/sd/comfy_prompt.ex | 45 +- lib/ex_sd/sd/control_net_args.ex | 6 +- lib/ex_sd/sd/image_service.ex | 22 +- lib/ex_sd/sd/sd_service.ex | 6 +- lib/ex_sd/sd_server.ex | 61 ++- lib/ex_sd_web/channels/sd_channel.ex | 10 +- prompt.json | 434 ------------------ 16 files changed, 294 insertions(+), 460 deletions(-) create mode 100644 assets/js/src/MainForm/ComfySoftInpaintingFields/ComfySoftInpaintingFields.tsx create mode 100644 assets/js/src/MainForm/ComfySoftInpaintingFields/constants.ts create mode 100644 assets/js/src/MainForm/ComfySoftInpaintingFields/index.ts delete mode 100644 prompt.json diff --git a/assets/js/src/LayersControl.tsx b/assets/js/src/LayersControl.tsx index 622a134..903cd4b 100644 --- a/assets/js/src/LayersControl.tsx +++ b/assets/js/src/LayersControl.tsx @@ -449,6 +449,7 @@ const LayersControl = () => { controlnetDetect, ip_adapter_models, ip_adapter_weight_types, + unionControlnetTypes, } = useControlnet(); // const { register, handleSubmit, setValue } = useForm(); @@ -905,6 +906,22 @@ const LayersControl = () => { )} + {backend === "comfy" && !activeControlnetLayer?.isIpAdapter && ( + + handleControlnetAttrsChange( + "is_union", + value, + activeControlnetLayer.id + ) + } + > + Union Controlnet + + )} + {backend === "comfy" && activeControlnetLayer?.isIpAdapter ? ( <>
@@ -993,6 +1010,31 @@ const LayersControl = () => { )} + {backend === "comfy" && + !activeControlnetLayer?.isIpAdapter && + activeControlnetLayer?.is_union && ( +
+ +