From e494b5fe276d08d1f0eda49e3803510f1f3a90ba Mon Sep 17 00:00:00 2001 From: David Marx Date: Mon, 10 Oct 2022 18:52:50 -0700 Subject: [PATCH] documentation --- Video_Killed_The_Radio_Star_Defusion.ipynb | 60 +++++++++++++++++----- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/Video_Killed_The_Radio_Star_Defusion.ipynb b/Video_Killed_The_Radio_Star_Defusion.ipynb index 3b947e7..de1833e 100644 --- a/Video_Killed_The_Radio_Star_Defusion.ipynb +++ b/Video_Killed_The_Radio_Star_Defusion.ipynb @@ -115,7 +115,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "cellView": "form", "id": "oPbeyWtesAoh" @@ -237,20 +237,13 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": { "cellView": "form", "id": "s-9xjgy0iHhS" }, "outputs": [], "source": [ - "# @markdown To create a new project, enter a unique project name.\n", - "# @markdown If you leave `project_name` blank, the current unix timestamp will be used\n", - "# @markdown (seconds since 1970-01-01 00:00).\n", - "\n", - "# @markdown If you use the name of an existing project, the workspace will switch to that project.\n", - "\n", - "# @markdown Non-alphanumeric characters (excluding '-' and '_') will be replaced with hyphens.\n", "\n", "import time\n", "from vktrs.utils import sanitize_folder_name\n", @@ -268,6 +261,15 @@ "with open('config.yaml','w') as fp:\n", " OmegaConf.save(config=workspace, f=fp.name)\n", "\n", + "# @markdown To create a new project, enter a unique project name.\n", + "# @markdown If you leave `project_name` blank, the current unix timestamp will be used\n", + "# @markdown (seconds since 1970-01-01 00:00).\n", + "\n", + "# @markdown If you use the name of an existing project, the workspace will switch to that project.\n", + "\n", + "# @markdown Non-alphanumeric characters (excluding '-' and '_') will be replaced with hyphens.\n", + "\n", + "\n", "# reset workspace\n", "if 'df' in locals():\n", " del df\n", @@ -559,6 +561,20 @@ "# Review/Modify transcription #\n", "###############################\n", "\n", + "# @markdown ---\n", + "# @markdown NB: When this cell finishes running, a table will appear\n", + "# @markdown at the bottom of the output window. This table is editable\n", + "# @markdown and can be used to correct errors in the transcription.\n", + "# @markdown\n", + "# @markdown additionally, the `override_prompt` field can be used to provide an \n", + "# @markdown alternative text prompt for image generation. If this feature is\n", + "# @markdown used, both the lyric and the theme prompt (which you will specify \n", + "# @markdown in the cell that follows this) will be ignored. If you want to use\n", + "# @markdown an `override_prompt` and also want to stay on theme, you will have \n", + "# @markdown to append the desired `theme_prompt` to the end of the \n", + "# @markdown `override_prompt` manually.\n", + "\n", + "\n", "# https://panel.holoviz.org/reference/widgets/Tabulator.html\n", "pn.extension('tabulator') # I don't know that specifying 'tabulator' here is even necessary...\n", "\n", @@ -722,7 +738,7 @@ "\n", "d_ = dict(\n", " _=''\n", - " , theme_prompt = \"by ralph steadman, and by radiohead, and by rage against the machine, so detailed, beautiful, amazing, provocative\" # @param {type:'string'}\n", + " , theme_prompt = \"by ralph steadman and radiohead, so detailed, beautiful, amazing, provocative\" # @param {type:'string'}\n", " , height = 512 # @param {type:'integer'}\n", " , width = 512 # @param {type:'integer'}\n", " , display_frames_as_we_get_them = True # @param {type:'boolean'}\n", @@ -836,6 +852,20 @@ "# flag regens #\n", "###############\n", "\n", + "# @markdown ---\n", + "# @markdown NB: When this cell finishes running, a table will appear at the bottom of the output window. This table is editable and can be used to correct errors in the transcription (see above).\n", + "\n", + "# @markdown Additionally, this table can be used to trigger regeneration of\n", + "# @markdown images you don't want to keep. On the far left of the table, you\n", + "# @markdown you should see a `keep` column that defaults to \"true\". Double \n", + "# @markdown clicking this value should flip it to \"false\". Rerunning this cell\n", + "# @markdown will regenerate the `init_image` for all scenes where `keep=false`.\n", + "# @markdown Images that are flagged for regeneration will be moved to the\n", + "# @markdown project's `archive` folder.\n", + "\n", + "# @markdown Image regeneration can also be triggered by deleting the image from \n", + "# @markdown the `frames` folder.\n", + "\n", "\n", "df_regen = pd.DataFrame(prompt_starts)\n", "if 'override_prompt' not in df_regen:\n", @@ -1046,7 +1076,13 @@ "\n", "# to do: deal with these td objects\n", "with open(storyboard_fname) as fp:\n", - " OmegaConf.save(config=storyboard, f=fp.name)" + " OmegaConf.save(config=storyboard, f=fp.name)\n", + "\n", + "# @markdown ---\n", + "# @markdown Running this cell will generate as many variation frames as required \n", + "# @markdown per `n_variations`. To trigger regeneration of images that didn't\n", + "# @markdown generate correctly (e.g. because a nsfw classifier was triggered),\n", + "# @markdown just delete those images." ] }, { @@ -1313,4 +1349,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file