Skip to main content

A modular Python library for vision-based interactions with AI systems

Project description

VisionLLM

A modular Python library for vision-based interactions with AI systems, providing text-to-image, image-to-image, text-to-video, and image-to-video capabilities.

CAUTION : this project is under development and contains mostly placeholder. Please do not use yet.

Features

  • Text-to-Image: Generate images from text prompts
  • Image-to-Image: Transform images based on text guidance
  • Text-to-Video: Create videos from text descriptions
  • Image-to-Video: Animate still images into videos
  • Modular Design: Easily integrate with any text generation system
  • MLX Integration: Special optimizations for Apple Silicon

Installation

# Install from PyPI
pip install visionllm

# Or clone the repository
git clone https://github.com/lpalbou/visionllm.git
cd visionllm
pip install -e .

Development Installation

# Install with development dependencies
pip install "visionllm[dev]"

Quick Start

from visionllm import VisionManager

# Initialize vision manager
vision_manager = VisionManager(debug_mode=False)

# Text to image
image = vision_manager.text_to_image(
    "A beautiful sunset over mountains with a lake in the foreground"
)

# Image to video
video = vision_manager.image_to_video(
    image, 
    prompt="Add gentle ripples to the lake and clouds moving slowly",
    duration=5.0
)

# Clean up
vision_manager.cleanup()

Command Line Usage

VisionLLM provides a command-line interface for quick access to its capabilities:

# Generate an image from text
visionllm text2image "A beautiful sunset over mountains" --output sunset.png

# Transform an image
visionllm image2image input.png --prompt "Make it look like winter" --output winter.png

# Generate a video from text
visionllm text2video "A timelapse of a blooming flower" --duration 10.0 --output flower.mp4

# Animate an image into a video
visionllm image2video portrait.png --prompt "Make the subject smile" --output smile.mp4

Integration with AbstractLLM

VisionLLM is designed to work seamlessly with AbstractLLM for unified access to various AI models:

from abstractllm import LLMClient
from visionllm import VisionManager

# Initialize components
llm_client = LLMClient(provider="openai", model="gpt-4")
vision_manager = VisionManager()

# Generate an image based on LLM output
prompt = "Describe a fantasy landscape"
description = llm_client.generate(prompt)
image = vision_manager.text_to_image(description)

# Process the image further
video = vision_manager.image_to_video(image, prompt="Add magical effects")

License

VisionLLM is licensed under the MIT License.

Acknowledgments

This project is inspired by VoiceLLM and is designed to work as a companion library focusing on vision-based AI interactions.

Author

Laurent-Philippe Albou (lpalbou@gmail.com)

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

visionllm-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

visionllm-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file visionllm-0.1.0.tar.gz.

File metadata

  • Download URL: visionllm-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for visionllm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 534d85b35bf499741d69c317b32aac4c5e03adc4129400695db330c653ccba30
MD5 95a5ad70849684ab405b5f73c40f71f9
BLAKE2b-256 0544a6a261c532467d4c6af063fb4441910b169c14ef69b474f42adb110ec1de

See more details on using hashes here.

File details

Details for the file visionllm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: visionllm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for visionllm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3d8980fb8ae091797eacd7e034606a7b2ba4ef05d0933dcd813d491b58c2a3f
MD5 ed02ab9344b1f688f649ceda14e3bb37
BLAKE2b-256 2a8a7e91caf2084490b3c8b0bb9e8be86d5aa08c37a7bf68a5f1611b5aa272ed

See more details on using hashes here.

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