My implementation of the model KosmosG from "KOSMOS-G: Generating Images in Context with Multimodal Large Language Models"
pip install kosmosg
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)
text, image => KosmosG => text tokens with multi modality understanding
MIT
- Create Aligner in pytorch
- Create Diffusion module
- Integrate these pieces
- Create a training script