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 (24249870+lpalbou@users.noreply.github.com)

Version

Current version: 0.1.1

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.1.tar.gz (7.9 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.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: visionllm-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 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.1.tar.gz
Algorithm Hash digest
SHA256 bb1dbab53b27a3d76d90f5e8ee566cc5a0a046945a11026e587040e506bbf304
MD5 92d9da35d5533830b83fc1495ee7a2b3
BLAKE2b-256 73efd8072907c0a3c7a670c55f607585cb60dc4e9bc3564741268924bf8b32e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: visionllm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1a5d3cb15b59fa53ac5b8369bd49e77ae31a699e1f8bd8d23d4874fb7774d04
MD5 bd8fb027490d8a952980107dcc37f3e0
BLAKE2b-256 06f89ed0922f2bd783775eabf249b8896f2aa1cddb73259715b6dd2396e36e9d

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