Token导航 LogoToken导航TokenDH.com
待分类敏感数据github未标认证来源可访问许可证需确认审计异常

modelslab-deepfake模型实验室深度伪造

Agent Skill

modelslab-deepfake 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

824

周安装

34

GitHub Stars

7

下载量

269
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:modelslab-deepfake(模型实验室深度伪造)
来源仓库:https://github.com/modelslab/skills
仓库路径:skills/modelslab-deepfake
安装命令:
npx skills add https://github.com/modelslab/skills --skill modelslab-deepfake
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/modelslab/skills --skill modelslab-deepfake

简介

用于处理 GitHub 仓库和代码协作信息。

  • 适合整理 Issue、Pull Request 等协作事项。
  • 可结合 README 文档核验具体使用方法。
  • 安装前应确认是否会触发文件读写或命令执行。
  • 当前分类标记为待分类,需人工复核用途。modelslab-deepfake 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

ModelsLab Deepfake & Face Swap

Swap faces in images and videos using advanced AI-powered deepfake technology.

When to Use This Skill

  • Swap faces in photos
  • Replace faces in videos
  • Create personalized video content
  • Generate character variations
  • Build face swap applications
  • Create entertainment content

Available Endpoints

Image Face Swap

  • Specific Face Swap: POST https://modelslab.com/api/v6/deepfake/specific_face_swap
  • Multiple Face Swap: POST https://modelslab.com/api/v6/deepfake/multiple_face_swap

Video Face Swap

  • Single Video Swap: POST https://modelslab.com/api/v6/deepfake/single_video_swap
  • Specific Video Swap: POST https://modelslab.com/api/v6/deepfake/specific_video_swap

Specific Face Swap (Image)

import requests

def swap_face(target_image, face_to_use, api_key):
    """Swap a face in an image.

    Args:
        target_image: URL of the image containing face to replace
        face_to_use: URL of the image with face to swap in
        api_key: Your ModelsLab API key

    Returns:
        URL of the face-swapped image
    """
    response = requests.post(
        "https://modelslab.com/api/v6/deepfake/specific_face_swap",
        json={
            "key": api_key,
            "init_image": target_image,
            "target_image": face_to_use
        }
    )

    data = response.json()

    if data["status"] == "success":
        return data["output"][0]
    else:
        raise Exception(f"Error: {data.get('message', 'Unknown error')}")

# Usage
result = swap_face(
    "https://example.com/target-photo.jpg",  # Photo to modify
    "https://example.com/face-to-swap.jpg",  # Face to insert
    "your_api_key"
)
print(f"Face swapped image: {result}")

Multiple Face Swap (Image)

def swap_multiple_faces(image_with_faces, face_to_use, api_key):
    """Swap all faces in an image with the same face.

    Args:
        image_with_faces: URL of image with multiple faces
        face_to_use: URL of face to swap in
    """
    response = requests.post(
        "https://modelslab.com/api/v6/deepfake/multiple_face_swap",
        json={
            "key": api_key,
            "init_image": image_with_faces,
            "target_image": face_to_use
        }
    )

    data = response.json()

    if data["status"] == "success":
        return data["output"][0]
    else:
        raise Exception(data.get("message"))

# Swap all faces in group photo
result = swap_multiple_faces(
    "https://example.com/group-photo.jpg",
    "https://example.com/celebrity-face.jpg",
    "your_api_key"
)

Single Video Face Swap

import time

def swap_video_faces(video_url, face_image, api_key, output_format="mp4"):
    """Swap all faces in a video.

    Args:
        video_url: URL of the video
        face_image: URL of face to swap in
        output_format: "mp4" or "gif"

    Returns:
        URL of the face-swapped video
    """
    response = requests.post(
        "https://modelslab.com/api/v6/deepfake/single_video_swap",
        json={
            "key": api_key,
            "init_video": video_url,
            "target_image": face_image,
            "output_format": output_format,
            "watermark": False  # Set to True for watermark
        }
    )

    data = response.json()

    if data["status"] == "error":
        raise Exception(f"Error: {data['message']}")

    if data["status"] == "success":
        return data["output"][0]

    # Video processing is async
    request_id = data["id"]
    print(f"Video processing... Request ID: {request_id}")

    return poll_deepfake_result(request_id, api_key)

def poll_deepfake_result(request_id, api_key, timeout=900):
    """Poll for video face swap results."""
    start_time = time.time()

    while time.time() - start_time < timeout:
        fetch = requests.post(
            f"https://modelslab.com/api/v6/deepfake/fetch/{request_id}",
            json={"key": api_key}
        )
        result = fetch.json()

        if result["status"] == "success":
            return result["output"][0]
        elif result["status"] == "failed":
            raise Exception(result.get("message", "Failed"))

        print(f"Processing... ({int(time.time() - start_time)}s)")
        time.sleep(10)

    raise Exception("Timeout")

# Usage
swapped_video = swap_video_faces(
    "https://example.com/video.mp4",
    "https://example.com/face.jpg",
    "your_api_key"
)
print(f"Face-swapped video: {swapped_video}")

Specific Video Face Swap

def swap_specific_video_face(video_url, new_face, reference_face, api_key):
    """Swap a specific face in a video (when multiple faces present).

    Args:
        video_url: URL of the video
        new_face: URL of the face to swap in
        reference_face: URL of the specific face to replace
    """
    response = requests.post(
        "https://modelslab.com/api/v6/deepfake/specific_video_swap",
        json={
            "key": api_key,
            "init_video": video_url,
            "target_image": new_face,
            "source_image": reference_face,
            "output_format": "mp4",
            "watermark": False
        }
    )

    data = response.json()

    if data["status"] == "processing":
        return poll_deepfake_result(data["id"], api_key)
    elif data["status"] == "success":
        return data["output"][0]
    else:
        raise Exception(data.get("message"))

