├── LICENSE ├── README.md ├── text_diffuser_2_colab.ipynb └── text_diffuser_colab.ipynb /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 🐣 Please follow me for new updates https://twitter.com/camenduru
2 | 🔥 Please join our discord server https://discord.gg/k5BwmmvJJU
3 | 🥳 Please join my patreon community https://patreon.com/camenduru
4 | 5 | ## 🚦 WIP 🚦 6 | 7 | ### 🦒 Colab 8 | 9 | | Colab | Info 10 | | --- | --- | 11 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/TextDiffuser-colab/blob/main/text_diffuser_2_colab.ipynb) | text_diffuser_2_colab (Pro Colab 😭) 12 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/TextDiffuser-colab/blob/main/text_diffuser_colab.ipynb) | text_diffuser_colab 13 | 14 | ## Paper 15 | https://arxiv.org/abs/2305.10855 16 | 17 | ## Page 18 | https://jingyechen.github.io/textdiffuser/ 19 | 20 | ## Main Repo 21 | https://github.com/microsoft/unilm/tree/master/textdiffuser
22 | https://huggingface.co/spaces/microsoft/TextDiffuser/tree/main
23 | 24 | ## Output 25 | ![Screenshot 2023-06-02 214505](https://github.com/camenduru/TextDiffuser-colab/assets/54370274/2b321585-7105-41cd-8b72-8dc7148c79b6) 26 | -------------------------------------------------------------------------------- /text_diffuser_2_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/TextDiffuser-colab/blob/main/text_diffuser_2_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "IkgfVvAUKex5" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "!git clone -b dev https://github.com/camenduru/TextDiffuser-2-hf\n", 22 | "!pip install datasets==2.11.0 accelerate==0.22.0 diffusers==0.24.0 fschat==0.2.26 sentencepiece\n", 23 | "%cd /content/TextDiffuser-2-hf\n", 24 | "!python app.py" 25 | ] 26 | } 27 | ], 28 | "metadata": { 29 | "accelerator": "GPU", 30 | "colab": { 31 | "gpuType": "T4", 32 | "provenance": [] 33 | }, 34 | "kernelspec": { 35 | "display_name": "Python 3", 36 | "name": "python3" 37 | }, 38 | "language_info": { 39 | "name": "python" 40 | } 41 | }, 42 | "nbformat": 4, 43 | "nbformat_minor": 0 44 | } 45 | -------------------------------------------------------------------------------- /text_diffuser_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/TextDiffuser-colab/blob/main/text_diffuser_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "IkgfVvAUKex5" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "!git clone -b dev https://github.com/camenduru/TextDiffuser-hf\n", 22 | "%cd /content/TextDiffuser-hf\n", 23 | "!apt -y install -qq aria2\n", 24 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/textdiffuser/resolve/main/textdiffuser-ckpt-new.zip -d /content -o textdiffuser-ckpt-new.zip\n", 25 | "!rm -rf /content/TextDiffuser-hf/src/diffusers\n", 26 | "!pip install -r requirements.txt\n", 27 | "!pip install -q gradio==3.44.4\n", 28 | "# !pip install git+https://github.com/camenduru/TextDiffuser-diffusers -U\n", 29 | "\n", 30 | "import zipfile\n", 31 | "with zipfile.ZipFile('/content/textdiffuser-ckpt-new.zip', 'r') as zip_ref:\n", 32 | " zip_ref.extractall('.')\n", 33 | "\n", 34 | "!python app.py" 35 | ] 36 | } 37 | ], 38 | "metadata": { 39 | "accelerator": "GPU", 40 | "colab": { 41 | "gpuType": "T4", 42 | "provenance": [] 43 | }, 44 | "kernelspec": { 45 | "display_name": "Python 3", 46 | "name": "python3" 47 | }, 48 | "language_info": { 49 | "name": "python" 50 | } 51 | }, 52 | "nbformat": 4, 53 | "nbformat_minor": 0 54 | } 55 | --------------------------------------------------------------------------------