当前位置: 首页 > news >正文

企业如何推广网站中信建设招聘

企业如何推广网站,中信建设招聘,动画设计专业介绍,网络营销策划目标今天来点轻松的话题,带大家玩一个用文字生成图片的模型。相信大家如果关注AIGC领域,对文本生成图片,对Stablefiffusion、DEALL.E应该不陌生。今天给大家介绍的就是基于SD2 finetune出来的一个模型()这篇文章不会教大家…

今天来点轻松的话题,带大家玩一个用文字生成图片的模型。

相信大家如果关注AIGC领域,对文本生成图片,对Stablefiffusion、DEALL.E应该不陌生。今天给大家介绍的就是基于SD2 finetune出来的一个模型()

这篇文章不会教大家STABLEDiffusion的原理,也不会去介绍文本生成图的历史,甚至不会让大家知道CLIP。只会带大家想工程师一样用很少的代码批量的产出你想要的图片。为你的软文配图。

先来看几张效果

安装环境

pip install --upgrade diffusers accelerate transformers

开始文本生成图

from diffusers import StableDiffusionPipeline
import torchmodel_id = "dreamlike-art/dreamlike-photoreal-2.0"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")prompt = "3d render, an  soft and smooth appearance cute ant doll stands in the middle, full of sense with blue and white of technology with glow, bright cinematic lighting, gopro, fisheye lens"
image = pipe(prompt).images[0]image.save("./result.jpg")
'''
#批量prompt生成图片
num = 0
prompt_list = ['a ctue **','...','....']
for prompt in prompt_list:image = pipe(prompt).images[0]save_file_name = "result{0}.jpg".format(str(num)image.save("./result.jpg")num+=1
'''

优化promp让图更好看

Start by selecting the medium you want to use for your art, such as photo, digital art, 3d render, painting, etc.
1.开始部分选择你要生成的图片艺术风格,比如:照片、数字艺术、3d渲染、优化等等Next, describe what you want to generate. For better results be specific and use descriptive language. For example, instead of saying "a castle" you could say "a medieval castle on a cliff, storm clouds, restless ocean".
2.接着你要描述你要生成的具体物品,为了得到更好效果最好用描述性形容性词汇,例如,与其说“一座城堡”,不如说“悬崖上的中世纪城堡、暴风云、动荡的海洋”To make your prompt even more specific, you can add modifiers such as "dark cinematic lighting" or "highly detailed, intricate, bokeh". This will help the AI generate art that is more in line with your vision.
3.为了让你的提示更加具体,你可以添加修饰符,例如“暗色系光照”或“细节很详细、复杂、散景”。这将帮助 AI 生成更符合你意愿的作品。If you have any particular artists in mind, you can add their names to your prompt. Some popular artists include Greg Rutkowski, Artgerm, Alphonse Mucha, and Zdzislaw Beksinski. Check out these links for a list of supported artists and some examples of their art:
4.如果你有特定的艺术家或艺术手法你可以加上去,这样生成图片会更符合你要求

3d render, an soft and smooth appearance cute ant doll stands in the middle, full of sense with blue and white of technology with glow, bright cinematic lighting, gopro, fisheye lens, 4k hd wallpaper, conceptart

3d render, an cute ant doll with blue and white of technology glow ,soft and smooth appearance stands in the middle, bright cinematic lighting, gopro, romatic, 4k hd wallpaper, conceptart

3d render, an cute ant doll with blue and white of technology glow ,soft and smooth appearance stands in the middle, bright cinematic lighting, gopro, romatic, 4k hd wallpaper, bright illustration,cuteart

3d render, an soft and smooth appearance cute ant doll stands in the middle, full of sense with blue and white of technology with glow, bright cinematic lighting, gopro, fisheye lens, canon eos r 6, bifurcated lens, 4 k hd wallpaper, trending on artstation

小结

今天就带大家用代码方式批量做图片生成。

大家一定发现这东西拿到只能生成某个物体吗,能不能生成一些背景。

有没办法让生成的物体不变,在增加一些元素会改变一些图片内容。

现在生成的方式太随机了,同一句prompt生成的图片都会出现差异,有没办法解决

还有就是有没可能批量生成风格稳定的图

有没办法自动的生成prompt生成高质量的图片

大家先别急下面几篇文章会一一给你解答。

http://www.yayakq.cn/news/641528/

相关文章:

  • 杭州制作网站的公司网站建设电话销售模版
  • 做游戏推广网站手机网站滑动效果
  • 长沙网站推广合作怎么注册网站啊
  • 服务器网站源码在哪二维码制作网站
  • 哪些网站教你做美食的建设一个网站怎么赚钱
  • 电子商务网站建设薛万欣网站的页面风格是什么
  • 一个公司只能备案一个网站吗中国建设企业银行
  • 移动互联网开发是什么粤语seo是什么意思
  • 北京做网站黑名单演示动画制作免费网站
  • 荆州企业网站建设广东平台网站建设找哪家
  • 成功案例展示网站wordpress 公众号登录界面
  • 网站商城的意义网站建设的意义
  • 深圳网站搭建费用有域名怎么免费建站
  • 外贸网站建设石家庄专门做电商的网站有哪些
  • 广州市网站建站wordpress 前台
  • 网站流量统计数据库设计网站推广seo方法
  • 成都建设网站专业河南平顶山网站建设与管理专业
  • 哪个网站专题做的好上位机软件开发工具
  • 做网站图片怎么做长春专用网站建设
  • 网站的页面大小织梦宠物网站模板
  • 宁夏微信服务网站网页创建站点
  • 网站建设前期团队建设php做网站访问记录
  • l临沂互助系统网站开发在线教育网站开发时长
  • 导视设计网站专业网站建设是哪家便宜
  • 加盟店乌海seo公司
  • iis中浏览网站是什么成都销售型网站
  • 容桂网站制作价位免费缩短链接
  • 怎么做网站计划互联网网页设计流程
  • 广州培训网站开发网新网站建设合同
  • 宿迁住房和城乡建设网站做的网站为什么手机上搜不到