Skip to content
Back to skills

Python Api

ASecurity

"Routes DragGAN scripting tasks such as loading checkpoints,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
toolspythondockerapi

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill python-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-python-api-62fec22e/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-python-api-62fec22e)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: python-api
description: "Routes DragGAN scripting tasks such as loading checkpoints,
  generating latents and images, and running the drag optimization loop from
  Python."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NO_LICENSE
---

# python-api

Use this sub-skill when the task is about `draggan.draggan` or `draggan.utils`: loading a model, generating a W latent, synthesizing an image, preparing points, or writing a script around the drag loop.

## Start here

1. Run the bundled preflight:
   `../../scripts/check_install.py --mode api`
2. Read `references/api-reference.md` for the verified function signatures and return shapes.
3. Read `references/workflows.md` for a minimal scripted generation or drag loop.
4. Read `../../references/checkpoints.md` if you need checkpoint names or cache behavior.
5. Read `references/troubleshooting.md` if the tensor or device setup is failing.

## This sub-skill covers

- Loading a pretrained generator with `load_model()`.
- Creating W+ latents with `generate_W()`.
- Turning a latent back into an image with `generate_image()`.
- Running the iterative drag loop with `drag_gan()` and point tracking.
- Using the point and mask helpers in `draggan.utils`.

## This sub-skill does not cover

- Browser UI layout or Gradio launch flags.
- Docker packaging or checkpoint catalog browsing.
- Claims that the drag loop works on CPU or MPS as a verified path.

## Important cautions

- The verified drag loop is CUDA-only in this snapshot.
- Points are represented as `[y, x]` tensors on the same device as the model.
- The `mask` parameter is accepted by the current drag loop signature but is not enforced by the current implementation.
- Conditional checkpoints need an explicit `class_idx`; unconditional checkpoints ignore it.

## Helpful references

- `references/api-reference.md` for the verified signatures and shape notes.
- `references/workflows.md` for copyable Python recipes.
- `references/troubleshooting.md` for device, point-order, and mask mistakes.
- `../../references/checkpoints.md` for checkpoint names and the cache root.

Files in this skill

  • SKILL.md2.1 KB
  • references/api-reference.md3 KB
  • references/troubleshooting.md1.2 KB
  • references/workflows.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.