Skip to main content

Reproducible, structure-guided sketch-to-image exploration for designers

Project description

AIsketcher

PyPI version

Turn one sketch into a traceable family of design directions.

AIsketcher is a model-agnostic Python SDK for structure-guided visual exploration. It prepares a sketch, explores several seeded candidates, records the direction you pick, creates controlled variations, and exports a replayable manifest. It is designed for product designers, graphic designers, and sketchers who need more than a one-off image.

Pocket Kingdom paper-art hero concept for AIsketcher

Pocket Kingdom hero concept · marketing artwork, not an SDK execution claim · select to inspect the real local source, scout, variations, and replay evidence

Documentation · 한국어 빠른 시작 · PyPI · Migration from 0.0.x

Why AIsketcher

  • Prepare with evidence: normalize orientation and size, generate a control image, and inspect actionable structure diagnostics before spending GPU time.
  • Explore deliberately: create 1, 4, or 8 candidates with an explicit seed plan instead of repeatedly changing an undocumented seed.
  • Pick and vary: preserve the selected parent and make subtle, balanced, or bold variations while keeping chosen constraints locked.
  • Replay the handoff: export inputs, controls, recipes, seeds, lineage, hashes, and runtime information as a portable study.
  • Bring your backend: use the Diffusers adapter or implement the small backend protocol for another local or hosted image model.

Install

AIsketcher 0.2.1 is published on PyPI. The brand is AIsketcher; the PyPI install identifier is lowercase aisketcher, matching the Python import and CLI:

pip install aisketcher

Pin the public release when you need a reproducible install:

python -m pip install "aisketcher==0.2.1"

The lightweight SDK does not install Torch, Diffusers, model weights, or the Gradio runtime. Studio code and its Guided Sample are packaged; the demo extra adds the runtime needed to launch the UI.

For development from this repository:

python -m pip install -e ".[dev]"

Install optional local generation or the Studio separately:

python -m pip install "aisketcher[demo]==0.2.1"
python -m pip install "aisketcher[local,demo]==0.2.1"

The complete model-free first run is one line:

python -m pip install "aisketcher[demo]==0.2.1" && aisketcher init && aisketcher studio

Model downloads happen only after you explicitly choose a local preset. Guided Sample mode does not require a model or network connection: this repository includes a reviewed four-direction fixture with matching hashes and a real aisketcher.manifest/v1 manifest.

Guided Sample works on CPU. Live local generation requires CUDA or experimental Apple Silicon MPS; CPU generation is disabled by default so users do not fetch 7–9 GB of model data only to discover an unsupported runtime.

Studio

The packaged Gradio Studio is the fastest way to understand the workflow. This is the actual English Simple view with a documentation-only heritage study open:

AIsketcher Studio English Simple view showing a privacy-reviewed family sketch, its selected result, four deterministic directions, and manifest-backed settings

Actual local Studio · HPO-selected historical seed 6764547109648557242 · pinned sdxl-canny-lite@1 · select the image to open it full size

This privacy-reviewed family-sketch fixture is used only for documentation and is separate from the bundled Pocket Kingdom Guided Sample. Its authenticated manifest fills the visible prompt, profile, and structure controls, and fixes the HPO-selected direction to seed 6764547109648557242. Twelve new candidates were reviewed in four bounded rounds before this direction was selected. Model weights were already local, so the capture caused no model download or image upload.

  • Simple asks for a sketch, a one-sentence brief, a work type, and a Loose/Balanced/Faithful structure choice.
  • Advanced exposes model, Canny, generation, seed, variation, export, and replay controls without discarding the Simple session.

Launch it after installing the demo extra:

aisketcher init  # First run only; omit when settings already exist.
aisketcher studio

Start with Guided Sample when no model is installed. See the Studio guide and configuration reference for Advanced controls, local-only defaults, versioned YAML, and project overrides.

Python workflow

from aisketcher import FakeBackend, Intent, PresetManager, SeedPlan, Studio

