diff --git a/README.kr.md b/README.kr.md
new file mode 100644
index 0000000..df7b650
--- /dev/null
+++ b/README.kr.md
@@ -0,0 +1,194 @@
+# ๐จ ComfyUI-productfix
+
+
+e-commerce ์ํ์ ํ
์คํธ, ๋ก๊ณ , ๋ํ
์ผ ๋ฑ์ ์ ์งํ๋ฉด์ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ ์ ์๋๋ก ๋์์ฃผ๋ ComfyUI ์ปค์คํ
๋
ธ๋์
๋๋ค.
+
+
+## ๐ฌ Demo
+
+
+
+์ค๋งํธํฐ์ผ๋ก ์ฐ์ ๋ด ๋ฐฉ ๋ฌผ๊ฑด(์๋ณด์ X)๋ค๋ก ์์ฑํ AI ์ด๋ฏธ์ง
+
+## ๐ Index
+
+- [Introduction](#-introduction)
+- [Features](#-features)
+- [Models and Custom Nodes](#-models-and-custom-nodes)
+- [Application](#-application)
+- [Approach](#-approach)
+- [Install](#-install)
+- [How to use](#-how-to-use)
+
+## ๐ Introduction
+
+Stable diffusion์ผ๋ก ์์ฑํ ์ด๋ฏธ์ง๋ ์๊ฐ์ ์ผ๋ก ์์ฐ์ค๋ฝ๊ณ ์ถฉ์ค๋๊ฐ ๋์ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ์ง๋ง, ์์ฑ ๊ณผ์ ์์ ์
๋ ฅ ๊ฐ์ฒด๊ฐ ๋ณํ๋๋ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ๊ฐ์ฒด์ ํ
์คํธ์ ๋ธ๋๋ ๋ก๊ณ ๊ฐ์ด ์ธ์์ ๊ท์น์ฑ์ ๊ฐ์ง ์์์์ ์ด ๋ฌธ์ ๊ฐ ํนํ ๋๋๋ฌ์ง๋๋ค. ์ด๋ฐ **๋ณํ ๋ฌธ์ ๋ e-commerce ํ๊ฒฝ์์ ํ๋งคํ๋ ์ค์ ์ํ์ ์ ์ฉํ ๊ฒฝ์ฐ ์ฌ๊ฐํ ์ ์ฝ**์ผ๋ก ์์ฉํฉ๋๋ค.
+
+**Productfix**๋ ์
๋ ฅ ๊ฐ์ฒด์ ํน์ฑ(ํ
์คํธ, ๋ก๊ณ , ๋ํ
์ผ ๋ฑ)์ ์ ์งํ๋ฉด์ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ ์ ์๋ **Latent injection**์ด๋ผ๋ AI application์ ์ ๊ณตํฉ๋๋ค. ๋ํ ๊ฐ์ฒด์ ์ธ๋ถ ์ฌํญ์ ๋ณด์กดํ๋๋ฐ ๋์์ด ๋๋ ์ถ๊ฐ์ ์ธ ๋
ธ๋ ์ ๊ณตํฉ๋๋ค.
+
+์ด ๋
ธ๋๋ฅผ ํตํด ๊ธฐ์กด์ ๋์์ธ ํด(ํฌํ ์ต, ์ผ๋ฌ์คํธ๋ ์ดํฐ ๊ฐ์)๋ก ํด์ผ๋ง ํ๋ ํ์ฒ๋ฆฌ ์์
์ ๋ํญ ์ค์ผ ์ ์์ ๊ฒ์ผ๋ก ๊ธฐ๋ํฉ๋๋ค. ComfyUI์์ custom node๋ฅผ ํตํด ์ฌ๋ฌ๋ถ์ ์ํฌํ๋ก์ฐ์ ํตํฉํ ์ ์์ต๋๋ค.
+
+## ๐ก Features
+
+
+ Apply Latent Injection
+
+ - ComfyUI์ KSampler ๋
ธ๋๋ฅผ hijackํ์ฌ Latent injection์ ์ํํ๋๋ก ์ค์ ํฉ๋๋ค.
+ - ์คํ์ด ์๋ฃ๋๋ฉด ๋ณธ๋ KSampler ๋
ธ๋๋ก ๋ณต๊ตฌํฉ๋๋ค.
+
+
+
+
+ Get Text Mask
+
+ - Easy OCR ํจํค์ง๋ฅผ ์ด์ฉํ์ฌ Text Mask๋ฅผ Tensor๋ก ๋ถ๋ฌ์ค๋ ๋
ธ๋์
๋๋ค.
+ - Easy OCR custom node๋ ์ด๋ฏธ ์กด์ฌํ์ง๋ง(https://github.com/JaidedAI/EasyOCR), PIL ํจํค์ง ์ฌ์ฉ๋ฐฉ๋ฒ์ด stableํ์ง ์๊ธฐ ๋๋ฌธ์ ์ด ๋
ธ๋ ์ฌ์ฉ์ ์ถ์ฒํฉ๋๋ค.
+
+
+
+
+ Reset Model Patcher Calculate Weight
+
+ - ๋ค๋ฅธ node์์ Modelpatcher์ calculate weight ํจ์๋ฅผ injectionํ๋ค๋ฉด ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ custom node๊ฐ ๋ค์ ์กด์ฌํฉ๋๋ค.(ex: ComfyUI-Easy-Use https://github.com/yolain/ComfyUI-Easy-Use.git)
+ - ์ด๋ฅผ ์๋ณธ Modelpatcher์ calculate weight๋ก resetํ์ฌ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋
ธ๋์
๋๋ค.
+
+
+
+## ๐ Models and Custom Nodes
+
+### Models
+- [realisticVisionV60B1_v51HyperVAE](https://huggingface.co/JCTN/Juggernaut/blob/main/realisticVisionV60B1_v51HyperVAE.safetensors)
+- [ic light](https://huggingface.co/lllyasviel/ic-light/blob/main/iclight_sd15_fc.safetensors)
+- [depth controlnet v1.1](https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11f1p_sd15_depth.pth)
+- [more detail lora](https://civitai.com/models/82098/add-more-details-detail-enhancer-tweaker-lora)
+
+### Custom nodes
+- [ComfyUI-productfix](https://github.com/MiddleKD/ComfyUI-productfix)
+- [comfyui_controlnet_aux v1.0.7](https://github.com/Fannovel16/comfyui_controlnet_aux)
+- [ComfyUI Impact Pack v8.14.2](https://github.com/ltdrdata/ComfyUI-Impact-Pack)
+- [ComfyUI-Easy-Use v1.3.0](https://github.com/yolain/ComfyUI-Easy-Use)
+- [ComfyUI_essentials v1.1.0](https://github.com/cubiq/ComfyUI_essentials)
+- [ComfyUI-IC-Light-Native v1.0.1](https://github.com/huchenlei/ComfyUI-IC-Light-Native) **(not [ComfyUI-IC-Light](https://github.com/lllyasviel/IC-Light))**
+
+## ๐๐ปโโ๏ธ Application
+- ### **Comparing โIC-Light + Textโ / โIC-Light + Text + Latent Injectionโ**
+
+ condition / Input / IC-Light / **latent injection($\sigma_{end}$=1.0)** / **latent injection($\sigma_{end}$=0.5)**
+ 
+ prompt: product photo, professional photography, realistic, leaf, outdoors / seed: 42
+
+- ### **Comparing โIC-Light + IP-Adapterโ / โIC-Light + IP-Adapter + Latent Injectionโ**
+
+ condition / Input / IC-Light / **latent injection($\sigma_{end}$=1.0)** / **latent injection($\sigma_{end}$=0.5)**
+ 
+ prompt: product photo, professional photography, realistic / seed: 42
+
+ Latent injection์ IC-Light์ IP-Adapter๋ฅผ ํจ๊ป ์ฌ์ฉํ ๋ ์ง๊ฐ๋ฅผ ๋ฐํํฉ๋๋ค.ํ
ํ๋ฆฟ ์คํ์ผ ์ด๋ฏธ์ง์ ์ํ์ ํฉ์ฑํ ๋ ์ฌ์ฉํด๋ณด์ธ์!
+- ### **IC-Light + controlnet + text condition + Text transfer + Latent Injection**
+
+ 
+ Items in my room captured with my phone camera
+ 
+ prompt: product photo, professional photography, realistic, water, bubble / seed: 42 / controlnet: depth
+ 
+ prompt: product photo, professional photography, realistic, flowers, outdoors / seed: 42 / controlnet: depth
+- ### **IC-Light + controlnet + IP-Adapter + Text transfer + Latent Injection**
+
+ 
+ Items in my room captured with my phone camera
+
+ 
+
+ prompt: product photo, professional photography, realistic / seed: 42 / controlnet: depth
+
+ 
+ prompt: product photo, professional photography, realistic / seed: 42 / controlnet: depth
+- ### **Text transfer**
+
+ 
+ Input / text condition / image condition(IP-Adapter)
+
+ 
+ only IC-Light / **Latent injection** / detail transfer / **Text transfer**
+
+ 
+ close up
+
+ 
+ only IC-Light / **Latent injection** / detail transfer / **Text transfer**
+
+ 
+ close up
+
+ Text transfer๋ ์
๋ ฅ ๊ฐ์ฒด์ ํ
์คํธ๋ฅผ ๋ณด์กดํ๊ธฐ ์ํด ๊ฐ๋ฐ๋ OCR ํ
์คํธ ๋ง์คํฌ ๊ธฐ๋ฐ Detail transfer application์
๋๋ค. `GetTextMask` node์ `DetailTransfer` node๋ฅผ ํ์ฉํด ๊ตฌํ ๊ฐ๋ฅํฉ๋๋ค.
+
+- ### **Upscaled results + Text detail transfer**
+ 
+
+
+## ๐ Approach
+
+- ### Background: Inpainting
+Diffusion ๋ชจ๋ธ์ Inpainting์ ๋ง์คํฌ๋ฅผ ์กฐ๊ฑด์ผ๋ก ์ด๋ฏธ์ง๋ฅผ ์์ฑํฉ๋๋ค. ๊ฐ ์ํ๋ง ๋จ๊ณ์์ ๋ง์คํฌ๋ฅผ ๊ธฐ์ค์ผ๋ก ์๋ณธ๊ณผ ์์ฑ๋ ์ ์ฌ ๊ณต๊ฐ์ ํฉ์ฑํฉ๋๋ค. ์ด ๋ฐฉ๋ฒ์ ์
๋ ฅ ๊ฐ์ฒด๋ฅผ ์ ์งํ๋ฉด์ ๋ง์คํฌ ์์ญ์ ์์ฑํ ์ ์์ง๋ง, **์ ํ์ง ์
๋ ฅ ๊ฐ์ฒด(์: ์ค๋งํธํฐ์ผ๋ก ์ดฌ์)์ ๊ฒฝ์ฐ ๊ฒฐ๊ณผ ์ด๋ฏธ์ง ํ์ง๋ ์ ํ๋๋ ํ๊ณ**๊ฐ ์์ต๋๋ค.
+
+- ### Background: IC-Light
+IC-Light๋ ์ ๊ฒฝ๊ณผ ๋ฐฐ๊ฒฝ์ ์กฐ๋ช
์ ์กฐ์ํ๋ ํ์ ์ ์ธ Adapter Unet์
๋๋ค. ์
๋ ฅ ๊ฐ์ฒด์ ์ฌ์กฐ๋ช
์ ํตํด ์ ํ์ง ๊ฐ์ฒด๋ ์ฐ์ํ ๊ฒฐ๊ณผ ์ด๋ฏธ์ง๋ก ๋ณํํฉ๋๋ค. ๊ทธ๋ฌ๋ **์ ๊ฒฝ ์์ฑ ๊ณผ์ ์์ ๊ฐ์ฒด ์ธ๋ถ ์ฌํญ์ด ๋ณํ๋๋ ๋ฌธ์ **๋ ์ฌ์ ํ ์กด์ฌํฉ๋๋ค.
+
+- ### Background: Kandinsky Inpainting Process
+Kandinsky diffusion inpainting์ ์ผ๋ฐ์ ์ธ inpainting๊ณผ ์ฐจ์ด๊ฐ ์์ต๋๋ค. ์ํ๋ง ๋จ๊ณ๋ง๋ค ์ ์ฌ ๊ณต๊ฐ์ ํฉ์ฑํ ๋, **์๋ณธ ๋์ scheduler์ sigma ๊ฐ์ ๋ฐ๋ฅธ ๋
ธ์ด์ฆ๊ฐ ์ถ๊ฐ๋ ์ ์ฌ ๊ณต๊ฐ์ ์ฌ์ฉ**ํฉ๋๋ค. ์ด ๋ฐฉ์์ ์ผ๊ด๋ ๋
ธ์ด์ฆ๋ฅผ ํตํด ํ์ง ํฅ์์ ์ด๋์ด๋
๋๋ค.
+
+- ### Background: CLIP Skip
+CLIP Skip์ ํ
์คํธ ์กฐ๊ฑด์ ์ ์ฉํ ๋, **์ํ๋ง ๊ณผ์ ์ ๋ง์ง๋ง ๋จ๊ณ๊น์ง ์ ์ฉํ์ง ์๊ณ ์ค๊ฐ์ ์ค๋จํ๋ ์ถ๋ก ๋ฐฉ๋ฒ**์
๋๋ค. ์ด๋ ์กฐ๊ฑด์ ์ ์ดํ์ฌ ์ ์ฒด ๋งฅ๋ฝ์ ๋ถํฉํ๋ ๊ฒฐ๊ณผ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ๋ ํจ๊ณผ๊ฐ ์์ต๋๋ค.
+
+- ### Solution: Latent injection
+
+ 
+
+ 
+
+ $X_t$ : sample
+
+ $M$ : product mask
+
+ $P$ : product latent
+
+ $CO$ : composition operation(ex: add, overlay, soft light etc.)
+
+ ์
๋ ฅ ๊ฐ์ฒด์ ํน์ง ๋ณด์กด๊ณผ ์๋ฏธ ์๋ ์กฐ๋ช
๋ณํ๋ฅผ ๋์์ ๋ฌ์ฑํ๊ธฐ ์ํด ๋ณตํฉ์ ์ธ ์ ๋ต์ ์ ์ฉํฉ๋๋ค. **์ํ๋ง ๊ณผ์ ์์ ๋
ธ์ด์ฆ๊ฐ ์ถ๊ฐ๋ ์ ์ฌ ๊ณต๊ฐ์ ๋ณตํฉ ์ฐ์ฐํ์ฌ ๊ฐ์ฒด์ ์ธ๋ถ ํน์ง์ ์ ์ง**ํฉ๋๋ค. ๋ํ IC-Light์ ์ ์ญ์ ์กฐ๋ช
๋ณํ ํน์ฑ์ ๋ฐ์ํ๊ธฐ ์ํด **์ํ๋ง์ ์ด๊ธฐ์ ํ๊ธฐ ๋จ๊ณ๋ฅผ ์ ํ์ ์ผ๋ก ๊ฑด๋๋๋๋ค.** ์ด ๋ฐฉ์์ scheduler์ sigma ๊ฐ์ ๊ธฐ์ค์ผ๋ก ์๋ํ๊ธฐ ๋๋ฌธ์ ๋ค์ํ scheduler ์ ํ์ ๋ํด ์์ ์ ์ธ ์ฑ๋ฅ์ ๋ณด์ฅํฉ๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก ๊ฐ์ฒด์ ๊ณ ์ ํ ํน์ฑ์ ๋ณด์กดํ๋ฉด์๋ ์กฐ๋ช
ํจ๊ณผ๋ฅผ ์ ๋์ ์ผ๋ก ์ ์ฉํ ์ ์์ต๋๋ค.
+
+
+## ๐ฅ Install
+
+```bash
+cd custom_nodes
+git clone {this repository}
+pip install -r requirements.txt
+```
+
+## ๐ฅ How to use
+
+### **ComfyUI-workflows**
+
+- **IC-Light + controlnet + text condition + Text transfer + Latent Injection**
+ 
+
+ [์ฌ๊ธฐ์](workflows/productfix_text.json) workflow๋ฅผ ๋ค์ด๋ก๋ํ ์ ์์ต๋๋ค.
+
+- **IC-Light + controlnet + IP-Adapter + Text transfer + Latent Injection**
+ 
+
+ [์ฌ๊ธฐ์](workflows/productfix_adapter.json) workflow๋ฅผ ๋ค์ด๋ก๋ ํ ์ ์์ต๋๋ค.
+
+### **demo example assets**
+- [product example image](assets/demo_example/pr_example.png)
+- [style example image](assets/demo_example/style_example.jpg)
+
+## ๐ Reference
+
+This project is based on research and code from several papers and open-source repositories.
+
+- IC-Light: https://github.com/lllyasviel/IC-Light
+- kandinsky2.2: https://github.com/ai-forever/Kandinsky-2
+- clip-skip: https://medium.com/@natsunoyuki/clip-skip-with-the-diffusers-library-b2b63f38a443
+- Anton Razzhigaev,ย Arseniy Shakhmatov, Kandinsky: an Improved Text-to-Image Synthesis with Image Prior and Latent Diffusion, **arXiv**, 2023
+- Chuanxia Zheng,ย Long Tung Vuong,ย Jianfei Cai,ย Dinh Phung, MoVQ: Modulating Quantized Vectors for High-Fidelity Image Generation, **arXiv**, 2022
diff --git a/README.md b/README.md
index aab5c77..114dd79 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,13 @@
# ๐จ ComfyUI-productfix

-e-commerce ์ํ์ ํ
์คํธ, ๋ก๊ณ , ๋ํ
์ผ ๋ฑ์ ์ ์งํ๋ฉด์ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ ์ ์๋๋ก ๋์์ฃผ๋ ComfyUI ์ปค์คํ
๋
ธ๋์
๋๋ค.
-
+ComfyUI custom node that helps generate images while preserving the text, logos, and details of e-commerce products.
## ๐ฌ Demo

-์ค๋งํธํฐ์ผ๋ก ์ฐ์ ๋ด ๋ฐฉ ๋ฌผ๊ฑด(์๋ณด์ X)๋ค๋ก ์์ฑํ AI ์ด๋ฏธ์ง
+AI-generated images of items in my room taken with a smartphone (no color correction).
## ๐ Index
@@ -22,35 +21,35 @@ e-commerce ์ํ์ ํ
์คํธ, ๋ก๊ณ , ๋ํ
์ผ ๋ฑ์ ์ ์งํ๋ฉด์ ์ด๋ฏธ
## ๐ Introduction
-Stable diffusion์ผ๋ก ์์ฑํ ์ด๋ฏธ์ง๋ ์๊ฐ์ ์ผ๋ก ์์ฐ์ค๋ฝ๊ณ ์ถฉ์ค๋๊ฐ ๋์ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ์ง๋ง, ์์ฑ ๊ณผ์ ์์ ์
๋ ฅ ๊ฐ์ฒด๊ฐ ๋ณํ๋๋ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ๊ฐ์ฒด์ ํ
์คํธ์ ๋ธ๋๋ ๋ก๊ณ ๊ฐ์ด ์ธ์์ ๊ท์น์ฑ์ ๊ฐ์ง ์์์์ ์ด ๋ฌธ์ ๊ฐ ํนํ ๋๋๋ฌ์ง๋๋ค. ์ด๋ฐ **๋ณํ ๋ฌธ์ ๋ e-commerce ํ๊ฒฝ์์ ํ๋งคํ๋ ์ค์ ์ํ์ ์ ์ฉํ ๊ฒฝ์ฐ ์ฌ๊ฐํ ์ ์ฝ**์ผ๋ก ์์ฉํฉ๋๋ค.
+Images generated with Stable Diffusion are visually natural and high-fidelity, but there is an issue where the input object is deformed during generation. This problem is especially noticeable with elements that have artificial regularity, such as text and brand logos. Such **deformation issues are a serious limitation when applied to real products sold in e-commerce environments**.
-**Productfix**๋ ์
๋ ฅ ๊ฐ์ฒด์ ํน์ฑ(ํ
์คํธ, ๋ก๊ณ , ๋ํ
์ผ ๋ฑ)์ ์ ์งํ๋ฉด์ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ ์ ์๋ **Latent injection**์ด๋ผ๋ AI application์ ์ ๊ณตํฉ๋๋ค. ๋ํ ๊ฐ์ฒด์ ์ธ๋ถ ์ฌํญ์ ๋ณด์กดํ๋๋ฐ ๋์์ด ๋๋ ์ถ๊ฐ์ ์ธ ๋
ธ๋ ์ ๊ณตํฉ๋๋ค.
+**Productfix** provides an AI application called **Latent Injection**, which generates images while preserving the characteristics of the input object (text, logo, details, etc.). It also offers additional nodes that help retain fine details of objects.
-์ด ๋
ธ๋๋ฅผ ํตํด ๊ธฐ์กด์ ๋์์ธ ํด(ํฌํ ์ต, ์ผ๋ฌ์คํธ๋ ์ดํฐ ๊ฐ์)๋ก ํด์ผ๋ง ํ๋ ํ์ฒ๋ฆฌ ์์
์ ๋ํญ ์ค์ผ ์ ์์ ๊ฒ์ผ๋ก ๊ธฐ๋ํฉ๋๋ค. ComfyUI์์ custom node๋ฅผ ํตํด ์ฌ๋ฌ๋ถ์ ์ํฌํ๋ก์ฐ์ ํตํฉํ ์ ์์ต๋๋ค.
+With these nodes, it is expected that much of the post-processing work that previously had to be done with design tools (like Photoshop or Illustrator) can be greatly reduced. You can integrate these custom nodes into your workflow in ComfyUI.
## ๐ก Features
Apply Latent Injection
- - ComfyUI์ KSampler ๋
ธ๋๋ฅผ hijackํ์ฌ Latent injection์ ์ํํ๋๋ก ์ค์ ํฉ๋๋ค.
- - ์คํ์ด ์๋ฃ๋๋ฉด ๋ณธ๋ KSampler ๋
ธ๋๋ก ๋ณต๊ตฌํฉ๋๋ค.
+ - Hijacks the KSampler node in ComfyUI to perform Latent Injection.
+ - Restores the original KSampler node after execution.
Get Text Mask
- - Easy OCR ํจํค์ง๋ฅผ ์ด์ฉํ์ฌ Text Mask๋ฅผ Tensor๋ก ๋ถ๋ฌ์ค๋ ๋
ธ๋์
๋๋ค.
- - Easy OCR custom node๋ ์ด๋ฏธ ์กด์ฌํ์ง๋ง(https://github.com/JaidedAI/EasyOCR), PIL ํจํค์ง ์ฌ์ฉ๋ฐฉ๋ฒ์ด stableํ์ง ์๊ธฐ ๋๋ฌธ์ ์ด ๋
ธ๋ ์ฌ์ฉ์ ์ถ์ฒํฉ๋๋ค.
+ - Node that loads a text mask as a tensor using the Easy OCR package.
+ - Although an Easy OCR custom node already exists (https://github.com/JaidedAI/EasyOCR), this node is recommended because PIL usage is not stable.
Reset Model Patcher Calculate Weight
- - ๋ค๋ฅธ node์์ Modelpatcher์ calculate weight ํจ์๋ฅผ injectionํ๋ค๋ฉด ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ custom node๊ฐ ๋ค์ ์กด์ฌํฉ๋๋ค.(ex: comfyui-inpaint-nodes https://github.com/yolain/ComfyUI-Easy-Use.git)
- - ์ด๋ฅผ ์๋ณธ Modelpatcher์ calculate weight๋ก resetํ์ฌ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋
ธ๋์
๋๋ค.
+ - Many custom nodes (e.g., ComfyUI-Easy-Use https://github.com/yolain/ComfyUI-Easy-Use.git) cause errors if another node has injected the calculate weight function of Modelpatcher.
+ - This node resets it to the original Modelpatcher calculate weight to resolve such issues.
@@ -83,7 +82,7 @@ Stable diffusion์ผ๋ก ์์ฑํ ์ด๋ฏธ์ง๋ ์๊ฐ์ ์ผ๋ก ์์ฐ์ค๋ฝ๊ณ

prompt: product photo, professional photography, realistic / seed: 42
- Latent injection์ IC-Light์ IP-Adapter๋ฅผ ํจ๊ป ์ฌ์ฉํ ๋ ์ง๊ฐ๋ฅผ ๋ฐํํฉ๋๋ค.ํ
ํ๋ฆฟ ์คํ์ผ ์ด๋ฏธ์ง์ ์ํ์ ํฉ์ฑํ ๋ ์ฌ์ฉํด๋ณด์ธ์!
+ Latent injection truly shines when used together with IC-Light and IP-Adapter. Try it when compositing template-style images and products!
- ### **IC-Light + controlnet + text condition + Text transfer + Latent Injection**

@@ -120,7 +119,7 @@ Stable diffusion์ผ๋ก ์์ฑํ ์ด๋ฏธ์ง๋ ์๊ฐ์ ์ผ๋ก ์์ฐ์ค๋ฝ๊ณ

close up
- Text transfer๋ ์
๋ ฅ ๊ฐ์ฒด์ ํ
์คํธ๋ฅผ ๋ณด์กดํ๊ธฐ ์ํด ๊ฐ๋ฐ๋ OCR ํ
์คํธ ๋ง์คํฌ ๊ธฐ๋ฐ Detail transfer application์
๋๋ค. `GetTextMask` node์ `DetailTransfer` node๋ฅผ ํ์ฉํด ๊ตฌํ ๊ฐ๋ฅํฉ๋๋ค.
+ Text transfer is a detail transfer application based on OCR text masks, developed to preserve the text of input objects. You can implement it using the `GetTextMask` node and the `DetailTransfer` node.
- ### **Upscaled results + Text detail transfer**

@@ -129,16 +128,16 @@ Stable diffusion์ผ๋ก ์์ฑํ ์ด๋ฏธ์ง๋ ์๊ฐ์ ์ผ๋ก ์์ฐ์ค๋ฝ๊ณ
## ๐ Approach
- ### Background: Inpainting
-Diffusion ๋ชจ๋ธ์ Inpainting์ ๋ง์คํฌ๋ฅผ ์กฐ๊ฑด์ผ๋ก ์ด๋ฏธ์ง๋ฅผ ์์ฑํฉ๋๋ค. ๊ฐ ์ํ๋ง ๋จ๊ณ์์ ๋ง์คํฌ๋ฅผ ๊ธฐ์ค์ผ๋ก ์๋ณธ๊ณผ ์์ฑ๋ ์ ์ฌ ๊ณต๊ฐ์ ํฉ์ฑํฉ๋๋ค. ์ด ๋ฐฉ๋ฒ์ ์
๋ ฅ ๊ฐ์ฒด๋ฅผ ์ ์งํ๋ฉด์ ๋ง์คํฌ ์์ญ์ ์์ฑํ ์ ์์ง๋ง, **์ ํ์ง ์
๋ ฅ ๊ฐ์ฒด(์: ์ค๋งํธํฐ์ผ๋ก ์ดฌ์)์ ๊ฒฝ์ฐ ๊ฒฐ๊ณผ ์ด๋ฏธ์ง ํ์ง๋ ์ ํ๋๋ ํ๊ณ**๊ฐ ์์ต๋๋ค.
+ Inpainting in diffusion models generates images conditioned on a mask. At each sampling step, the latent space of the original and the generated image is composited based on the mask. This method allows for generation while preserving the input object, but **for low-quality input objects (e.g., taken with a smartphone), the output image quality is also limited**.
- ### Background: IC-Light
-IC-Light๋ ์ ๊ฒฝ๊ณผ ๋ฐฐ๊ฒฝ์ ์กฐ๋ช
์ ์กฐ์ํ๋ ํ์ ์ ์ธ Adapter Unet์
๋๋ค. ์
๋ ฅ ๊ฐ์ฒด์ ์ฌ์กฐ๋ช
์ ํตํด ์ ํ์ง ๊ฐ์ฒด๋ ์ฐ์ํ ๊ฒฐ๊ณผ ์ด๋ฏธ์ง๋ก ๋ณํํฉ๋๋ค. ๊ทธ๋ฌ๋ **์ ๊ฒฝ ์์ฑ ๊ณผ์ ์์ ๊ฐ์ฒด ์ธ๋ถ ์ฌํญ์ด ๋ณํ๋๋ ๋ฌธ์ **๋ ์ฌ์ ํ ์กด์ฌํฉ๋๋ค.
+ IC-Light is an innovative Adapter UNet that manipulates foreground and background lighting. By relighting the input object, even low-quality objects can be transformed into high-quality output images. However, **there are still issues with deformation of object details during foreground generation**.
- ### Background: Kandinsky Inpainting Process
-Kandinsky diffusion inpainting์ ์ผ๋ฐ์ ์ธ inpainting๊ณผ ์ฐจ์ด๊ฐ ์์ต๋๋ค. ์ํ๋ง ๋จ๊ณ๋ง๋ค ์ ์ฌ ๊ณต๊ฐ์ ํฉ์ฑํ ๋, **์๋ณธ ๋์ scheduler์ sigma ๊ฐ์ ๋ฐ๋ฅธ ๋
ธ์ด์ฆ๊ฐ ์ถ๊ฐ๋ ์ ์ฌ ๊ณต๊ฐ์ ์ฌ์ฉ**ํฉ๋๋ค. ์ด ๋ฐฉ์์ ์ผ๊ด๋ ๋
ธ์ด์ฆ๋ฅผ ํตํด ํ์ง ํฅ์์ ์ด๋์ด๋
๋๋ค.
+ Kandinsky diffusion inpainting differs from typical inpainting. When compositing latent spaces at each sampling step, **it uses a latent space with noise added according to the scheduler's sigma value instead of the original**. This approach improves quality through consistent noise.
- ### Background: CLIP Skip
-CLIP Skip์ ํ
์คํธ ์กฐ๊ฑด์ ์ ์ฉํ ๋, **์ํ๋ง ๊ณผ์ ์ ๋ง์ง๋ง ๋จ๊ณ๊น์ง ์ ์ฉํ์ง ์๊ณ ์ค๊ฐ์ ์ค๋จํ๋ ์ถ๋ก ๋ฐฉ๋ฒ**์
๋๋ค. ์ด๋ ์กฐ๊ฑด์ ์ ์ดํ์ฌ ์ ์ฒด ๋งฅ๋ฝ์ ๋ถํฉํ๋ ๊ฒฐ๊ณผ ์ด๋ฏธ์ง๋ฅผ ์์ฑํ๋ ํจ๊ณผ๊ฐ ์์ต๋๋ค.
+ CLIP Skip is an inference method where text conditioning is not applied until the last sampling step but is stopped midway. This allows for more contextually appropriate results by controlling the conditioning process.
- ### Solution: Latent injection
@@ -154,7 +153,7 @@ CLIP Skip์ ํ
์คํธ ์กฐ๊ฑด์ ์ ์ฉํ ๋, **์ํ๋ง ๊ณผ์ ์ ๋ง์ง๋ง
$CO$ : composition operation(ex: add, overlay, soft light etc.)
- ์
๋ ฅ ๊ฐ์ฒด์ ํน์ง ๋ณด์กด๊ณผ ์๋ฏธ ์๋ ์กฐ๋ช
๋ณํ๋ฅผ ๋์์ ๋ฌ์ฑํ๊ธฐ ์ํด ๋ณตํฉ์ ์ธ ์ ๋ต์ ์ ์ฉํฉ๋๋ค. **์ํ๋ง ๊ณผ์ ์์ ๋
ธ์ด์ฆ๊ฐ ์ถ๊ฐ๋ ์ ์ฌ ๊ณต๊ฐ์ ๋ณตํฉ ์ฐ์ฐํ์ฌ ๊ฐ์ฒด์ ์ธ๋ถ ํน์ง์ ์ ์ง**ํฉ๋๋ค. ๋ํ IC-Light์ ์ ์ญ์ ์กฐ๋ช
๋ณํ ํน์ฑ์ ๋ฐ์ํ๊ธฐ ์ํด **์ํ๋ง์ ์ด๊ธฐ์ ํ๊ธฐ ๋จ๊ณ๋ฅผ ์ ํ์ ์ผ๋ก ๊ฑด๋๋๋๋ค.** ์ด ๋ฐฉ์์ scheduler์ sigma ๊ฐ์ ๊ธฐ์ค์ผ๋ก ์๋ํ๊ธฐ ๋๋ฌธ์ ๋ค์ํ scheduler ์ ํ์ ๋ํด ์์ ์ ์ธ ์ฑ๋ฅ์ ๋ณด์ฅํฉ๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก ๊ฐ์ฒด์ ๊ณ ์ ํ ํน์ฑ์ ๋ณด์กดํ๋ฉด์๋ ์กฐ๋ช
ํจ๊ณผ๋ฅผ ์ ๋์ ์ผ๋ก ์ ์ฉํ ์ ์์ต๋๋ค.
+ To achieve both preservation of object features and meaningful lighting changes, a composite strategy is applied. **During the sampling process, latent spaces with added noise are composited to preserve fine object details.** Additionally, to reflect the global lighting changes of IC-Light, the initial and final steps of sampling are selectively skipped. This method operates based on the scheduler's sigma value, ensuring stable performance across various scheduler types. As a result, it is possible to flexibly apply lighting effects while preserving the unique characteristics of the object.
## ๐ฅ Install
@@ -172,16 +171,16 @@ pip install -r requirements.txt
- **IC-Light + controlnet + text condition + Text transfer + Latent Injection**

- [์ฌ๊ธฐ์](workflows/productfix_text.json) workflow๋ฅผ ๋ค์ด๋ก๋ํ ์ ์์ต๋๋ค.
+ You can download the workflow [here](workflows/productfix_text.json).
- **IC-Light + controlnet + IP-Adapter + Text transfer + Latent Injection**

- [์ฌ๊ธฐ์](workflows/productfix_adapter.json) workflow๋ฅผ ๋ค์ด๋ก๋ ํ ์ ์์ต๋๋ค.
+ You can download the workflow [here](workflows/productfix_adapter.json).
-### **demo example assets**
-- [product example image](assets/demo_example/pr_example.png)
-- [style example image](assets/demo_example/style_example.jpg)
+### **Demo Example Assets**
+- [Product example image](assets/demo_example/pr_example.png)
+- [Style example image](assets/demo_example/style_example.jpg)
## ๐ Reference