Skip to content
←INDEX / Prompt library
TUTORIAL/Stable Diffusion/Intermediate

SD Local Detail Repair: The Complete RefineAnything + ComfyUI Workflow

The RefineAnything LoRA + ComfyUI-RefineNode plugin automate the painful "fix one area, leave the rest untouched" task. A lifesaver for product-image flaws, logos, text, and label repair.

SakuyaPromptCraft editor · Updated 2026-06-12 00:23:51
TutorialStable DiffusionIntermediate
01PROMPT
【目的】局部 detail repair — 修圖中某一塊(文字壞掉 / logo 歪 / 產品瑕疵 / 標籤糊掉)、其他 99% 不動。傳統 inpainting 容易整張色調飄、這個 workflow 用 reference alignment 解決。

【工具棧】
1. **RefineAnything LoRA**:https://github.com/limuloo/RefineAnything
   - 輸入:image + region(scribble mask 或 bounding box)
   - 可選:reference image(給它「要長這樣」的範本)
   - 輸出:只改 mask 區的清乾淨版
2. **ComfyUI-RefineNode plugin**:https://github.com/1Kynx/ComfyUI-RefineNode
   - 把 mask prep / reference alignment / paste-back 三個手動步驟封裝成 node
   - **model-agnostic** — 不只 RefineAnything、任何 local repair LoRA 都能用

【workflow 步驟】
1. ComfyUI 載 plugin、開作者 repo 提供的 sample workflow
2. 上傳 source image
3. 圈選要修的區(scribble 或 bbox)
4. (optional)丟參考圖、告訴它「文字應該長這樣」
5. 在 Edit Model Reference Method node 選 `{{ref_method}}`
   - ⚠️ **不要選 `index_timestep_zero`** — 整張會明顯色偏
   - 推薦:index(穩)/ index_concat / latent_concat
6. 跑 → 自動 paste-back 到原圖

【最常見成功 case】
- 商品攝影:背景小瑕疵、霉點、灰塵
- 設計修圖:logo 字母壞掉、字距亂、品牌色偏
- 文字 OCR-fix:海報 / 包裝上的文字字母錯位
- 線條修補:細線斷掉 / 紋路接不上

Swap the variables inside the [ ] brackets for your own content, then paste into Stable Diffusion.

RUNTRY IT
▶ TRY IT ON-SITE

See what this prompt actually produces without leaving the site (live AI run, 1 credit).

02CONTEXT / Why it works

This is the release post from the r/StableDiffusion developer themselves, including the author's reply with recommendations. RefineAnything is a new 2026 LoRA and a generational upgrade over the traditional SD inpainting workflow (it solves the old problem of "the whole image's color drifts"). A must-install for ComfyUI users. If you do product photography, brand design, or ad retouching, this plugin is a notch above Photoshop's content-aware fill.

03SAMPLE / Expected result

修圖區(mask 內)內容變乾淨、其他 99% 不動、整體色調不飄移;產品圖瑕疵 fix、商品 logo 字母校正、海報文字 OCR-style 修復

A description of the intended result. Check this entry's testing notes and try the prompt with your own inputs.

04VARIABLES
01[ref_method]

Edit Model Reference Method 選項。推薦 index(穩定不色偏)/ index_concat(reference 較強影響)/ latent_concat(reference 弱影響)。⚠️ 避免 index_timestep_zero、會色偏

05RESOLVER · 變數代入器0 / 1

填下面的欄位,上方 prompt 會即時替換 [方括號] 內容。填好後按「複製組好的 prompt」直接丟進工具。

修飾
Assembled · 填剩餘變數…
【目的】局部 detail repair — 修圖中某一塊(文字壞掉 / logo 歪 / 產品瑕疵 / 標籤糊掉)、其他 99% 不動。傳統 inpainting 容易整張色調飄、這個 workflow 用 reference alignment 解決。

【工具棧】
1. **RefineAnything LoRA**:https://github.com/limuloo/RefineAnything
   - 輸入:image + region(scribble mask 或 bounding box)
   - 可選:reference image(給它「要長這樣」的範本)
   - 輸出:只改 mask 區的清乾淨版
2. **ComfyUI-RefineNode plugin**:https://github.com/1Kynx/ComfyUI-RefineNode
   - 把 mask prep / reference alignment / paste-back 三個手動步驟封裝成 node
   - **model-agnostic** — 不只 RefineAnything、任何 local repair LoRA 都能用

【workflow 步驟】
1. ComfyUI 載 plugin、開作者 repo 提供的 sample workflow
2. 上傳 source image
3. 圈選要修的區(scribble 或 bbox)
4. (optional)丟參考圖、告訴它「文字應該長這樣」
5. 在 Edit Model Reference Method node 選 `{{ref_method}}`
   - ⚠️ **不要選 `index_timestep_zero`** — 整張會明顯色偏
   - 推薦:index(穩)/ index_concat / latent_concat
6. 跑 → 自動 paste-back 到原圖

【最常見成功 case】
- 商品攝影:背景小瑕疵、霉點、灰塵
- 設計修圖:logo 字母壞掉、字距亂、品牌色偏
- 文字 OCR-fix:海報 / 包裝上的文字字母錯位
- 線條修補:細線斷掉 / 紋路接不上
RELATED
PRO01
TUTORIALSuno v5.5FEATURED
r/SunoAI (anonymous studio engineer)2026-06-12

Suno Engineer's Mindset: 4 Steps to a Song That Doesn't Sound Like AI

5.0(1)

A studio engineer's breakdown of Suno's fatal weaknesses (fried vocals, high-frequency artifacts), plus a 4-step DAW workflow and a Suno Studio cleanup prompt.

Advanced
Read

Free02
TUTORIALClaude 4.5 SonnetFEATURED
r/ClaudeAI2026-05-14

5 Claude Weekly Workflows That Stuck After 6 Months

Proposal generator / meeting processor / content repurposer / Friday review / shutdown reset — out of 40 I tried, only these 5 survived, each saving 30+ minutes per run.

Intermediate
Read

PRO03
TUTORIALClaude 4.5 SonnetFEATURED
r/PromptEngineering2026-05-14

7 Cross-Model A/B-Tested Prompt Techniques (Not Vibes)

Written after six months of A/B testing 200+ prompts on Claude, GPT-4, and Gemini with human raters. Covers persona + constraint stacking, anti-examples, role-reversal QA, cognitive scaffolds, emotional priming, uncertainty CoT, and steelman-first.

Advanced
Read

Free04
TUTORIALChatGPTFEATURED
r/ChatGPTPromptGenius2026-05-14

5 trust-checking one-liner prompts (no role-play)

After a year of role-play system prompts and 14-step frameworks, here's the takeaway: the thing that actually moved the needle on quality was 5 one-line prompts. No roles, no markdown, no "you are an expert."

Beginner
Read

COMMENTS · 討論區0 則
登入 後可留言。還沒帳號?註冊
目前沒有留言。第一個說說你的經驗。