skill
This commit is contained in:
@@ -24,8 +24,9 @@ Use this skill when:
|
|||||||
|
|
||||||
First, examine the scene image to identify all elements. You should ask the @image-expert agent to do this, giving it the filename to read:
|
First, examine the scene image to identify all elements. You should ask the @image-expert agent to do this, giving it the filename to read:
|
||||||
|
|
||||||
1. **Foreground elements** - Objects closest to camera that would obscure player:
|
1. **Foreground elements** - Objects closest to camera that would obscure player. Examples would include:
|
||||||
- Large trees extending into frame
|
- Large trees extending into frame
|
||||||
|
- Foreground framing, like in a room, sometimes the foreground is all black
|
||||||
- Foreground bushes and plants
|
- Foreground bushes and plants
|
||||||
- Building overhangs and architectural features
|
- Building overhangs and architectural features
|
||||||
- Rocks and boulders in immediate foreground
|
- Rocks and boulders in immediate foreground
|
||||||
@@ -60,8 +61,8 @@ For each foreground/mid-ground element identified, note:
|
|||||||
|
|
||||||
### Step 3: Create Alpha Masks
|
### Step 3: Create Alpha Masks
|
||||||
|
|
||||||
Use the create-alpha-mask tool to create a new mask. The user may ask for a certain number of variations (default 2).
|
Use the alpha-mask-creator skill to create a new mask. The user may ask for a certain number of variations (default 2). Check that the mask properly isolates the element. In those case
|
||||||
In those cases, you need to provide different seeds. Check that the mask properly isolates the element
|
just use the skill multiple times and it will create a different variation of the mask.
|
||||||
|
|
||||||
### Step 4: Create ORA File
|
### Step 4: Create ORA File
|
||||||
|
|
||||||
@@ -97,7 +98,7 @@ Use the ora-editing skill to summarize the layer structure for the user
|
|||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
This skill leverages existing project tools, but the main skills (ora-editing, create-alpha-mask) should be used:
|
This skill leverages existing project tools, but the main skills (ora-editing, alpha-mask-creator) should be used:
|
||||||
- `tools/ora_edit.py` - ORA file creation and manipulation
|
- `tools/ora_edit.py` - ORA file creation and manipulation
|
||||||
- `tools/extract_mask.py` - AI-powered alpha mask generation
|
- `tools/extract_mask.py` - AI-powered alpha mask generation
|
||||||
- `tools/draw_polygon.py` - Polygon outline drawing
|
- `tools/draw_polygon.py` - Polygon outline drawing
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import time
|
|||||||
import urllib.error
|
import urllib.error
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import uuid
|
import uuid
|
||||||
|
import random
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
|
|
||||||
@@ -132,6 +133,7 @@ def extract_mask(
|
|||||||
|
|
||||||
workflow["1:68"]["inputs"]["prompt"] = prompt_text
|
workflow["1:68"]["inputs"]["prompt"] = prompt_text
|
||||||
workflow["87"]["inputs"]["image"] = base64_image
|
workflow["87"]["inputs"]["image"] = base64_image
|
||||||
|
workflow["50"]["inputs"]["seed"] = random.randint(1, 100000000)
|
||||||
|
|
||||||
unique_id = str(uuid.uuid4())[:8]
|
unique_id = str(uuid.uuid4())[:8]
|
||||||
filename_prefix = f"masks/mask_{unique_id}"
|
filename_prefix = f"masks/mask_{unique_id}"
|
||||||
|
|||||||
Reference in New Issue
Block a user