preset = "sdxl-canny-lite@1"
models = PresetManager()
plan = models.plan_install(preset)
print(plan.license_notice, plan.estimated_bytes, plan.items)

# Run this only after reviewing the repositories, revisions, size, and licenses.
if not plan.installed:
    models.install(preset, confirm=True)

studio = Studio.from_preset(preset, device="auto", preset_manager=models)
prepared = studio.prepare("sketch.jpg")

study = studio.explore(
    prepared,
    intent=Intent(
        prompt="A playful paper-cut fantasy kingdom",
        profile="graphic_design",
        structure="balanced",
    ),
    outputs=4,
    seed_plan=SeedPlan.scout(4),
)

choice = study.pick(1)  # Stable zero-based index: the second candidate.
variants = studio.vary(
    choice,
    outputs=4,
    strength="subtle",
    locks=("structure",),
)

variants.export("pocket-kingdom-run")
report = studio.replay(
    "pocket-kingdom-run/manifest.json",
    mode="strict",
)

For a network- and model-free workflow test, use Studio(FakeBackend(), preset="sdxl-canny-lite@1"). Its images are deterministic fixtures for code and CI, not model-generated creative results.

The exported manifest contains the resolved recipe and actual seeds. Built-in exports re-encode images without EXIF, omit source filenames, and allowlist backend metadata. Do not put secrets or private paths in prompts, profiles, or custom backend identifiers. See the complete SDK workflow and privacy model.

Canonical example

Pocket Kingdom is the canonical source → control → scout four → pick → vary four → final → export example. Its anonymized source, exact prepared input, Canny control, four real local SDXL directions, four structure-locked variations, human selections, seeds, lineage, technical scores, and hashes are checked in with replayable manifests. The manual presents the final result alongside every alternative instead of substituting private reference art.

Artwork is not licensed under MIT. Read the artwork notice before using any image from this repository.

Compatibility

The historical AIsketcher.img2img facade remains temporarily available in the 0.2 line and emits a deprecation warning. Cloud translation and credential arguments from the earliest releases have been removed. Migrate to lowercase aisketcher imports and the study workflow before 0.3.0.

Development

python -m pip install -e ".[dev,docs]"
python -m pytest tests/core tests/docs
python -m pytest tests/app tests/test_config.py tests/test_cli.py
mkdocs build --strict
python -m build
python -m twine check dist/*

Network and GPU tests are opt-in. Normal CI uses a deterministic fake backend and never downloads model weights.

License

Source code and documentation text are licensed under the MIT License. Images, drawings, generated derivatives, and other artwork are excluded; see the artwork notice.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aisketcher-0.2.1.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aisketcher-0.2.1-py3-none-any.whl (3.5 MB view details)

Uploaded Python 3

File details

Details for the file aisketcher-0.2.1.tar.gz.

File metadata

  • Download URL: aisketcher-0.2.1.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for aisketcher-0.2.1.tar.gz
Algorithm Hash digest
SHA256 71c89cafbb8e67ec805caf26f36275eb7a777da99304f32405108e3a0e315e45
MD5 16b64eecd04dad282c8bfe361fdf88b5
BLAKE2b-256 97d75d98c9b64c194744501fdc251d5d84ae4a8412192e4e18455bc90c91607c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aisketcher-0.2.1.tar.gz:

Publisher: publish-pypi.yml on hyeonsangjeon/AIsketcher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aisketcher-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: aisketcher-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for aisketcher-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1920840ab9bf5b7492e3e3c30129c5b92d39b87cd240b3b23f69344c067e6621
MD5 3ee08f4606ff7e00c6213dd93022361d
BLAKE2b-256 c92dc960fa71ba07aebd55a47c9b176cb62cc94dbb4d1f61e8a7b47d2008d43f

See more details on using hashes here.

Provenance

The following attestation bundles were made for aisketcher-0.2.1-py3-none-any.whl:

Publisher: publish-pypi.yml on hyeonsangjeon/AIsketcher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page