Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LazarLazarov committed Jun 13, 2022
1 parent f6b3337 commit 56a1265
Showing 1 changed file with 14 additions and 40 deletions.
54 changes: 14 additions & 40 deletions Disco_Diffusion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,8 @@
{
"cell_type": "code",
"metadata": {
"id": "DefFns"
"id": "DefFns",
"cellView": "form"
},
"source": [
"#@title 1.5 Define necessary functions\n",
Expand Down Expand Up @@ -1226,7 +1227,6 @@
"\n",
" model_stats = []\n",
" for clip_model in clip_models:\n",
" # cutn = 16\n",
" model_stat = {\"clip_model\":None,\"target_embeds\":[],\"make_cutouts\":None,\"weights\":[]}\n",
" model_stat[\"clip_model\"] = clip_model\n",
" \n",
Expand Down Expand Up @@ -1575,8 +1575,7 @@
{
"cell_type": "code",
"metadata": {
"id": "DefSecModel",
"cellView": "form"
"id": "DefSecModel"
},
"source": [
"#@title 1.6 Define the secondary diffusion model\n",
Expand Down Expand Up @@ -1792,7 +1791,7 @@
" model_secondary_SHA = '983e3de6f95c88c81b2ca7ebb2c217933be1973b1ff058776b970f901584613a'\n",
"\n",
" model_256_link = 'https://openaipublic.blob.core.windows.net/diffusion/jul-2021/256x256_diffusion_uncond.pt'\n",
" model_512_link = 'https://v-diffusion.s3.us-west-2.amazonaws.com/512x512_diffusion_uncond_finetune_008100.pt'\n",
" model_512_link = 'https://the-eye.eu/public/AI/models/512x512_diffusion_unconditional_ImageNet/512x512_diffusion_uncond_finetune_008100.pt'\n",
" model_secondary_link = 'https://v-diffusion.s3.us-west-2.amazonaws.com/secondary_model_imagenet_2.pth'\n",
"\n",
" model_256_link_fb = 'https://www.dropbox.com/s/9tqnqo930mpnpcn/256x256_diffusion_uncond.pt'\n",
Expand Down Expand Up @@ -1966,8 +1965,7 @@
{
"cell_type": "code",
"metadata": {
"id": "BasicSettings",
"cellView": "form"
"id": "BasicSettings"
},
"source": [
"#@markdown ####**Basic Settings:**\n",
Expand Down Expand Up @@ -2404,8 +2402,7 @@
{
"cell_type": "code",
"metadata": {
"id": "ExtraSettings",
"cellView": "form"
"id": "ExtraSettings"
},
"source": [
"#@markdown ####**Saving:**\n",
Expand Down Expand Up @@ -2712,45 +2709,26 @@
"from __future__ import print_function\n",
"from ipywidgets import Textarea, Text, BoundedIntText, IntSlider, Button,\\\n",
"FloatSlider, Checkbox, Dropdown, IntText, Layout, VBox, HBox\n",
"from IPython.display import display, clear_output\n",
"import ast\n",
"import ipywidgets as widgets\n",
"\n",
"\n",
"# TODO: make defaults based on global varibles defined in previous cells\n",
"default_text_prompts = \\\n",
"\"\"\"{\n",
" 0: [\"A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.\", \"yellow color scheme\"],\n",
" 100: [\"This set of prompts start at frame 100\",\"This prompt has weight five:5\"],\n",
"}\"\"\"\n",
"import json\n",
"\n",
"text_prompts_wgt = Textarea(\n",
" value=default_text_prompts,\n",
" placeholder=default_text_prompts,\n",
" value=json.dumps(text_prompts, indent=4),\n",
" placeholder=json.dumps(text_prompts, indent=4),\n",
" description='text_prompts:',\n",
" layout=Layout(width=\"95%\", height=\"12em\", max_height=\"none\"),\n",
" disabled=False\n",
")\n",
"\n",
"default_image_prompts = \\\n",
"\"\"\"{ \n",
" # 0:['ImagePromptsWorkButArentVeryGood.png:2',],\n",
"}\"\"\"\n",
"\n",
"image_prompts_wgt = Textarea(\n",
" value=default_image_prompts,\n",
" placeholder=default_image_prompts,\n",
" value=json.dumps(image_prompts, indent=4),\n",
" placeholder=json.dumps(image_prompts, indent=4),\n",
" description='image_prompts:',\n",
" layout=Layout(width=\"95%\", height=\"4em\", max_height=\"none\"),\n",
" disabled=False\n",
")\n",
"\n",
"batch_name_wgt = Text(\n",
" value=batch_name,\n",
" placeholder=batch_name,\n",
" description='batch_name:',\n",
" disabled=False \n",
")\n",
"\n",
"\n",
"steps_wgt = BoundedIntText(\n",
Expand Down Expand Up @@ -2945,9 +2923,8 @@
"cut_box = VBox([cutn_wgt, cutn_batches_wgt]) \n",
"image_box = VBox([init_image_wgt, init_scale_wgt])\n",
"perlin_box = VBox([perlin_init_wgt, perlin_mode_wgt])\n",
"batch_box = VBox([batch_name_wgt, set_seed_wgt])\n",
"\n",
"init_settings = HBox([batch_box, image_box, perlin_box])\n",
"init_settings = HBox([set_seed_wgt, image_box, perlin_box])\n",
"image_quality = HBox([size_box, steps_box, clip_box, colour_box, cut_box])\n",
"container_grid = VBox([update_button_wgt, image_quality, init_settings, text_prompts_wgt, image_prompts_wgt])\n",
"\n",
Expand Down Expand Up @@ -2998,8 +2975,7 @@
"\n"
],
"metadata": {
"id": "yRryWM8O7DS-",
"cellView": "form"
"id": "yRryWM8O7DS-"
},
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -3111,9 +3087,7 @@
"ChangelogTop",
"TutorialTop",
"DiffusionSet",
"SetupTop",
"DiffClipSetTop",
"AnimSetTop",
"PromptsTop",
"CreateVidTop"
],
Expand Down Expand Up @@ -3143,4 +3117,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit 56a1265

Please sign in to comment.