diff --git a/Disco_Diffusion.ipynb b/Disco_Diffusion.ipynb index 67c6659b..e7be22a2 100644 --- a/Disco_Diffusion.ipynb +++ b/Disco_Diffusion.ipynb @@ -743,7 +743,8 @@ { "cell_type": "code", "metadata": { - "id": "DefFns" + "id": "DefFns", + "cellView": "form" }, "source": [ "#@title 1.5 Define necessary functions\n", @@ -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", @@ -1575,8 +1575,7 @@ { "cell_type": "code", "metadata": { - "id": "DefSecModel", - "cellView": "form" + "id": "DefSecModel" }, "source": [ "#@title 1.6 Define the secondary diffusion model\n", @@ -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", @@ -1966,8 +1965,7 @@ { "cell_type": "code", "metadata": { - "id": "BasicSettings", - "cellView": "form" + "id": "BasicSettings" }, "source": [ "#@markdown ####**Basic Settings:**\n", @@ -2404,8 +2402,7 @@ { "cell_type": "code", "metadata": { - "id": "ExtraSettings", - "cellView": "form" + "id": "ExtraSettings" }, "source": [ "#@markdown ####**Saving:**\n", @@ -2712,34 +2709,21 @@ "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", @@ -2952,6 +2936,7 @@ "container_grid = VBox([update_button_wgt, image_quality, init_settings, text_prompts_wgt, image_prompts_wgt])\n", "\n", "def update_values(b):\n", + " global batch_name\n", " global text_prompts\n", " global image_prompts\n", " global clip_guidance_scale\n", @@ -2970,6 +2955,7 @@ " global eta\n", " global width_height\n", "\n", + " batch_name = batch_name_wgt.value\n", " text_prompts = ast.literal_eval(text_prompts_wgt.value)\n", " image_prompts = ast.literal_eval(image_prompts_wgt.value)\n", " clip_guidance_scale = clip_guidance_scale_wgt.value\n", @@ -2998,8 +2984,7 @@ "\n" ], "metadata": { - "id": "yRryWM8O7DS-", - "cellView": "form" + "id": "yRryWM8O7DS-" }, "execution_count": null, "outputs": [] @@ -3111,9 +3096,7 @@ "ChangelogTop", "TutorialTop", "DiffusionSet", - "SetupTop", "DiffClipSetTop", - "AnimSetTop", "PromptsTop", "CreateVidTop" ], @@ -3143,4 +3126,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +}