Genie2 - Pytorch (wip)
Implementation of a framework for Genie2 in Pytorch
Install
$ pip install genie2-pytorch
Usage
import torch
from genie2_pytorch import Genie2
genie = Genie2(
dim = 512,
depth = 12,
dim_latent = 768,
num_actions = 256,
latent_channel_first = True,
is_video_enc_dec = True
)
video = torch.randn(2, 768, 3, 2, 2)
actions = torch.randint(0, 256, (2, 3))
loss, breakdown = genie(video, actions = actions)
loss.backward()
generated_video = genie.generate(video[:, :, 0], num_frames = 16)
assert generated_video.shape == (2, 768, 16 + 1, 2, 2)
Interactive
import torch
from genie2_pytorch import Genie2
genie = Genie2(
dim = 512,
depth = 12,
dim_latent = 768,
num_actions = 256,
latent_channel_first = True,
is_video_enc_dec = True
)
video = torch.randn(1, 768, 3, 2, 2)
actions = torch.randint(0, 256, (1, 3))
loss, breakdown = genie(video, actions = actions)
loss.backward()
generated_video, actions = genie.generate(
video[:, :, 0],
num_frames = 16,
interactive = True,
init_action = 0
)
# you will be prompted to enter the next action id(s) at every next time frame of the video
assert generated_video.shape == (1, 768, 16 + 1, 2, 2)
Citations
@inproceedings{Valevski2024DiffusionMA,
title = {Diffusion Models Are Real-Time Game Engines},
author = {Dani Valevski and Yaniv Leviathan and Moab Arar and Shlomi Fruchter},
year = {2024},
url = {https://api.semanticscholar.org/CorpusID:271962839}
}
@article{Ding2024DiffusionWM,
title = {Diffusion World Model},
author = {Zihan Ding and Amy Zhang and Yuandong Tian and Qinqing Zheng},
journal = {ArXiv},
year = {2024},
volume = {abs/2402.03570},
url = {https://api.semanticscholar.org/CorpusID:267499902}
}
@inproceedings{Sadat2024EliminatingOA,
title = {Eliminating Oversaturation and Artifacts of High Guidance Scales in Diffusion Models},
author = {Seyedmorteza Sadat and Otmar Hilliges and Romann M. Weber},
year = {2024},
url = {https://api.semanticscholar.org/CorpusID:273098845}
}
@misc{ParkerHolder2024,
author = {Jack Parker-Holder, Philip Ball, Jake Bruce, Vibhavari Dasagi, Kristian Holsheimer, Christos Kaplanis, Alexandre Moufarek, Guy Scully, Jeremy Shar, Jimmy Shi, Stephen Spencer, Jessica Yung, Michael Dennis, Sultan Kenjeyev, Shangbang Long, Vlad Mnih, Harris Chan, Maxime Gazeau, Bonnie Li, Fabio Pardo, Luyu Wang, Lei Zhang, Frederic Besse, Tim Harley, Anna Mitenkova, Jane Wang, Jeff Clune, Demis Hassabis, Raia Hadsell, Adrian Bolton, Satinder Singh, Tim Rocktäschel},
url = {https://deepmind.google/discover/blog/genie-2-a-large-scale-foundation-world-model/}
}
@inproceedings{Nguyen2024TurningUT,
title = {Turning Up the Heat: Min-p Sampling for Creative and Coherent LLM Outputs},
author = {Minh Nguyen and Andrew Baker and Clement Neo and Allen Roush and Andreas Kirsch and Ravid Shwartz-Ziv},
year = {2024},
url = {https://api.semanticscholar.org/CorpusID:270870613}
}
@article{Lee2022AutoregressiveIG,
title = {Autoregressive Image Generation using Residual Quantization},
author = {Doyup Lee and Chiheon Kim and Saehoon Kim and Minsu Cho and Wook-Shin Han},
journal = {2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2022},
pages = {11513-11522},
url = {https://api.semanticscholar.org/CorpusID:247244535}
}
Metadata
Release files for genie2-pytorch 0.0.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| genie2_pytorch-0.0.21.tar.gz | 1.3 MB | Without provenance | Details for genie2_pytorch-0.0.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| genie2_pytorch-0.0.21-py3-none-any.whl | Python 3 | none | any | Details for genie2_pytorch-0.0.21-py3-none-any.whl |
Total release size: 1.3 MB
Release files / genie2_pytorch-0.0.21.tar.gz
| Download URL | genie2_pytorch-0.0.21.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47f1d6a0779ee9288a85f9b3c8968ef563df996db8a2d9e1eb887ca254b9e5e9
|
|
BLAKE2b-256 checksum How to use checksums |
c146087d6e769219704ef0b2178ed8d2ef4e6b8fd4155a4e9521afdd8ff8382c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / genie2_pytorch-0.0.21-py3-none-any.whl
| Download URL | genie2_pytorch-0.0.21-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d84c507681f9aed90874fc7485d22c49bc226d6a07e49f13bec8038dfd8adc39
|
|
BLAKE2b-256 checksum How to use checksums |
ed4c4ee677cad894fcdd7f6e8b2a68040373e37b99ec19f5cde46d8982012951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for genie2-pytorch 0.0.21
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.