@@ -278,38 +278,6 @@ layout: center
278
278
279
279
# どのように画像生成が行われているのか?
280
280
281
- ---
282
- level: 2
283
- layout: image-right
284
- image: /exps/p-sd2-sample-43.webp
285
- ---
286
-
287
- # [ <mdi-github-circle />PareDiffusers] ( https://github.com/masaishi/parediffusers )
288
- ## <!-- TODO: Find better way, currently for avoide below becomes subtitle -->
289
-
290
- [ ![ Open In Colab] ( https://colab.research.google.com/assets/colab-badge.svg )] ( https://colab.research.google.com/drive/1I-qU3hfF19T42ksIh5FC0ReyKZ2hsJvx?usp=sharing )
291
-
292
- Install the PareDiffusers library:
293
- ``` python
294
- ! pip install parediffusers
295
- ```
296
-
297
- Generate an image from text:
298
- ``` python {11}{lines:true}
299
- import torch
300
- from parediffusers import PareDiffusionPipeline
301
-
302
- pipe = PareDiffusionPipeline.from_pretrained(
303
- " stabilityai/stable-diffusion-2" ,
304
- device = torch.device(" cuda" ),
305
- dtype = torch.float16,
306
- )
307
- prompt = " painting depicting the sea, sunrise, ship, artstation, 4k, concept art"
308
-
309
- image = pipe(prompt, width = 512 , height = 512 )
310
- display(image)
311
- ```
312
-
313
281
---
314
282
level: 2
315
283
layout: center
@@ -421,6 +389,15 @@ Latent Diffusion Model (LDM)とは?
421
389
# <span v-mark.green =" 1 " >Latent Space (滞在空間)</span >で、
422
390
# DDPMを動かすモデル
423
391
392
+ ---
393
+ level: 2
394
+ layout: center
395
+ ---
396
+
397
+ Latent Space(滞在空間)とは?
398
+
399
+ # 入力画像の特徴を抽出した空間
400
+
424
401
---
425
402
level: 2
426
403
layout: center
@@ -564,19 +541,6 @@ Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Björn Ommer:
564
541
</p >
565
542
</div >
566
543
567
- ---
568
- level: 2
569
- layout: center
570
- ---
571
-
572
- Latent Space(滞在空間)とは?
573
-
574
- # 入力画像の特徴を抽出した空間
575
-
576
- <!--
577
- TODO: VAEを通した画像の平均をとった画像を用意する。
578
- -->
579
-
580
544
---
581
545
level: 2
582
546
layout: center
@@ -1352,11 +1316,11 @@ leftPercent: 0.4
1352
1316
1353
1317
- L112: VAEで画像にデコード
1354
1318
1355
- <img src =" /exps/vae_decode.webp " class =" mb-5 h-28 object-contain " />
1319
+ <img src =" /exps/vae_decode.webp " class =" mb-5 h-24 object-contain " />
1356
1320
1357
1321
- L113: 正規化して学習しているので、逆正規化する必要がある。
1358
1322
1359
- <img src =" /exps/vae_denormalize.webp " class =" mb-5 h-28 object-contain " />
1323
+ <img src =" /exps/vae_denormalize.webp " class =" mb-5 h-24 object-contain " />
1360
1324
1361
1325
- L114: テンソルからPIL.Imageに変換
1362
1326
0 commit comments