🚀 Dreamshaper XL v2 Turbo
lykon/dreamshaper-xl-v2-turbo
は、stabilityai/stable-diffusion-xl-base-1.0 をファインチューニングしたStable Diffusionモデルです。画像生成において高い品質と柔軟性を備え、多様なアートスタイルやテーマの画像を生成することができます。
🚀 クイックスタート
このセクションでは、lykon/dreamshaper-xl-v2-turbo
モデルを使用してテキストから画像を生成する基本的な手順を説明します。
✨ 主な機能
- Stable Diffusionベース:Stable Diffusion技術を活用し、高品質な画像生成が可能です。
- ファインチューニング済み:特定のデータセットでファインチューニングされており、特定のスタイルやテーマに特化した画像生成が得意です。
- 多様なアートスタイル:アニメ、リアルなポートレート、アーティスティックなイラストなど、様々なアートスタイルの画像を生成できます。
📦 インストール
必要なライブラリをインストールするには、以下のコマンドを実行します。
pip install diffusers transformers accelerate
💻 使用例
基本的な使用法
from diffusers import AutoPipelineForText2Image, DPMSolverMultistepScheduler
import torch
pipe = AutoPipelineForText2Image.from_pretrained('lykon/dreamshaper-xl-v2-turbo', torch_dtype=torch.float16, variant="fp16")
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda")
prompt = "portrait photo of muscular bearded guy in a worn mech suit, light bokeh, intricate, steel metal, elegant, sharp focus, soft lighting, vibrant colors"
generator = torch.manual_seed(0)
image = pipe(prompt, num_inference_steps=6, guidance_scale=2).images[0]
image.save("./image.png")
高度な使用法
from diffusers import AutoPipelineForText2Image, EulerAncestralDiscreteScheduler
import torch
pipe = AutoPipelineForText2Image.from_pretrained('lykon/dreamshaper-xl-v2-turbo', torch_dtype=torch.float16, variant="fp16")
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda")
prompt = "A beautiful landscape with a waterfall and a rainbow, high resolution, sharp focus"
negative_prompt = "blurry, low quality"
generator = torch.manual_seed(42)
image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=10, guidance_scale=7).images[0]
image.save("./advanced_image.png")
📚 ドキュメント
🧨 Diffusersを使用してテキストから画像を生成する一般的な情報については、公式ドキュメントを参照してください。
📄 ライセンス
このモデルはOpenRAIL++ライセンスの下で提供されています。
💡 使用建议
このモデルを使用する際には、適切なプロンプトを設定することが重要です。プロンプトには、生成したい画像の詳細な説明を含めることで、より高品質な画像を得ることができます。また、GPUを使用することで、画像生成の速度を大幅に向上させることができます。
⚠️ 重要提示
このモデルの使用には、Hugging Faceの利用規約やライセンス条項に従う必要があります。また、生成した画像を商用目的で使用する場合は、適切な権利を取得する必要があります。