文生图基础模型集合

我要开发同款
匿名用户2024年07月31日
47阅读
所属分类aiPytorch
开源地址https://modelscope.cn/models/YslLin/StableDiffusionCheckPoint
授权协议Apache License 2.0

作品详情

主要是将 Stable Diffusion 的 CHECKPOINT.safetensors 文件解析保存,提高基础模型加载速度

您可以通过如下git clone命令,或者ModelScope SDK来下载模型

Git下载

#Git模型下载
git clone https://www.modelscope.cn/YslLin/StableDiffusionCheckPoint.git

林鹤-人像光影摄影极限写实真实感大模型_v2.6.1

linhe-pipeline 模型使用

# 1. 下载文件
base_model_path = snapshot_download('YslLin/StableDiffusionCheckPoint', revision='v1.0.1')
# 2. 加载模型
pipe = StableDiffusionPipeline.from_pretrained(os.path.join(base_model_path, "linhe-pipeline"), safety_checker=None, torch_dtype=torch.float32)
# 3. 推理文生图
init_image = pipe(prompt='1girl',
                  negative_prompt='ng_deepnegative_v1_75t,lowres,bad anatomy,bad hands',
                  num_inference_steps=20, guidance_scale=7, num_images_per_prompt=1,).images[0]
# 4. 显示图片
init_image.show()

AWPortrait_v1.4

awportrait-pipeline 模型使用

# 注意:更换版本号与子路径!!
# 1. 下载文件
base_model_path = snapshot_download('YslLin/StableDiffusionCheckPoint', revision='v1.0.2')
# 2. 加载模型
pipe = StableDiffusionPipeline.from_pretrained(os.path.join(base_model_path, "awportrait-pipeline"), safety_checker=None, torch_dtype=torch.float32)
# 3. 推理文生图
init_image = pipe(prompt='1girl',
                  negative_prompt='ng_deepnegative_v1_75t,lowres,bad anatomy,bad hands',
                  num_inference_steps=20, guidance_scale=7, num_images_per_prompt=1,).images[0]
# 4. 显示图片
init_image.show()

IdolTraineeJuicyBoyYear_1.0

idoltrainee-pipeline 模型使用

# 注意:更换版本号与子路径!!
# 1. 下载文件
base_model_path = snapshot_download('YslLin/StableDiffusionCheckPoint', revision='v1.0.3')
# 2. 加载模型
pipe = StableDiffusionPipeline.from_pretrained(os.path.join(base_model_path, "idoltrainee-pipeline"), safety_checker=None, torch_dtype=torch.float32)
# 3. 推理文生图
init_image = pipe(prompt='1boy',
                  negative_prompt='EasyNegative,ng_deepnegative_v1_75t,lowres,bad anatomy,bad hands',
                  num_inference_steps=20, guidance_scale=7, num_images_per_prompt=1,).images[0]
# 4. 显示图片
init_image.show()

TAILANG XL TurboLcm(mini)mix_v3

tailangsdxlturbo-pipeline 模型使用

# 这是SDXL版本的turbo,少量步数才有好效果。
# 注意:更换版本号与子路径!!
# 1. 下载文件
base_model_path = snapshot_download('YslLin/StableDiffusionCheckPoint', revision='v1.0.3')
# 2. 加载模型
pipe = StableDiffusionPipeline.from_pretrained(os.path.join(base_model_path, "tailang_sdxl_turbo-pipeline"), safety_checker=None, torch_dtype=torch.float32)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
# 3. 推理文生图
init_image = pipe(prompt='1boy',
                  negative_prompt='cartoon,painting,illustration,(worst quality, low quality, normal quality:2),(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch),tooth,open mouth,bad hand,bad fingers,',
                  num_inference_steps=8, guidance_scale=2.5, num_images_per_prompt=1,).images[0]
# 4. 显示图片
init_image.show()
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论