stable- diffusion新版本V2效果有提升吗?

news2024/11/17 21:19:20

之前版本是最初版本,不是V2,那么这里就新版本V2进行系列试验,如下,附代码及link

1、text2img

from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler

model_id = "stabilityai/stable-diffusion-2-1"

# Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda")
pipe.enable_attention_slicing()#不加GPU显存爆了
prompt = "a photo of an astronaut riding a horse"
# prompt = "a photo of a beautiful girl riding a horse"
# n_prompt= "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, cartoon, ugly, deformed"
image = pipe(prompt,negative_prompt=n_propmt).images[0]
    
image.save("astronaut_rides_horse.png")

我勒个去,这脸型是美女???也是服气了[第一个图没加负向提示词,第二个加了]

再次升级,参考别人的提示词,正向词改为如下:

prompt = "white hair, middle eyes, masterpiece, best quality, anime style, teenage girl, one girl, young girl, one face, witch, wearing hat, detailed hat, astrologer, detailed full dress, thin long legs, detailed black stockings, elegance, middle chested, middle breast, one body, middle neck, full body portrait, front portrait, eyes with light, sharp chin, beautiful detailed eyes, cinematic light, two eyes, light and shadow, high quality background, garden background, detailed garden, noon sunlight, detailed shadow, symmetrical eyes, detailed clavicle"

 可还行啊,似乎,看起来,再次执行。

 好牛逼吧,能不能生成真人啊啊,卧槽,这些看个啥啊

2、image2image

from diffusers import DiffusionPipeline
import torch
from PIL import Image

pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1-unclip-small", torch_dtype=torch.float16)
pipe.to("cuda")
pipe.enable_attention_slicing()

# get image
init_image = Image.open("seg1.jpeg")
prompt="beautiful eyes, long legs, white face, black hair,beautiful detailed sky"
n_propmt="lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry,bad, cartoon, ugly, deformed"

image = pipe(prompt=prompt,image=init_image, negative_prompt=n_propmt).images[0]
image.save("seg1_v2.png")

只要正向提示词描述的不够,那么图片就是差距的,不可用的。如下

 

 3、正常测试:测试次数有限次,超出要购买,实在想要这种图就多换几个账号薅羊毛。

下面关键词参考Novel AI 作品存档(附关键词) - 知乎

有官方链接测试,无需自己部署服务了。直接填写提示词即可,当然有些词可能not safe for work

Prompt

china dress, long black hair, highly detailed dress, holding small umbrella, Ancient palace background, 1 girl, best quality, long shot,beautifully painted, highly detailed,middle breast, anime style

Negative prompt

multiple breasts, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, single color, ugly, duplicate, long neck, more than one people, more than one light, more than one head, more than one face

 结果相当不错,但都是二次元,我想要现代的人,原图下载链接

 

 4、hugging face测试

其他关键词测试:关键词如下:负向关键词同上

china dress, long black hair, highly detailed dress, holding small umbrella, Ancient palace background, 1 girl, ((best quality)), long shot, middle breast, anime style, beautifully painted, highly detailed, turn around and look at the camera, sword in left hand

无限次测试页面,当然速度慢,而且效果差,我有充分理由怀疑根本就不是一个模型,上面的图用的模型肯定是商用模型。下面无限次测试页面图,效果也太👎了吧。

 

((masterpiece)), china dress, long black hair, highly detailed dress, holding small umbrella, Ancient palace background, 1 girl, ((best quality)), long shot, middle breast, anime style, beautifully painted, highly detailed, turn around and look at the camera

 ((masterpiece)), china dress, long black hair, highly detailed dress, 1 girl, solo, ((best quality)), long shot, middle breast, beautifully painted, highly detailed, look at the camera, walk in alley, ((colorful))

 

 stable-diffusion真小气,放出来一个粗糙的模型,又另外搞商业化的模型,。。

((masterpiece)), china clothes, harem outfit, long black hair, highly detailed dress, 1 girl, ((solo)), ((best quality)), long shot, small breast, beautifully painted, highly detailed, look at the camera, ancient palace background, beautifully painted, highly detailed

((masterpiece)), china clothes, harem outfit, long black hair, highly detailed dress, 1 girl, ((solo)), ((best quality)), long shot, small breast, highly detailed, look at the camera, ancient palace background, beautifully painted, stand with hands

 blue eyes, white hair,masterpiece, best quality, teenage girl, one girl, one face, cold face, wearing suit, bunny girl, middle breast, one body, middle neck, full portrait, front portrait, beautiful detailed eyes, cinematic light, two eyes, one light, detailed shadow, symmetrical eyes, ((ahoge)), blank eyes, gradient color, western artstyle, wide shot, ((parted bangs hair)), middle hair, wearing leather shoes, sexy, delicate black stockings, wearing high heels

 woc,这是权利的游戏中的僵死人?

