ml-keyframer
Keyframer: Empowering Animation Design Using Large Language Models
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.6%) to scientific vocabulary
Keywords
Repository
Keyframer: Empowering Animation Design Using Large Language Models
Basic Info
- Host: GitHub
- Owner: apple
- License: other
- Language: JavaScript
- Default Branch: main
- Homepage: https://machinelearning.apple.com/research/keyframer
- Size: 946 KB
Statistics
- Stars: 42
- Watchers: 9
- Forks: 6
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
Keyframer: Empowering Animation Design using Large Language Models
Keyframer is a design tool for animating static images using natural language prompts. It enables users to refine animations by directly editing generated designs and explore alternatives by requesting variants. [Paper, Video]
Tiffany Tseng, Ruijia Cheng, Jeffrey Nichols

Setup
This application utilizes GPT-4 and requires a valid Open AI API key.
Clone this repository
Navigate to the project directory
bash $ cd ml-keyframerInstall the requirements
bash $ npm installEdit your bash profile to add your OpenAI API key.
For example, on Mac, open your bash profile with the nano editor
bash
$ nano ~/.bash_profile
or for newer Macs
bash
$ nano ~/.zshrc
and add your Open AI API, replacing your-api-key-here with your API key
bash
export OPENAI_API_KEY='your-api-key-here'
Save and exit (nano editor: Ctrl+O to write changes and Ctrl+X to close the editor)
Load your updated profile with
bash
source ~/.bash_profile
or
bash
source ~/.zshrc
Verify your setup by typing echo $OPENAI_API_KEY in your terminal and check that it displays your API key.
If you are using Windows, you can find instructions for setting up your API key here
- Run the app
bash
$ npm run dev
You should now be able to access the app at http://localhost:3000
Using Keyframer
Keyframer takes SVG image input and uses GPT-4 to generate CSS code to animate the image.
- Select one of the default images under
Input, or paste in code for an SVG image in the Input field. (Please refer to the instructions below for preparing custom SVGs to use in Keyframer.)

- Enter in a prompt for animating the image. When writing your prompt, it can helpful to incorporate the identifiers for elements in the SVG (specified with
id=ITEM_NAMEin the code, see figure below for more detail). You can request multiple designs to compare, e.g.Create 3 animations of <user-request>.

Click the "Generate Animations" button.
The LLM returns CSS code followed by the generated animation once the request is complete.
You can edit the response by 1) editing the CSS code using the Code Editors, or 2) editing the CSS properties using the Properties Editor. The Properties Editor will have some helpful UI for editing certain types of properties, such as a color picker for editing hex color values.
To extend your design, click "+ Add New Prompt" for any selected design to add a new prompt. Any new requests will be added on top of your existing design so you can iteratively build your animation.
Preparing Custom SVG Images
Keyframer takes image input in the form of an SVG. You can create your own SVG images in your graphics editor of choice before bringing it into Keyframer.
When creating custom images, it's important to add relevant names to your layers so the large language model has context of the elements in the image. When you name your layers, those names will be exported in the SVG code as id properties on the different SVG elements.
For step by step tips for preparing SVGs to use in Keyframer (including naming and grouping layers and minimizing the SVG size), please refer to Section A.2 in the paper.
BibTeX
To cite our paper, please use
bibtex
@article{tseng2024keyframer,
title={Keyframer: Empowering Animation Design using Large Language Models},
author={Tseng, Tiffany and Cheng, Ruijia and Nichols, Jeffrey},
journal={arXiv preprint arXiv:2402.06071},
year={2024}
}
Acknowledgments
- This application builds upon the Open AI Quickstart Tutorial
Owner
- Name: Apple
- Login: apple
- Kind: organization
- Location: Cupertino, CA
- Website: https://apple.com
- Repositories: 305
- Profile: https://github.com/apple
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Tseng" given-names: "Tiffany" orcid: "https://orcid.org/0000-0003-4972-4061" - family-names: "Cheng" given-names: "Ruijia" orcid: "https://orcid.org/0000-0002-2377-9550" - family-names: "Nichols" given-names: "Jeffrey" orcid: "https://orcid.org/0000-0002-9290-1409" title: "Keyframer: Empowering Animation Design using Large Language Models" version: 0.1.0 doi: 10.48550/arXiv.2402.06071 date-released: 2024-05-20 url: "github_url_placeholder"
GitHub Events
Total
- Issues event: 1
- Watch event: 32
- Pull request event: 1
- Fork event: 4
Last Year
- Issues event: 1
- Watch event: 32
- Pull request event: 1
- Fork event: 4
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Tiffany Tseng | t****g@a****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- steveharman (1)
Pull Request Authors
- djtoler (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- 396 dependencies
- @babel/parser 7.9.4
- @codemirror/lang-html ^6.4.5
- @codemirror/lang-javascript ^6.1.9
- @codemirror/lang-less ^6.0.1
- @fortawesome/fontawesome-svg-core ^6.4.2
- @fortawesome/free-solid-svg-icons ^6.4.2
- @fortawesome/react-fontawesome ^0.2.0
- @uiw/codemirror-theme-tokyo-night ^4.21.7
- @uiw/react-codemirror ^4.21.7
- codemirror ^6.0.1
- cssjson ^2.1.3
- install ^0.13.0
- lodash ^4.17.21
- next >=14.1.1
- npm ^10.5.2
- openai ^4.38.0
- prettier 2.0.4
- prism-react-renderer ^2.0.6
- rc-segmented ^2.2.2
- react ^18.3.1
- react-bezier-curve-editor ^1.1.2
- react-color ^2.19.3
- react-dom ^18.3.1
- react-select ^5.7.4
- react-simple-code-editor ^0.13.1
- react-syntax-highlighter ^15.5.0
- reactcss ^1.2.3
- svg-parser ^2.0.4
- svgson ^5.3.1