# Fabler
[![CI][ci-badge]][ci-url]
[![PyPI Status Badge][pypi-badge]][pypi-url]
[![PyPI - Python Version][python-badge]][python-url]
[![Code style: black][style-badge]][style-url]
[![License: MIT][license-badge]][license-url]
---
A multi-model AI story teller, built with [Stable Diffusion](https://huggingface.co/spaces/stabilityai/stable-diffusion), GPT, and neural text-to-speech (TTS).
Given a prompt as an opening line of a story, GPT writes the rest of the plot; Stable Diffusion draws an image for each sentence; a TTS model narrates each line, resulting in a fully animated video of a short story, replete with audio and visuals.
![demo animation](https://user-images.githubusercontent.com/25360440/210071764-51ed5872-ba56-4ed0-919b-d9ce65110185.gif)
## Quickstart
### Check it out now [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/christopherwoodall/fabler/blob/main/notebooks/demo.ipynb) or follow the instructions below to install locally.
### Install from [PyPi](https://pypi.org/project/fabler/)
```bash
$ pip install fabler
```
### Install from Source
1. Clone the repository
```bash
$ git clone https://github.com/christopherwoodall/fabler.git
```
2. Install package requirements.
```bash
$ pip install --upgrade pip wheel
$ pip install -e ".[developer]"
```
3. Run the demo. The final video will be saved as `/out/out.mp4`, alongside other intermediate images, audio files, and subtitles.
```bash
$ fabler --scene=scene.yaml
```
4 Alternatively with make:
```bash
make install && make run
```
## Usage
1. Load the model with defaults.
```python
from fabler import Fabler
story_teller = Fabler.from_defaults()
story_teller.generate(...)
```
2. Alternatively, configure the model with custom settings.
```python
from fabler import Fabler, FablerConfig
config = FablerConfig(
writer="gpt2-large",
painter="CompVis/stable-diffusion-v1-4",
max_new_tokens=100,
diffusion_prompt_prefix="Van Gogh style",
)
story_teller = Fabler(config)
story_teller.generate(...)
```
## License
Released under the [MIT License](LICENSE).
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[ci-badge]: https://github.com/christopherwoodall/fabler/actions/workflows/lint.yml/badge.svg?branch=main
[ci-url]: https://github.com/christopherwoodall/fabler/actions/workflows/lint.yml
[pypi-badge]: https://badge.fury.io/py/fabler.svg
[pypi-url]: https://pypi.org/project/fabler
[python-badge]: https://img.shields.io/pypi/pyversions/fabler
[python-url]: https://pypi.org/project/fabler
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
[license-url]: https://opensource.org/licenses/MIT
[style-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[style-url]: https://github.com/ambv/black
Raw data
{
"_id": null,
"home_page": "",
"name": "fabler",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "GPT,TTS,language-model,multimodal AI,neural text-to-speech,stable diffusion,transformer",
"author": "",
"author_email": "Christopher Woodall <woodall.christopher@gmail.com>",
"download_url": "",
"platform": null,
"description": "# Fabler\n\n[![CI][ci-badge]][ci-url]\n[![PyPI Status Badge][pypi-badge]][pypi-url]\n[![PyPI - Python Version][python-badge]][python-url]\n[![Code style: black][style-badge]][style-url]\n[![License: MIT][license-badge]][license-url]\n\n---\n\nA multi-model AI story teller, built with [Stable Diffusion](https://huggingface.co/spaces/stabilityai/stable-diffusion), GPT, and neural text-to-speech (TTS).\n\nGiven a prompt as an opening line of a story, GPT writes the rest of the plot; Stable Diffusion draws an image for each sentence; a TTS model narrates each line, resulting in a fully animated video of a short story, replete with audio and visuals.\n\n![demo animation](https://user-images.githubusercontent.com/25360440/210071764-51ed5872-ba56-4ed0-919b-d9ce65110185.gif)\n\n\n## Quickstart\n\n### Check it out now [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/christopherwoodall/fabler/blob/main/notebooks/demo.ipynb) or follow the instructions below to install locally.\n\n\n### Install from [PyPi](https://pypi.org/project/fabler/)\n```bash\n$ pip install fabler\n```\n\n\n### Install from Source\n1. Clone the repository\n\n```bash\n$ git clone https://github.com/christopherwoodall/fabler.git\n```\n\n2. Install package requirements.\n\n```bash\n$ pip install --upgrade pip wheel\n$ pip install -e \".[developer]\"\n```\n\n3. Run the demo. The final video will be saved as `/out/out.mp4`, alongside other intermediate images, audio files, and subtitles.\n\n```bash\n$ fabler --scene=scene.yaml\n```\n\n4 Alternatively with make:\n\n```bash\nmake install && make run\n```\n\n## Usage\n\n1. Load the model with defaults.\n\n```python\nfrom fabler import Fabler\n\nstory_teller = Fabler.from_defaults()\nstory_teller.generate(...)\n```\n\n2. Alternatively, configure the model with custom settings.\n\n```python\nfrom fabler import Fabler, FablerConfig\n\nconfig = FablerConfig(\n writer=\"gpt2-large\",\n painter=\"CompVis/stable-diffusion-v1-4\",\n max_new_tokens=100,\n diffusion_prompt_prefix=\"Van Gogh style\",\n)\n\nstory_teller = Fabler(config)\nstory_teller.generate(...)\n```\n\n## License\n\nReleased under the [MIT License](LICENSE).\n\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n[ci-badge]: https://github.com/christopherwoodall/fabler/actions/workflows/lint.yml/badge.svg?branch=main\n[ci-url]: https://github.com/christopherwoodall/fabler/actions/workflows/lint.yml\n[pypi-badge]: https://badge.fury.io/py/fabler.svg\n[pypi-url]: https://pypi.org/project/fabler\n[python-badge]: https://img.shields.io/pypi/pyversions/fabler\n[python-url]: https://pypi.org/project/fabler\n[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg\n[license-url]: https://opensource.org/licenses/MIT\n[style-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[style-url]: https://github.com/ambv/black\n",
"bugtrack_url": null,
"license": "",
"summary": "Multimodal AI Story Teller, built with Stable Diffusion, GPT, and neural text-to-speech.",
"version": "0.0.6",
"project_urls": {
"GitHub": "https://github.com/christopherwoodall/fabler"
},
"split_keywords": [
"gpt",
"tts",
"language-model",
"multimodal ai",
"neural text-to-speech",
"stable diffusion",
"transformer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dd317f185979877777234de0282c46d35f36d5fcaa8ecd034af86fbe3c70960c",
"md5": "dd92dfa0a2e8df51adf00ec623085023",
"sha256": "d605795fcdfb81c5673b3a519294e9f9fac5e983617158ae3a836f136e1d60fd"
},
"downloads": -1,
"filename": "fabler-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dd92dfa0a2e8df51adf00ec623085023",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 91552,
"upload_time": "2023-07-26T21:12:18",
"upload_time_iso_8601": "2023-07-26T21:12:18.010398Z",
"url": "https://files.pythonhosted.org/packages/dd/31/7f185979877777234de0282c46d35f36d5fcaa8ecd034af86fbe3c70960c/fabler-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-26 21:12:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "christopherwoodall",
"github_project": "fabler",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fabler"
}