Skill 详情

layer-image-editing

在 Layer 上编辑现有图像:修复、扩图、重新构图、重新打光、重新风格化、多角度、图层拆分、背景移除、矢量化 and 超分辨率。

匹配类型直接匹配已针对 图像生成 审核
来源layerai/​skills外部来源
报告安装量504仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: layer-image-editing
description: "Use when changing an image that already exists on Layer rather than generating a new one: editing or replacing part of it, inpainting with a mask, outpainting or extending the frame, reframing to another aspect ratio, relighting, restyling, re-rendering from another camera angle, splitting into layers, removing a background, vectorising, or upscaling. Keywords: img2img, edit, inpaint, outpaint, mask, expand, turnaround, upscale, background removal, PSD, layers."
license: MIT
---

# Layer Image Editing

## Overview

Editing is not generation with an image attached. Each intent maps to its own `use_case`, and picking
the wrong one is the usual reason an edit changes things it should not have touched.

| The user wants                         | `filter.use_case`    | Attach                            |
| -------------------------------------- | -------------------- | --------------------------------- |
| Change one region, keep the rest exact | `inpainting`         | `init_image` plus a `mask`        |
| Change the whole image by instruction  | `image_editing`      | `init_image`                      |
| Extend past the current frame          | `reframing`          | `init_image`                      |
| Fit another aspect ratio               | `reframing`          | `init_image`                      |
| The same subject from another angle    | `multi_angle`        | `init_image` or `reference_image` |
| Separate, editable layers              | `split_into_layers`  | `init_image`                      |
| Cut the subject out                    | `background_removal` | `init_image`                      |
| More pixels, same picture              | `upscaling`          | `init_image`                      |
| Clean line art into finished art       | `image_editing`      | `lineart` or `scribble`           |
| A crisp SVG from a raster              | `vectorization`      | `init_image`                      |

The loop and the spend gate are in the `layer` skill. If a sibling skill named here is missing from
your available skills, ask the user to install it (`npx skills add layerai/skills --skill <name>`);
unattended, proceed from tool schemas and flag the gap.

## Edit from the source, not from the last edit

Every edit pass is a fresh generation that re-renders the whole image, so each one drifts a little:
colours shift, a face loses its likeness, a logo degenerates. Three passes stacked on each other look
visibly worse than one pass that does all three things.

So when an edit is wrong, go back to the original and write a better instruction. Do not correct the
correction. Output assets carry a `file_id`, so the original is always one argument away.

The exception is genuinely independent regions: masking the left lamp and then masking the right lamp
touches disjoint pixels and stacks cleanly.

## Masks

A mask marks what may change. Supply it as an uploaded `file_id`, or use the `for_transparency` and
`for_nontransparency` flags when the image's own alpha channel already describes the region, which
saves authoring a mask by hand for an asset that is already cut out.

Mask edges matter. A hard-edged mask on a soft-edged subject leaves a halo. When the boundary is hair,
smoke, or glass, prefer an instruction edit over a mask, because the model resolves the boundary
better than your rectangle does.

## What to hold constant

State it in the instruction. Models are literal about what you mention and careless about what you
do not, so "change the banner to red, keep the pose, lighting, and armour exactly as they are" is a
materially different instruction from "make the banner red". The clause costs six words and saves a
reroll.

## Angles are not a prompt trick

"The same character from behind" appended to a text-to-image prompt produces a different character.
Re-rendering an existing asset from another view needs `multi_angle`, a model whose capabilities
report `camera_transform`, and the view 
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作