blue eyes, white hair,masterpiece, best quality, teenage girl, one girl, one face, bunny girl, middle breast, one body, middle neck, full portrait, front portrait, beautiful detailed eyes, cinematic light, two eyes, one light, detailed shadow, symmetrical eyes, ((ahoge)), blank eyes, gradient color, western artstyle, wide shot, ((parted bangs hair)), middle hair, wearing leather shoes, sexy, delicate black stockings, wearing high heels

 red eyes, yellow hair, masterpiece, best quality, teenage girl, one girl, one face, bunny girl, middle breast, one body, middle neck, full portrait, front portrait, beautiful detailed eyes, cinematic light, two eyes, one light, detailed shadow, symmetrical eyes, ((ahoge)), blank eyes, gradient color, western artstyle, wide shot, ((parted bangs hair)), middle hair, wearing leather shoes, sexy, delicate black stockings, wearing high heels, masochism

red eyes, yellow hair, masterpiece, best quality, teenage girl, one girl, one face, bunny girl, middle breast, one body, middle neck, full portrait, front portrait, beautiful detailed eyes, cinematic light, two eyes, one light, detailed shadow, symmetrical eyes, blank eyes, gradient color, western artstyle, wide shot, ((parted bangs hair)), middle hair, wearing leather shoes, sexy, delicate black stockings, wearing high heels, masochism, rabbit ear headwear, seat on table

 

 下面更改负向关键词,

正向词:

white hair, middle eyes, masterpiece, best quality, anime style, teenage girl, one girl,  one face, witch, wearing hat, detailed hat, astrologer, detailed full dress, thin long legs, detailed black stockings, elegance, middle chested, middle breast, one body, middle neck, full body portrait, front portrait, eyes with light, sharp chin, beautiful detailed eyes, cinematic light, two eyes, light and shadow, high quality background, garden background, detailed garden, noon sunlight, detailed shadow, symmetrical eyes, detailed clavicle

负向词: multiple breasts, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, single color, ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), (((tranny))), (((trans))), (((trannsexual))), (hermaphrodite), (out of frame), extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), (((disfigured))), out of frame, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands,(fused fingers), (too many fingers), (((long neck))), more than one people, more than one light, more than one head, more than one face, more than one body

 完美再现二次元,欢迎来到二次元的世界。

再次更改负向词,

正向提示词:long hair, black hair, text high details, masterpiece, best quality, 1 teenage girl, young lady, full dress, black and white clothes, black gloves, elegance, black and white skirt, flat-chested, small breasts, eyes glittering with light, black eyes, sharp chin, scattered hair, beautiful detailed eyes, beautiful detailed sky, detailed balcony, cinematic lighting, black eyes, sunlight, light and shadow, face to camera, mignificant building

负向提示词:

lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, single color

 long hair, black hair, text high details, masterpiece, best quality, 1 teenage girl, young lady, full dress, black and white clothes, elegance, black and white skirt, flat-chested, small breasts, eyes glittering with light, black eyes, sharp chin, scattered hair, beautiful detailed eyes, beautiful detailed sky, detailed balcony, cinematic lighting, black eyes, sunlight, light and shadow, face to camera, mignificant building

 long hair, black hair, text high details, masterpiece, best quality, 1 teenage girl, young lady, full dress, black and white clothes, elegance, black and white skirt, flat-chested, small breasts, eyes glittering with light, black eyes, sharp chin, beautiful detailed eyes, beautiful detailed sky, detailed balcony, cinematic lighting, black eyes, sunlight, light and shadow, face to camera, mignificant building, adorable

再次更改负向词,

正向:long hair, black hair, text high details, masterpiece, best quality, 1 teenage girl, young lady, full dress, light color clothes, elegance, light colorskirt, flat-chested, small breasts, eyes glittering with light, red eyes, sharp chin, beautiful detailed eyes, detailed sky, detailed balcony, cinematic lighting, black eyes, sunlight, light and shadow, face to camera, summer, cute, smile

负向词:lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, single color

 

long hair, black hair, text high details, masterpiece, best quality, 1 teenage girl, young lady, full dress, light color clothes, elegance, light colorskirt, flat-chested, small breasts, eyes glittering with light, red eyes, sharp chin, beautiful detailed eyes, detailed sky, detailed balcony, cinematic lighting, black eyes, sunlight, light and shadow, face to camera, summer weather, cute, smile face

 

 5、image2image

写上上面类似的提示词,或者相同的词,结果仍旧是不太理想,感觉没有C站的好看。

