From 44926b751dd14a907537ccfe357aafa166059a84 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 9 Mar 2026 15:55:31 -0700 Subject: [PATCH] skill --- .opencode/skills/scene-breakdown/SKILL.md | 9 +++++---- tools/extract_mask.py | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.opencode/skills/scene-breakdown/SKILL.md b/.opencode/skills/scene-breakdown/SKILL.md index 3fe8c86..a274dff 100644 --- a/.opencode/skills/scene-breakdown/SKILL.md +++ b/.opencode/skills/scene-breakdown/SKILL.md @@ -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: -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 + - Foreground framing, like in a room, sometimes the foreground is all black - Foreground bushes and plants - Building overhangs and architectural features - Rocks and boulders in immediate foreground @@ -60,8 +61,8 @@ For each foreground/mid-ground element identified, note: ### 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). -In those cases, you need to provide different seeds. Check that the mask properly isolates the element +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 +just use the skill multiple times and it will create a different variation of the mask. ### Step 4: Create ORA File @@ -97,7 +98,7 @@ Use the ora-editing skill to summarize the layer structure for the user ## 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/extract_mask.py` - AI-powered alpha mask generation - `tools/draw_polygon.py` - Polygon outline drawing diff --git a/tools/extract_mask.py b/tools/extract_mask.py index 4ccbb9e..e94b735 100755 --- a/tools/extract_mask.py +++ b/tools/extract_mask.py @@ -9,6 +9,7 @@ import time import urllib.error import urllib.request import uuid +import random from urllib.parse import urlencode @@ -132,6 +133,7 @@ def extract_mask( workflow["1:68"]["inputs"]["prompt"] = prompt_text workflow["87"]["inputs"]["image"] = base64_image + workflow["50"]["inputs"]["seed"] = random.randint(1, 100000000) unique_id = str(uuid.uuid4())[:8] filename_prefix = f"masks/mask_{unique_id}"