HuggingFace Diffusers 0.11 : リリースノート – Karlo UnCLIP, SafeTensors, コミュニティパイプライン (翻訳/解説)
翻訳 : (株)クラスキャット セールスインフォメーション
作成日時 : 02/03/2023 (v0.11.0 – 12/20/2022)
* 本ページは、HuggingFace Diffusers の以下のドキュメントを翻訳した上で適宜、補足説明したものです:
* サンプルコードの動作確認はしておりますが、必要な場合には適宜、追加改変しています。
* ご自由にリンクを張って頂いてかまいませんが、sales-info@classcat.com までご一報いただけると嬉しいです。
- 人工知能研究開発支援
- 人工知能研修サービス(経営者層向けオンサイト研修)
- テクニカルコンサルティングサービス
- 実証実験(プロトタイプ構築)
- アプリケーションへの実装
- 人工知能研修サービス
- PoC(概念実証)を失敗させないための支援
- お住まいの地域に関係なく Web ブラウザからご参加頂けます。事前登録 が必要ですのでご注意ください。
◆ お問合せ : 本件に関するお問い合わせ先は下記までお願いいたします。
- 株式会社クラスキャット セールス・マーケティング本部 セールス・インフォメーション
- sales-info@classcat.com ; Web: www.classcat.com ; ClassCatJP
HuggingFace Diffusers 0.11 : リリースノート – Karlo UnCLIP, SafeTensors, コミュニティパイプライン
🪄 Karlo UnCLIP by Kakao Brain
Karlo は OpenAI の unCLIP アーキテクチャに基づくテキスト条件付き画像生成モデルで、64x から 256px への標準的な超解像度モデルを超える改良を持ち、少数のノイズ除去ステップで高周波のディテールをリカバーします。
この Karlo のアルファ版は COYO-100M 高品質サブセット, CC3M, と CC12M を含む 115M の画像-テキストペアで訓練されています。
アーキテクチャの詳細は、レポジトリ: https://github.com/kakaobrain/karlo をご覧ください。
pip install diffusers transformers safetensors accelerate
import torch
from diffusers import UnCLIPPipeline
pipe = UnCLIPPipeline.from_pretrained("kakaobrain/karlo-v1-alpha", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "a high-resolution photograph of a big red frog on a green leaf."
image = pipe(prompt).images[0]
コミュニティ・パイプラインのバージョン管理 (versioning)
diffusers/examples/community にホストされているコミュニティ・パイプラインはライブラリのインストールされたバージョンに従うようになります。
E.g. if you have diffusers==0.9.0 installed, the pipelines from the v0.9.0 branch will be used: https://github.com/huggingface/diffusers/tree/v0.9.0/examples/community
diffusers をソースからインストールした場合には e.g. with pip install git+https://github.com/huggingface/diffusers、パイプラインの最新版が main ブランチから取得されます。
To change the custom pipeline version, set the custom_revision variable like so:
pipeline = DiffusionPipeline.from_pretrained(
"google/ddpm-cifar10-32", custom_pipeline="one_step_unet", custom_revision="0.10.2"
)
🦺 safetensors
最も重要なチェックポイントの多くは https://github.com/huggingface/safetensors を利用可能にしています。Upon installing safetensors with:
pip install safetensors
モデルをロードするとき素敵なスピードアップを見るでしょう 🚀
最も重要なチェックポイントの幾つかは safetensor 重みを追加しました :
- https://huggingface.co/stabilityai/stable-diffusion-2
- https://huggingface.co/stabilityai/stable-diffusion-2-1
- https://huggingface.co/stabilityai/stable-diffusion-2-depth
- https://huggingface.co/stabilityai/stable-diffusion-2-inpainting
Batched generation バグ修正 🐛
- Make sure all pipelines can run with batched input by @patrickvonplaten in #1669
We fixed a lot of bugs for batched generation. All pipelines should now correctly process batches of prompts and images 🤗
Also we made it much easier to tweak images with reproducible seeds:
https://huggingface.co/docs/diffusers/using-diffusers/reusing_seeds
以上