如下:

from diffusers import DiffusionPipeline
from diffusers.utils import load_image
import torch
from PIL import Image

pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1-unclip-small", torch_dtype=torch.float16)
pipe.to("cuda")
pipe.enable_attention_slicing()

init_image = Image.open("../1.jpeg")
prompt="long legs, white face, black hair,beautiful detailed sky,small breasts, eyes glittering with light, black eyes, sharp chin, scattered hair, beautiful detailed eyes, beautiful detailed sky, detailed balcony, cinematic lighting, black eyes, sunlight, light and shadow, face to camera, mignificant building"
n_propmt="lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry,bad, cartoon, ugly, deformed"
prompt2="middle eyes, masterpiece, best quality, anime style, teenage, one face, thin long legs, elegance, one body, middle neck, full body portrait, front portrait, eyes with light, sharp chin, beautiful detailed eyes, cinematic light, two eyes, light and shadow, high quality background, garden background, detailed garden, noon sunlight, detailed shadow, symmetrical eyes, detailed clavicle"
n_prompt2="multiple breasts, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, single color, ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), (((tranny))), (((trans))), (((trannsexual))), (hermaphrodite), (out of frame), extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), (((disfigured))), out of frame, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands,(fused fingers), (too many fingers), (((long neck))), more than one people, more than one light, more than one head, more than one face, more than one body"
image = pipe(prompt=prompt2,image=init_image, negative_prompt=n_prompt2).images[0]

 拜拜

 参考博文:stable-diffusion真的好用吗?_小李飞刀李寻欢的博客-CSDN博客

参考知乎:stable-diffusion真的好用吗?V2版本 - 知乎

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/445021.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

在android项目上集成libyuv库以及使用libyuv库完成camera的缩放,旋转,翻转,裁剪操作

目录 一、下拉google官方的libyuv库代码 二、在android项目中集成libyuv库 1.环境配置 2.拷贝libyuv源码文件 ​编辑3.配置cmake libyuv相关的链接编译等 三、使用libyuv库 1.libyuv库完成camera的旋转 2.libyuv库实现翻转 3.libyuv库实现缩放 4.libyuv库实现裁剪 一…

九龙证券|多巨头竞相布局这个热门赛道,机构一致看好的概念股

华为高阶智能驾驭体系ADS 2.0版本发布。 早前,华为在2023华为智能轿车解决方案发布会上,发布了高阶智能驾驭体系 ADS 2.0。新体系将由 AITO 问界 M5 高阶智能驾驭版首发,并已适配阿维塔 11 全系列以及极狐阿尔法 S 全新 Hi 版等车型。 最近&…

JDBC(java数据库连接)—MySQL

文章目录 1.定义2.优势3.环境准备4.使用jdbc(java程序操作数据库)5.使用jdbc的操作步骤 1.定义 jdbc是一种用于执行SQL语句的java api,它是java中的数据库连接规范,为java开发人员操作数据库提供了一个标准的api,可以…

【Linux】系统文件接口

目录 一、C文件接口 1、fopen 2、fprintf 3、snprintf 二、系统文件IO 1、open 2、write 3、read 4、C文件接口与系统文件IO的关系 一、C文件接口 1、fopen FILE *fopen(const char *path, const char *mode); fopen 函数返回值类型为 FILE 。参数列表中&#xff0c…

优加DaaS背后,看见新的营销潮

DaaS、融合开放,这是京东云优加对外传递出来的两个最清晰的声音。前者对应的是能力和边界,后者对应的是态度和打法。两者结合,恰构成了京东云优加,或者说京东在营销侧的未来想象力。 作者|皮爷 出品|产业家 “今年我们有接近60%以…

第五章 工厂模式

文章目录 一、简单工厂模式1、传统方式实现披萨订购( 可以忽略)披萨父类 Pizza子类胡椒披萨 PepperPizza子类印度披萨 GreekPizza订购披萨 OrderPizza订购披萨的 客户端 PizzaStore运行结果传统的方式的优缺点,新增子类需要修改的地方牵扯太多传统方式的究极耦合 2、…

YOLOv8 更换骨干网络之 MobileNetV3

论文地址:https://arxiv.org/abs/1905.02244 代码地址:https://github.com/xiaolai-sqlai/mobilenetv3 我们展示了基于互补搜索技术和新颖架构设计相结合的下一代 MobileNets。MobileNetV3通过结合硬件感知网络架构搜索(NAS)和 NetAdapt算法对移动设计如何协同工作,利用互…

BswM模块之Ecu State Handling

