Edit model card

ACertaintyLatent Consistency Modelの手法で蒸留して4~8ステップほどで生成できるようにしました。性能はまだまだという感じです。

学習

rank=128(conv rank=32)のLoRAをバッチサイズ16で学習率5e-4で20000ステップ学習しました。公開したモデルはLoRAをマージ済みです。guidance_scaleは7.0固定で、学習対象になっていないのでguidance_scaleを変えても効果ありません。emaのrateは0.999です。学習中に無条件生成ではなくnegative_promptを使っています。

from diffusers import DiffusionPipeline
import torch

pipe = DiffusionPipeline.from_pretrained("furusu/LCM-Acertainty", custom_pipeline="latent_consistency_txt2img", custom_revision="main")
pipe.to(torch_device="cuda", torch_dtype=torch.float16)

prompt = "anime, masterpiece, best quality, 1girl, solo, blush, sitting, twintails, blonde hair, bowtie, school uniforme, nature"

num_inference_steps =4
images = pipe(prompt=prompt, num_inference_steps=num_inference_steps, guidance_scale=5.0, lcm_origin_steps=50, height=768, width=768, output_type="pil").images

images[0].save("./aaaaa.png")

image/png

Downloads last month
17
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.