Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the cheatsheet() cell to its own .ipynb and !pip to %pip #113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions discoart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"outputs": [],
"source": [
"!pip install -U discoart"
"%pip install -U discoart"
]
},
{
Expand Down Expand Up @@ -131,23 +131,7 @@
"source": [
"## Check parameter cheatsheet\n",
"\n",
"But what parameters can be used in `create()`? just type `cheatsheet()` to lookup anytime:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2c6c8306",
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"from discoart import cheatsheet\n",
"\n",
"cheatsheet()"
"But what parameters can be used in `create()`? open [reference_sheet.ipynb](reference_sheet.ipynb) to see all parameters side-by-side while you work."
]
},
{
Expand Down Expand Up @@ -296,7 +280,7 @@
"metadata": {
"accelerator": "GPU",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3.9.13 ('venv')",
"language": "python",
"name": "python3"
},
Expand All @@ -310,7 +294,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.9.13"
},
"vscode": {
"interpreter": {
"hash": "4354724624f80789ae4718f08694724ab5983ef26590d675bff83f89ffb2ce72"
}
}
},
"nbformat": 4,
Expand Down
158 changes: 158 additions & 0 deletions reference_sheet.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "ba4a6587",
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"<img src=\"https://github.com/jina-ai/discoart/blob/main/.github/banner.png?raw=true\" alt=\"Create Disco Diffusion artworks in one-line\">\n",
"<p align=center>\n",
"<a href=\"https://pypi.org/project/discoart/\"><img src=\"https://img.shields.io/pypi/v/discoart?style=flat-square&amp;label=Release\" alt=\"PyPI\"></a>\n",
"<a href=\"https://slack.jina.ai\"><img src=\"https://img.shields.io/badge/Slack-3.1k-blueviolet?logo=slack&amp;logoColor=white&style=flat-square\"></a>\n",
"<a href=\"https://colab.research.google.com/github/jina-ai/dalle-flow/blob/main/client.ipynb\"><img src=\"https://img.shields.io/badge/Open-in%20Colab-brightgreen?logo=google-colab&style=flat-square\" alt=\"Open in Google Colab\"/></a>\n",
"</p>\n",
"\n",
"😎 **If you are already a DD user**: you are ready to go! There is no extra learning, DiscoArt respects the same parameter semantics as DD5.2. So just unleash your creativity! [Read more about DiscoArt vs. DD5.5](https://github.com/jina-ai/discoart/blob/main/FEATURES.md)\n",
"\n",
"You can always do `from discoart import cheatsheet; cheatsheet()` to check all new/modified parameters, DiscoArt specific parameters are highlighted in the cheatsheet. \n",
"\n",
"\n",
"\n",
"👶 **If you are a [DALL·E Flow](https://github.com/jina-ai/dalle-flow/) or new user**: you may want to take step by step, as Disco Diffusion works in a very different way than DALL·E. It is much more advanced and powerful: e.g. Disco Diffusion can take weighted & structured text prompts; it can initialize from a image with controlled noise; and there are way more parameters one can tweak. Impatient prompt like `\"armchair avocado\"` will give you nothing but confusion and frustration. I highly recommend you to check out the following resources before trying your own prompt:\n",
"- [Zippy's Disco Diffusion Cheatsheet v0.3](https://docs.google.com/document/d/1l8s7uS2dGqjztYSjPpzlmXLjl5PM3IGkRWI3IiCuK7g/mobilebasic)\n",
"- [EZ Charts - Diffusion Parameter Studies](https://docs.google.com/document/d/1ORymHm0Te18qKiHnhcdgGp-WSt8ZkLZvow3raiu2DVU/edit#)\n",
"- [Disco Diffusion 70+ Artist Studies](https://weirdwonderfulai.art/resources/disco-diffusion-70-plus-artist-studies/)\n",
"- [A Traveler’s Guide to the Latent Space](https://sweet-hall-e72.notion.site/A-Traveler-s-Guide-to-the-Latent-Space-85efba7e5e6a40e5bd3cae980f30235f#e122e748b86e4fc0ad6a7a50e46d6e10)\n",
"- [Disco Diffusion Illustrated Settings](https://coar.notion.site/Disco-Diffusion-Illustrated-Settings-cd4badf06e08440c99d8a93d4cd39f51)\n",
"- [Coar’s Disco Diffusion Guide](https://coar.notion.site/coar/Coar-s-Disco-Diffusion-Guide-3d86d652c15d4ca986325e808bde06aa#8a3c6e9e4b6847afa56106eacb6f1f79)\n",
"\n",
"# Install"
]
},
{
"cell_type": "markdown",
"id": "f4e22757",
"metadata": {},
"source": [
"# You need discoart installed to use the cheatsheet."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ca392ef6",
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"%pip install -U discoart"
]
},
{
"cell_type": "markdown",
"id": "a6ac122d",
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## Check parameter cheatsheet\n",
"\n",
"But what parameters can be used in `create()`? just type `cheatsheet()` to lookup anytime:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2c6c8306",
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"from discoart import cheatsheet\n",
"\n",
"cheatsheet()\n"
]
},
{
"cell_type": "markdown",
"id": "d893ac95",
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"\n",
"🎉 That's all you need to learn.\n",
"\n",
"Of course if you have some extra time, it would be helpful for you to learn the following API of DiscoArt.\n",
"\n",
"\n",
"---\n",
"\n",
"## Where your files go\n",
"\n",
"\n",
"Final results and intermediate results are created under the current working directory, e.g.\n",
"```text\n",
"./{name-docarray}/{i}-step-{j}.png\n",
"./{name-docarray}/{i}-progress.png\n",
"./{name-docarray}/{i}-progress.gif\n",
"./{name-docarray}/{i}-done.png\n",
"```\n",
"\n",
"![](.github/result-persist.png)\n",
"\n",
"where:\n",
"\n",
"- `name-docarray` is the name of the run, you can specify it otherwise it is a random name.\n",
"- `i-*` is up to the value of `n_batches`.\n",
"- `*-done-*` is the final image on done.\n",
"- `*-step-*` is the intermediate image at certain step.\n",
"- `*-progress.png` is the sprite image of all intermediate results so far.\n",
"- `*-progress.gif` is the animated gif of all intermediate results so far.\n",
"\n",
"The save frequency is controlled by `save_rate`.\n"
]
}
],
"metadata": {
"accelerator": "GPU",
"kernelspec": {
"display_name": "Python 3.9.13 ('venv')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
},
"vscode": {
"interpreter": {
"hash": "4354724624f80789ae4718f08694724ab5983ef26590d675bff83f89ffb2ce72"
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}