0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ROCm で Stable DreamBooth 動きます(現状解像度に制約あり)

Last updated at Posted at 2022-10-10

ふえぇ... DreamBooth 極めたいよぉ...

環境

  • ROCm 5.3(Docker)
  • Ubuntu 20.04
  • RX6800 (16GB)

ROCm で Stable Diffusion 動きます
https://qiita.com/syoyo/items/5d361ef5ff95d8ca70ee

あたり参考にして ROCm 環境整えます.

方法

オフィシャル? は huggigngface diffusers にありますが, これでは 16GB 版つかっても RX6800(16GB) では GPU メモリ不足になります.

を参考に

を使います.

  • fp16 on
  • use_8bit_adam off
  • gradient_checkpointing on
  • 解像度は 384

あたりで学習できます!
class images の生成に 1 時間くらいかかります.
また, class images 生成のパスでは解像度 512 でもメモリ不足はおきずらいようです. その後の最終処理(?)でメモリ不足エラーがおきやすいです. class images 生成まで 512x512 というのもできるかもはしれません.

制約

bitsandbytes(8bit)は動かないため, 解像度を下げて対応します.
384x384 行けました.
408x408 もいけるかもはしれません.

結果

huggingface のオフィシャル?のワンちゃんデータセットを instance-images に使います.

Screenshot from 2022-10-10 17-53-22.png

Mars と Moon にバケツで降り立つワンちゃんを生成します!

Screenshot from 2022-10-10 18-17-06.png

Screenshot from 2022-10-10 18-17-25.png

Voila! ちょっとワンちゃんの顔つきが違うきもするが... とりあえずヨシ!

その他

参考までに,

こちらもメモリ不足で動きませんでした.

DreamBooth, DreamFusion を GPU メモリ 16 GB or 24 GB で動かしたいメモ
https://qiita.com/syoyo/items/8fc5906db4730a2651c9

TODO

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?