文章目录 前言一、ESH是什么?二、基于BswM管理的ECU状态切换流程1.ECU启动2.ECU关闭 总结 前言 BswM – 基础软件模式管理模块, 它的职责是基于简单规则的BSW模块仲裁来自应用层sw - c或其他模块的模式请求,并根据仲裁结果进行相应的操作。 …

QT QPainter 绘制基本图形元件简介

1.基本图形元件 QPainter 提供了很多绘制基本图形的功能,包括点、直线、椭圆、矩形、曲线等,由这些基本的图形可以构成复杂的图形。QPainter 中提供的绘制基本图元的函数如下表所示。每个函数基本上都有多种参数形式,这里只列出函数名&#x…

Elastic Common Schema 和 OpenTelemetry — 无需供应商锁定即可获得更好的可观察性和安全性的途径

作者:Elastic 可观察性和安全团队 在 KubeCon Europe 上,宣布 Elastic Common Schema (ECS) 已被 OpenTelemetry (OTel) 接受作为对该项目的贡献。 目标是将 ECS 和 OpenTelemetry 的语义约定 (SemConv) 融合到一个由 OpenTelemetry 维护的开放模式中。 …

LearnOpenGL-模型加载

1.配置Assimp库。 下载Assimp,解压后得到 assimp-master 文件。在文件中新建一个 build 文件。使用 Cmake 生成工程文件保存在 build 中,从这里下载CMake,下载最新的即可。 打开CMake,选择需要源文件目录和目标目录。修改成适配…

机器学习平台、自研DPU、资源并池,火山引擎发布多云、AI基础设施与增长法宝

1、每十家大模型企业,七家在火山引擎云上。 2、火山引擎大模型训练云平台,支持万卡训练,集群性能提升3倍 3、火山引擎新一代自研DPU,实现计算、存储、网络的全组件卸载,释放更多资源给业务负载。 4、火山引擎与字节国内…

数据库管理软件dbeaver-ce 下载安装并离线配置

文章目录 前言数据库管理软件dbeaver-ce 下载安装并离线配置1. 概述2. 下载3. 安装4. 离线配置驱动jar包5. 链接mysql 前言 如果您觉得有用的话,记得给博主点个赞,评论,收藏一键三连啊,写作不易啊^ _ ^。   而且听说点赞的人每天…

谷歌aab包手机怎么安装教程

一、概述 bundletool是一种底层工具,可供 Android Studio、Android Gradle 插件和 Google Play 用于构建 Android App Bundle 文件并将 app bundle 转换为部署到设备的各种 APK。您也可以将 bundletool作为一种命令行工具,用于自行构建 app bundle 和重新…

【笔试强训编程题】Day2.(排序子序列 100448)和(倒置字符串 69389)

文章目录 前言 一、排序子序列 100448 题目描述 代码实现 二、倒置字符串 69389 题目描述 代码实现 总结 前言 今天让我们来练习两道经典的编程题!!!! 一、排序子序列 100448 题目描述:牛牛定义排序子序列为…

平台资金提现解决方案之实现支付宝单笔转账到银行卡功能

大家好,我是小悟 使用场景 不管是做APP、电脑网站、手机网站还是小程序,为了推广基本上都离不开用户分佣的场景。 换句话说就是在其平台内为每个用户设置“电子钱包”功能,而电子钱包在平台那里只是一串数字,这就需要平台为用户…

详解 ES6中 Promise 构造函数的使用

文章目录 前言什么是 Promise?Promise 的几种状态拆分细解 PromisePromise all()方法then()方法 返回一个新的 Promise 时的状态由什么决定?总结 前言 Promise 是ES6 新增的一个异步调用解决方案,它的出现是为了解决异…

Elasticsearch的调优思路

环境:centos7、elasticsearch-5.6.4 1、性能调优 1.1、Linux参数调优 1.1.1、关闭交换分区 目的是防止内存置换降低性能,将 /etc/fstab 文件中包含 swap 的行注释掉。 #执行命令:注释相关 swap的行 sed -i /swap/s/^/#/ /etc/fstab#将 /etc/f…

彻底弄清FreeRTOS中的事件组(Event Groups)

​之前已经学过两个任务之间可以利用信号量、队列来通信,任务可以利用这两个机制等待某一个事件发生,但是假如需要等待多个事件发生呢?这就需要用到事件组了。 事件组可以让任务进入阻塞态,等待一个或多个事件的组合发生。当事件…

根据 cadence 设计图学习硬件知识 day02 了解飞腾 X100芯片

1. 飞腾芯片 X100的介绍 飞腾套片X100是一款微处理器的配套芯片,主要功能包括图形图像处理和接口扩展两类。在图形图像处理方面,集成了图形处理加速GPU、视频解码VPU、显示控制接口DisplayPort以及显存控制器;在接口扩展方面,支持…