警告
当記事にはAIによって生成された画像が多数掲載されています。
Stable Diffusionの拡張機能『Ultimate SD Upscale』の使い方!画像を高解像度化しよう | Romptn Magazine
ほぼこの内容
Ultimate SD Upscale 導入
Extensions タブで下記URLを導入する
GitHub – Coyote-A/ultimate-upscale-for-automatic1111
アップスケールを行う
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/00002-2661141453.png)
私(※アバターである「柊 雷夜」) っぽいやつを使う
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/2023-11-24-3-1024x816.png)
10倍ズームでこんな感じ
アップスケールをして同じぐらいのズームをしてみる
アップスケール1
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/00004-2276040167-763x1024.png)
Steps: 20,
Sampler: DPM++ 2M Karras,
CFG scale: 7,
Seed: 2276040167,
Size: 888x1192,
Model hash: 6ce0161689,
Model: v1-5-pruned-emaonly,
Denoising strength: 0.15,
Ultimate SD upscale upscaler: R-ESRGAN 4x+ Anime6B,
Ultimate SD upscale tile_width: 512,
Ultimate SD upscale tile_height: 512,
Ultimate SD upscale mask_blur: 8,
Ultimate SD upscale padding: 32,
Version: 1.6.0
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/2023-11-24-4-1024x803.png)
単純にズームするより綺麗に出ている
アップスケール2
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/00005-689997910-763x1024.png)
Steps: 40,
Sampler: DPM++ 2M SDE Karras,
CFG scale: 7,
Seed: 689997910,
Size: 888x1192,
Model hash: 6ce0161689,
Model: v1-5-pruned-emaonly,
Denoising strength: 0.15,
Ultimate SD upscale upscaler: R-ESRGAN 4x+ Anime6B,
Ultimate SD upscale tile_width: 512,
Ultimate SD upscale tile_height: 512,
Ultimate SD upscale mask_blur: 8,
Ultimate SD upscale padding: 32,
Version: 1.6.0
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/2023-11-24-5-1024x778.png)
パラメータやシードが変わると、また違ったアップスケールが行われる
微調整をして好みのパラメータを見つけると良い
実験:極端に低い解像度のものをアップスケールしようとすると?
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/00002-2661141453-コピー.png)
めっちゃ小さくしたものを、先の「アップスケール2」のパラメータ(シード値はランダム) でアップスケールしてみる
ただし、一気に解像度をあげようとすると「ValueError: height and width must be > 0」が出たので、
「456×608」と適当に一度中継を使っている
![画像に alt 属性が指定されていません。ファイル名: 00008-4122295034-763x1024.png](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/image.png)
流石に元の情報が失われすぎており、戻っては来れない
これを基に新たな画像を起こすことは可能だと思う
![](https://extrose.stoicsounds.jp/blog/wp-content/uploads/2023/11/00004-1859281078.png)
7th anime v3 B と、基のプロンプトをアレンジしたものを組み合わせてのimg2img
Ultimate SD Upscale の注意点
部分的に描画するので、大きなサイズを出力できる
が、プロンプトは画像全体ではなく、部分ごとにかかってしまう様子
つまり、顔が色んなところに現れたりする
ノートPCで出力させると小さなサイズでしか出せない
これでなんとか解像度よく出せるか