Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarx committed Oct 11, 2022
1 parent fe48eab commit e494b5f
Showing 1 changed file with 48 additions and 12 deletions.
60 changes: 48 additions & 12 deletions Video_Killed_The_Radio_Star_Defusion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "oPbeyWtesAoh"
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -1313,4 +1349,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit e494b5f

Please sign in to comment.