Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@
"group": "Bria",
"pages": [
"tutorials/partner-nodes/bria/background-removal",
"tutorials/partner-nodes/bria/fibo"
"tutorials/partner-nodes/bria/fibo",
"tutorials/partner-nodes/bria/image-editing"
]
},
{
Expand Down Expand Up @@ -3537,7 +3538,8 @@
"group": "Bria",
"pages": [
"zh/tutorials/partner-nodes/bria/background-removal",
"zh/tutorials/partner-nodes/bria/fibo"
"zh/tutorials/partner-nodes/bria/fibo",
"zh/tutorials/partner-nodes/bria/image-editing"
]
},
{
Expand Down Expand Up @@ -6509,7 +6511,8 @@
"group": "Bria",
"pages": [
"ja/tutorials/partner-nodes/bria/background-removal",
"ja/tutorials/partner-nodes/bria/fibo"
"ja/tutorials/partner-nodes/bria/fibo",
"ja/tutorials/partner-nodes/bria/image-editing"
]
},
{
Expand Down Expand Up @@ -9556,7 +9559,8 @@
"group": "Bria",
"pages": [
"ko/tutorials/partner-nodes/bria/background-removal",
"ko/tutorials/partner-nodes/bria/fibo"
"ko/tutorials/partner-nodes/bria/fibo",
"ko/tutorials/partner-nodes/bria/image-editing"
]
},
{
Expand Down
150 changes: 150 additions & 0 deletions ja/tutorials/partner-nodes/bria/image-editing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
title: "ComfyUIでBria Eraser、Expand Image、GenFillを使う"
description: "オブジェクトの削除、画像の拡張、マスク領域内へのコンテンツ生成を、ComfyUIのパートナーノード Bria Eraser、Expand Image、Generative Fill で行う方法を解説します。"
sidebarTitle: "画像編集"
translationSourceHash: 14d47eba
translationFrom: tutorials/partner-nodes/bria/image-editing.mdx
---

import ReqHint from "/snippets/ja/tutorials/partner-nodes/req-hint.mdx";
import UpdateReminder from "/snippets/ja/tutorials/update-reminder.mdx";

Briaの画像編集ツールは、ComfyUIのパートナーノードとして利用できます。このページでは、マスクベースの編集ワークフローとして、**Bria Eraser**(オブジェクトの削除)、**Bria Expand Image**(画像の外側への展開)、**Bria Generative Fill**(マスク領域内のコンテンツ生成)の3つを解説します。いずれも、編集領域の外側はピクセル単位で完全に元のまま保持されます。

各ワークフローは、1枚の入力画像とマスクを受け取ります。テンプレート内の**Painter**ノードはマスクを描くためのブラシキャンバスを提供し、**ImageCompare**ノードは前後の結果を並べて表示します。PainterノードはNodes 2.0でのみ利用可能です。「Painter: Node 2.0 only」としか表示されない場合は、**Menu -> Nodes2.0** でNodes 2.0を有効にするか、代わりに[マスクエディター](https://docs.comfy.org/interface/maskeditor)を使ってマスクを作成してください。

<ReqHint/>
<UpdateReminder/>

### Bria: Eraser(消しゴム) {#api_bria_eraser}

画像から特定のオブジェクトや領域を削除します。マスクされた領域は消去され、周囲のコンテキストで埋められます。マスクの外側は変更されません。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_bria_eraser-1.webp" alt="Bria: Eraser workflow preview" />

<CardGroup cols={2}>
<Card title="Comfy Cloudで実行" icon="cloud" href="https://cloud.comfy.org/?template=api_bria_eraser&utm_source=docs&utm_medium=referral&utm_campaign=bria-image-editing">
Comfy Cloudで開く
</Card>
<Card title="ワークフローをダウンロード" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_bria_eraser.json">
JSONをダウンロード、またはテンプレートライブラリで「Bria Eraser」を検索
</Card>
</CardGroup>

**入力素材**

このファイルを対応する`LoadImage`ノードにアップロードしてください:

<CardGroup cols={1}>
<Card title="vintage_girl_yellow_apple.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/vintage_girl_yellow_apple.png">
サンプル入力画像をダウンロード
</Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/vintage_girl_yellow_apple.png" alt="Bria: Eraser input" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Bria_Eraser.png" alt="Bria: Eraser example output" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>

**使用方法**

1. **画像を読み込む**:`LoadImage`に画像をアップロードします。Painterキャンバスと比較ビューが自動的に更新されます。
2. **マスクをペイントする**:削除したいオブジェクトや領域をブラシで塗ります。オブジェクトの縁(髪、ガラス、布地、接触点)を少し越えて塗ることで、モデルが自然にブレンドする余地が生まれます。
3. **`BriaEraser`を実行する**:プロンプトは不要です。ノードがマスク領域を消去し、背景をインペイントします。`api_key`が未設定の場合は入力してください。
4. **比較して保存する**:`ImageCompare`が前後の結果を表示し、`SaveImageAdvanced`が結果を書き出します。

<Note>
マスクされた領域は周囲から完全に再生成されるため、結果はシームレスにブレンドされます。マスクはバイナリ形式で、白(255)が削除する領域、黒(0)がその他の領域を示し、画像のアスペクト比と一致している必要があります。より正確な結果を得るには、利用可能であれば自動セグメンテーションマスク(SAMスタイル)を使用してください。APIの`mask_type`は、`manual`(ブラシ描画)と`automatic`(アルゴリズム生成)のマスクを区別します。
</Note>

### Bria: Expand Image(画像展開) {#api_bria_expand_image}

画像を元の境界の外側まで拡張します。元の画像はそのまま保持され、周囲の領域が、その照明・パースペクティブ・テクスチャに合わせて生成されます。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_bria_expand_image-1.webp" alt="Bria: Expand Image workflow preview" />

<CardGroup cols={2}>
<Card title="Comfy Cloudで実行" icon="cloud" href="https://cloud.comfy.org/?template=api_bria_expand_image&utm_source=docs&utm_medium=referral&utm_campaign=bria-image-editing">
Comfy Cloudで開く
</Card>
<Card title="ワークフローをダウンロード" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_bria_expand_image.json">
JSONをダウンロード、またはテンプレートライブラリで「Bria Expand Image」を検索
</Card>
</CardGroup>

**入力素材**

このファイルを対応する`LoadImage`ノードにアップロードしてください:

<CardGroup cols={1}>
<Card title="red_sports_car_night.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/red_sports_car_night.png">
サンプル入力画像をダウンロード
</Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/red_sports_car_night.png" alt="Bria: Expand Image input" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Bria_Expand_Image.png" alt="Bria: Expand Image example output" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>

**使用方法**

1. **画像を読み込む**:`LoadImage`に画像をアップロードし、`BriaExpandImage`に接続します。
2. **展開モードを選択する**:`expand_mode`ドロップダウンでモードを選択します:
- **プリセットのアスペクト比**:`1:1`、`2:3`、`3:2`、`3:4`、`4:3`、`4:5`、`5:4`、`9:16`、`16:9`のいずれかを選択します。画像は中央に配置され、その比率に合うように端が拡張されます。
- **カスタム比率**:`custom_ratio`を選択し、`ratio_width` / `ratio_height`を設定します(例:21:9の場合は21と9)。Briaは0.5~3.0の幅対高さの比率を受け付けるため、1:2より縦長の場合はマニュアルモードが必要です。
- **マニュアル**:`manual`を選択し、`canvas_width` / `canvas_height`(最大5000 x 5000)、`image_width` / `image_height`、`image_x` / `image_y`(画像の左上隅の座標。負の値で切り抜き可能)を指定して、元の画像をキャンバス上に配置します。
3. **プロンプト(任意)**:空のままにすると、Briaが入力画像からプロンプトを自動生成し、シーンやスタイルに合わせて展開します。または、自分でプロンプトを書いて展開方向を明示的に指定することもできます。例:「the street continuing to the right」「add a streetlamp」「no other cars」。英語のみ対応です。特殊文字はサポートされていません。
4. **任意**:不要なコンテンツを避けるための`negative_prompt`、結果を再現するための`seed`、コンテンツモデレーションを有効にするための`moderation`。
5. **保存**:画像出力を`SaveImage`に接続します。

<Note>
ノードの`prompt`出力には、実際に使用されたプロンプト(入力したプロンプト、またはフィールドが空の場合にBriaが自動生成したプロンプト)が表示されます。ターゲットのアスペクト比が画像の現在の比率と同じ場合(例:1:1の画像に`1:1`を設定)、変更は行われず、画像はそのまま返されます。キャンバス領域は5,000 x 5,000ピクセルに制限されています。最良の結果を得るには、メインの被写体をキャンバス全体の15%以上に配置してください。
</Note>

### Bria: Generative Fill(生成フィル) {#api_bria_genfill}

プロンプトに基づいて、画像の特定の領域を再生成します。マスクされた領域は完全に再生成され、マスクの外側はピクセル単位で完全に元のまま保持されます。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_bria_genfill-1.webp" alt="Bria: Generative Fill workflow preview" />

<CardGroup cols={2}>
<Card title="Comfy Cloudで実行" icon="cloud" href="https://cloud.comfy.org/?template=api_bria_genfill&utm_source=docs&utm_medium=referral&utm_campaign=bria-image-editing">
Comfy Cloudで開く
</Card>
<Card title="ワークフローをダウンロード" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_bria_genfill.json">
JSONをダウンロード、またはテンプレートライブラリで「Bria: Generative Fill」を検索
</Card>
</CardGroup>

**入力素材**

このファイルを対応する`LoadImage`ノードにアップロードしてください:

<CardGroup cols={1}>
<Card title="retro_girl_cinnamon_bun.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/retro_girl_cinnamon_bun.png">
サンプル入力画像をダウンロード
</Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/retro_girl_cinnamon_bun.png" alt="Bria: Generative Fill input" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Bria_GenFill.png" alt="Bria: Generative Fill example output" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>

**使用方法**

1. **画像を読み込む**:`LoadImage`に画像をアップロードします。Painterキャンバスと比較ビューが自動的に更新されます。
2. **マスクをペイントする**:再生成したい領域をブラシで塗ります。ブラシで描いた塊状のマスクが最も効果的です。オブジェクトの縁(髪、ガラス、布地、接触点)を少し越えて塗ることで、モデルがブレンドする余地が生まれます。
3. **プロンプトを書く**:`BriaGenFill`で、マスク領域内に何を生成するかを、切り抜いたミニシーンをアートディレクションするように記述します。オブジェクトの名前、マテリアルとサイズ、サーフェスとの相互作用を指定し、コンタクトシャドウを入れるよう指示します。90~110語程度が最適です。`refine_prompt`は有効のままにしてください。
4. **任意**:不要な詳細を避けるための`negative_prompt`。マスクや文言を調整する間は`seed`を固定し、結果が良くなったらランダムに変更します。
5. **比較して保存する**:`ImageCompare`が前後の結果を表示し、`SaveImageAdvanced`が結果を書き出します。

<Note>
マスクはピクセルのレタッチではなく、生成による置き換えをトリガーします。マスクされた領域は「この領域を再生成」を意味し、「この領域をレタッチ」を意味するものではありません。
</Note>

## はじめる

1. ComfyUIを最新バージョンにアップデートします。
2. テンプレートライブラリに移動し、`Bria Eraser`、`Bria Expand Image`、または`Bria Generative Fill`を検索します。
Loading
Loading