Skip to content

Commit 6d90fbd

Browse files
committed
apply formatter
1 parent fdc7f63 commit 6d90fbd

File tree

6 files changed

+1155
-1158
lines changed

6 files changed

+1155
-1158
lines changed

notebooks/1-2_text-to-image-generation.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
"# pipe の引数である generator に上記の乱数生成器を渡して画像を生成\n",
191191
"output = pipe(prompt=text, generator=generator)\n",
192192
"image = output.images[0]\n",
193-
"image # 画像を表示"
193+
"image # 画像を表示"
194194
]
195195
},
196196
{
@@ -234,7 +234,7 @@
234234
" prompt=text, generator=generator, num_inference_steps=15\n",
235235
")\n",
236236
"image = output.images[0]\n",
237-
"image # 画像を表示"
237+
"image # 画像を表示"
238238
]
239239
},
240240
{
@@ -336,7 +336,7 @@
336336
" prompt=text, generator=torch.manual_seed(seed)\n",
337337
")\n",
338338
"image = output.images[0]\n",
339-
"image # 画像を表示"
339+
"image # 画像を表示"
340340
]
341341
},
342342
{
@@ -381,7 +381,7 @@
381381
" prompt=text, generator=torch.manual_seed(seed)\n",
382382
")\n",
383383
"image = output.images[0]\n",
384-
"image # 画像を表示"
384+
"image # 画像を表示"
385385
]
386386
},
387387
{
@@ -426,7 +426,7 @@
426426
" prompt=text, generator=torch.manual_seed(seed)\n",
427427
")\n",
428428
"image = output.images[0]\n",
429-
"image # 画像を表示"
429+
"image # 画像を表示"
430430
]
431431
},
432432
{
@@ -533,7 +533,7 @@
533533
"generator = torch.manual_seed(seed)\n",
534534
"output = pipe(prompt=text, generator=generator)\n",
535535
"image = output.images[0]\n",
536-
"image # 画像を表示"
536+
"image # 画像を表示"
537537
]
538538
},
539539
{
@@ -577,7 +577,7 @@
577577
" prompt=text, generator=torch.manual_seed(seed)\n",
578578
")\n",
579579
"image = output.images[0]\n",
580-
"image # 画像を表示"
580+
"image # 画像を表示"
581581
]
582582
},
583583
{
@@ -621,7 +621,7 @@
621621
" prompt=text, generator=torch.manual_seed(seed)\n",
622622
")\n",
623623
"image = output.images[0]\n",
624-
"image # 画像を表示"
624+
"image # 画像を表示"
625625
]
626626
},
627627
{
@@ -665,7 +665,7 @@
665665
" prompt=text, generator=torch.manual_seed(seed)\n",
666666
")\n",
667667
"image = output.images[0]\n",
668-
"image # 画像を表示"
668+
"image # 画像を表示"
669669
]
670670
},
671671
{

notebooks/2-2_pytorch.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
" test_loss /= num_batches\n",
393393
" correct /= size\n",
394394
" print(\n",
395-
" f\"Test Error: \\n Accuracy: {(100*correct):>0.1f}%, \"\n",
395+
" f\"Test Error: \\n Accuracy: {(100 * correct):>0.1f}%, \"\n",
396396
" f\"Avg loss: {test_loss:>8f} \\n\"\n",
397397
" )"
398398
]
@@ -498,7 +498,7 @@
498498
"epochs = 5\n",
499499
"\n",
500500
"for t in range(epochs):\n",
501-
" print(f\"Epoch {t+1}\\n-------------------------------\")\n",
501+
" print(f\"Epoch {t + 1}\\n-------------------------------\")\n",
502502
" train(train_dataloader, model, loss_fn, optimizer)\n",
503503
" test(test_dataloader, model, loss_fn)\n",
504504
"print(\"Done!\")"

notebooks/3-2-2_ddim.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
}
6363
],
6464
"source": [
65-
"\n",
6665
"from py_img_gen.trainers import TrainDDPMConfig\n",
6766
"\n",
6867
"train_config = TrainDDPMConfig(\n",

notebooks/4-3_stable-diffusion_components.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,7 @@
414414
" # Classifier-free guidance を適用します\n",
415415
" # - 計算されたノイズ残差に対して、無条件/条件付き埋め込みに分割\n",
416416
" # - 分割されたそれぞれを用いて classifier-free guidance を計算\n",
417-
" noise_pred_uncond, noise_pred_text = noise_pred.chunk(\n",
418-
" 2\n",
419-
" )\n",
417+
" noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)\n",
420418
" noise_pred = noise_pred_uncond + guidance_scale * (\n",
421419
" noise_pred_text - noise_pred_uncond\n",
422420
" )\n",

notebooks/5-1-2_dreambooth.ipynb

Lines changed: 1142 additions & 1143 deletions
Large diffs are not rendered by default.

notebooks/5-3-1_prompt-to-prompt.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"outputs": [],
1717
"source": [
1818
"import warnings\n",
19+
"\n",
1920
"import torch\n",
2021
"\n",
2122
"device = torch.device(\n",

0 commit comments

Comments
 (0)