界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
设计与创意 · SKILL.md

visual_prompt_scaling

visual_prompt_scaling

【设计与创意】Build AutoVP frame-shaped visual prompt masks and apply bounded universal prompts to resized images.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: visual_prompt_scaling description: Build AutoVP frame-shaped visual prompt masks and apply bounded universal prompts to resized images.

Visual Prompt Scaling

Use this skill when implementing AutoVP-style input scaling and frame prompts. Do not use it for patch-token prompt tuning or model-internal prompts.

Inputs

Source image size, target image size, channel count, image array, and prompt parameters.

Outputs

Prompt width p, binary frame mask, centered image canvas, and prompted image.

Workflow

Compute p=(source_size-target_size)//2; build a frame mask; center the image; apply a sigmoid-bounded prompt only where mask is one. Reject target sizes larger than the source input. Record odd padding decisions.

Validation

Run python tests/test_visual_prompt_scaling.py or the Distiller skill-tree validator with tests.

我的收藏