Skip to content

Commit 9a611a9

Browse files
committed
Moar tweaks
1 parent b5b54c2 commit 9a611a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hackathon/dreambooth.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
"metadata": {},
162162
"outputs": [],
163163
"source": [
164-
"%pip install -qqU diffusers transformers bitsandbytes accelerate ftfy datasets ipywidgets"
164+
"%pip install -qqU diffusers transformers bitsandbytes accelerate ftfy datasets"
165165
]
166166
},
167167
{
@@ -887,7 +887,6 @@
887887
"source": [
888888
"import math\n",
889889
"\n",
890-
"import bitsandbytes as bnb\n",
891890
"import torch.nn.functional as F\n",
892891
"from accelerate import Accelerator\n",
893892
"from accelerate.utils import set_seed\n",
@@ -910,6 +909,7 @@
910909
"\n",
911910
" # Use 8-bit Adam for lower memory usage or to fine-tune the model in 16GB GPUs\n",
912911
" if args.use_8bit_adam:\n",
912+
" import bitsandbytes as bnb\n",
913913
" optimizer_class = bnb.optim.AdamW8bit\n",
914914
" else:\n",
915915
" optimizer_class = torch.optim.AdamW\n",
@@ -1019,6 +1019,7 @@
10191019
"\n",
10201020
" # Create the pipeline using using the trained modules and save it.\n",
10211021
" if accelerator.is_main_process:\n",
1022+
" print(f\"Loading pipeline and saving to {args.output_dir}...\")\n",
10221023
" scheduler = PNDMScheduler(\n",
10231024
" beta_start=0.00085,\n",
10241025
" beta_end=0.012,\n",
@@ -1185,8 +1186,10 @@
11851186
}
11861187
],
11871188
"source": [
1188-
"# Pick a funny prompt here and it will be saved as the default for widget on the Hub!\n",
1189+
"# Pick a funny prompt here and it will be used as the widget's default \n",
1190+
"# when we push to the Hub in the next section\n",
11891191
"prompt = f\"a photo of {name_of_your_concept} {type_of_thing} in the Acropolis\"\n",
1192+
"\n",
11901193
"# Tune the guidance to control how closely the generations follow the prompt.\n",
11911194
"# Values between 7-11 usually work best\n",
11921195
"guidance_scale = 7\n",

0 commit comments

Comments
 (0)