stable-diffusion-3.5-medium也迎来了自己的Turbo版

在这里插入图片描述
“All that has passed is but a prologue,
what you hold in your heart will one day echo back.” — TensorArt

TensorArt Stable Diffusion 3.5 Medium Turbo(SD3.5M Turbo)是从 StabilityAI 的 stable-diffusion-3.5-medium 中提炼出来的高性能文本到图像模型。 该模型强调稳定性和效率,适用于各种艺术风格和创意表达场景。

型号特点

  • 🚀 涡轮增压性能: 生成速度更快,是多任务和高需求场景的理想选择。
  • 🎨 风格多样:支持从逼真到抽象艺术等多种风格。
  • 🖼️ 高分辨率输出:生成的图像清晰度极高,细节非常复杂。
  • ⚙️ 易于扩展:与 LoRA 技术集成,使用户更容易定制和试验。

代码

ckpt

import torch
from diffusers import StableDiffusion3Pipeline

pipe = StableDiffusion3Pipeline.from_pretrained("tensorart/stable-diffusion-3.5-medium-turbo", torch_dtype=torch.float16,)
                                                
pipe = pipe.to("cuda")


image = pipe(
   "A beautiful bald girl with silver and white futuristic metal face jewelry, her full body made of intricately carved liquid glass in the style of Tadashi, the complexity master of cyberpunk, in the style of James Jean and Peter Mohrbacher. This concept design is trending on Artstation, with sharp focus, studio-quality photography, and highly detailed, intricate details.",
   num_inference_steps=8,
   guidance_scale=1.5,
   height=1024,
   width=768 
).images[0]

image.save("./test4-2.webp")

lora

import torch
from diffusers import StableDiffusion3Pipeline
import numpy as np
from safetensors.torch import load_file
from huggingface_hub import hf_hub_download

repo = "tensorart/stable-diffusion-3.5-medium-turbo"
ckpt = "lora_sd3.5m_turbo_8steps.safetensors"

pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.float16,)
                                                
pipe = pipe.to("cuda")

pipe.load_lora_weights(hf_hub_download(repo, ckpt))
pipe.fuse_lora()


pipe = pipe.to("cuda")

image = pipe(
   "A beautiful bald girl with silver and white futuristic metal face jewelry, her full body made of intricately carved liquid glass in the style of Tadashi, the complexity master of cyberpunk, in the style of James Jean and Peter Mohrbacher. This concept design is trending on Artstation, with sharp focus, studio-quality photography, and highly detailed, intricate details.",
   num_inference_steps=8,
   guidance_scale=1.5,
   height=1024,
   width=768 
).images[0]
image.save("./test1.webp")

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值