# Swap only one person's face in multi-person video
result = swap_specific_video_face(
    "https://example.com/interview.mp4",
    "https://example.com/new-face.jpg",
    "https://example.com/face-to-replace.jpg",
    "your_api_key"
)

Using Webhooks

def deepfake_with_webhook(video_url, face_image, api_key, webhook_url, track_id):
    """Process video face swap with webhook notification."""
    response = requests.post(
        "https://modelslab.com/api/v6/deepfake/single_video_swap",
        json={
            "key": api_key,
            "init_video": video_url,
            "target_image": face_image,
            "output_format": "mp4",
            "webhook": webhook_url,
            "track_id": track_id
        }
    )

    data = response.json()
    print(f"Request submitted: {data['id']}")
    return data["id"]

# Usage
request_id = deepfake_with_webhook(
    "https://example.com/video.mp4",
    "https://example.com/face.jpg",
    "your_api_key",
    "https://yourserver.com/webhook/deepfake",
    "video_001"
)

Key Parameters

ParameterDescriptionValues
init_imageTarget image to modifyImage URL
init_videoTarget video to modifyVideo URL
target_imageFace to swap inImage URL with clear face
source_imageSpecific face to replaceImage URL (for specific swap)
output_formatVideo output formatmp4 or gif
watermarkAdd watermarktrue or false
webhookAsync callback URLYour server endpoint
track_idRequest identifierUnique tracking ID

Best Practices

1. Use High-Quality Face Images

✓ Good: Clear, well-lit frontal face photo
✓ Good: High resolution (at least 512x512)
✓ Good: Neutral expression works best

✗ Avoid: Blurry or low-resolution images
✗ Avoid: Extreme angles or profiles
✗ Avoid: Heavy shadows or poor lighting

2. Video Face Swap Requirements

  • Clear, visible faces in the video
  • Good lighting conditions
  • Frontal or near-frontal angles work best
  • Shorter videos process faster

3. Handle Async Operations

# Video face swaps are ALWAYS async
if data["status"] == "processing":
    result = poll_deepfake_result(data["id"], api_key)

4. Set Appropriate Timeouts

# Video processing takes time
poll_deepfake_result(request_id, api_key, timeout=900)  # 15 minutes

5. Use Webhooks for Long Videos

# Don't poll for long videos, use webhooks
deepfake_with_webhook(video_url, face, api_key, webhook_url, track_id)

Common Use Cases

Profile Picture Generator

def create_profile_variations(base_photo, face_images, api_key):
    """Generate multiple profile picture variations."""
    variations = []

    for i, face in enumerate(face_images):
        result = swap_face(base_photo, face, api_key)
        variations.append(result)
        print(f"Variation {i+1} created: {result}")

    return variations

# Create variations
profiles = create_profile_variations(
    "https://example.com/professional-photo.jpg",
    [
        "https://example.com/style1-face.jpg",
        "https://example.com/style2-face.jpg",
        "https://example.com/style3-face.jpg"
    ],
    api_key
)

Video Personalization

def personalize_video(template_video, user_face, api_key):
    """Create personalized video with user's face."""
    personalized = swap_video_faces(
        template_video,
        user_face,
        api_key,
        output_format="mp4"
    )
    print(f"Personalized video: {personalized}")
    return personalized

# Create custom greeting video
greeting = personalize_video(
    "https://example.com/greeting-template.mp4",
    "https://example.com/user-photo.jpg",
    api_key
)

Character Variations

def generate_character_variations(character_image, face_options, api_key):
    """Generate different character variations."""
    characters = []

    for face in face_options:
        char = swap_face(character_image, face, api_key)
        characters.append(char)

    return characters

Group Photo Editing

# Replace one person in group photo
edited_group_photo = swap_specific_video_face(
    "https://example.com/group-video.mp4",
    "https://example.com/replacement-face.jpg",
    "https://example.com/person-to-replace.jpg",
    api_key
)

Error Handling

try:
    result = swap_face(target, face, api_key)
    print(f"Face swap successful: {result}")
except Exception as e:
    print(f"Face swap failed: {e}")
    # Check image quality, try different images, or notify user

Performance Tips

  1. Use Webhooks: For videos, always use webhooks
  2. Optimize Face Images: Use clear, high-quality faces
  3. Batch Process: Submit multiple requests together
  4. Cache Results: Store generated content
  5. Monitor Processing Time: Track and optimize

Ethical Considerations

⚠️ Important: Use face swap technology responsibly

  • Obtain consent before using someone's face
  • Don't create misleading or harmful content
  • Follow local laws and regulations
  • Respect privacy and image rights
  • Add disclaimers when sharing deepfake content

Enterprise API

For dedicated resources:

# Enterprise endpoints
url = "https://modelslab.com/api/v1/enterprise/deepfake/specific_face_swap"
url = "https://modelslab.com/api/v1/enterprise/deepfake/single_video_swap"

Resources

Related Skills

  • modelslab-video-generation - Generate videos
  • modelslab-webhooks - Handle async operations
  • modelslab-sdk-usage - Use official SDKs

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.97%
按下载量换算99

Claude

29.42%
按下载量换算79

Cursor

19.8%
按下载量换算53

Gemini CLI

9.29%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills