Skip to main content

kosmosg - Pytorch

Project description

Multi-Modality

KosmosG

My implementation of the model KosmosG from "KOSMOS-G: Generating Images in Context with Multimodal Large Language Models"

Installation

pip install kosmosg

Usage

import torch
from kosmosg.main import KosmosG

# usage
img = torch.randn(1, 3, 256, 256)
text = torch.randint(0, 20000, (1, 1024))

model = KosmosG()
output = model(img, text)
print(output)

Architecture

text, image => KosmosG => text tokens with multi modality understanding

License

MIT

Todo

  • Create Aligner in pytorch
  • Create Diffusion module
  • Integrate these pieces
  • Create a training script

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

kosmosg-0.0.4.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

kosmosg-0.0.4-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

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