使用Llama3辅助生成StableDiffusion提示词,AI绘画从未如此简单!

前言

Llama3简介

Llama 3是由Meta公司推出的一款大型语言模型(LLM),其版本规模从8B到400B参数不等,这超越了包括谷歌的Gemma/Gemini、Mistral和Claude 3 Sonnet在内的众多竞争对手,且能在仅4GB的GPU上实现高效运行,为商业应用提供了更多可能性。

HuggingFace上有大神发布了基于Llama3的stable diffusion的prompt提示词微调模型——llama3_ifai_sd_prompt_mkr_q4km。我们可以向模型输入简单的提示,Llama3将会给我们返回详细的提示描述。

所有的AI设计工具,模型和插件,都已经整理好了,👇获取~在这里插入图片描述

Llama3部署

llama3_ifai_sd_prompt_mkr_q4km模型已上架Ollama仓库。

Ollama部署可参考:[Windows本机运行7B大模型]

执行ollama run impactframes/llama3_ifai_sd_prompt_mkr_q4km即可完成部署。

C:\Users\Zz>ollama run impactframes/llama3_ifai_sd_prompt_mkr_q4km  
pulling manifest  
pulling 8c307d788852... 100% ▕████████████████████████████████████████████████████████▏ 4.9 GB  
pulling 2190828de961... 100% ▕████████████████████████████████████████████████████████▏  260 B  
pulling 0661d86cbb71... 100% ▕████████████████████████████████████████████████████████▏  575 B  
pulling 563e392d0f49... 100% ▕████████████████████████████████████████████████████████▏  12 KB  
pulling 3ac6276a4a91... 100% ▕████████████████████████████████████████████████████████▏  415 B  
pulling 98f4faea31b4... 100% ▕████████████████████████████████████████████████████████▏   73 B  
pulling d074ab4deb16... 100% ▕████████████████████████████████████████████████████████▏  633 B  
verifying sha256 digest  
writing manifest  
removing any unused layers  
success  

测试使用

以往我们在使用Stable Diffusion时,自己思考提示词是一件很消耗脑细胞的事情。通过大模型生成的提示词往往更加精准、丰富多样,能够引导Stable Diffusion产出更高分辨率、细节更丰富的图像。大型语言模型能够理解和生成高度复杂、抽象的概念描述,这为图像生成提供了无限的创意空间。用户可以使用自然语言描述极其详细或新颖的场景,即使是那些现实中不存在或难以想象的构想,大模型都能辅助生成精确的提示词,进而创造出独特且富有创意的图像作品。并且对于非专业设计人员来说,直接操作复杂的图像生成参数可能较为困难。而利用大模型生成的提示词作为桥梁,用户只需简单描述心中所想,即可得到满意的作品,极大地降低了艺术创作和技术使用的门槛。

提示词1:一个人站在山顶

>>> A man standing atop of a mountain  
Philosophical, introspective, contemplative, solitary figure, dressed in simple attire, standing at the summit of  
a majestic mountain, gazing out at the breathtaking panorama, lost in thought, pondering the mysteries of  
existence, the universe, and human nature, as the wind whispers secrets in his ear, the sun  

提示词2:拟人的猫猫坐在电脑前工作

>>> 拟人的猫猫坐在电脑前工作  
Fictional character, anthropomorphic cat named 'Whiskers', sitting comfortably at a desk in front of a computer  
screen, wearing glasses, typing away with paws, intense focus on the task at hand, surrounded by scattered papers,  
pencils, and catnip toys, whimsical atmosphere, soft lighting, cozy setting.  

提示词3:即将降落月球的宇宙飞船

>>> 即将降落月球的宇宙飞船  
Soaring through space, the sleek, silver spacecraft, 'Lunar Quest', prepares to land on the moon's surface, vast  
craters and rugged terrain visible beneath, solar panels extended, engines firing, smoke trails forming,  
astronauts in suits, suited up for lunar exploration, lunar module separating from main spacecraft, majestic Earth  
rising above horizon, dramatic sky gradient.  

提示词4:机器人战争

`>>> 机器人战争   Advanced, mechanized armies clashing on a desolate battlefield, steel behemoths with glowing blue eyes, towering   robots marching across the terrain, smoke and flames engulfing the landscape, laser beams slicing through the air,   explosions rocking the ground, metal shards flying everywhere, apocalyptic devastation, twisted ruins in the   distance.`

![](https://mmbiz.qpic.cn/sz_mmbiz_png/73zapZAO3Ewb8J2dDLa0B1ZoYibicUO0ttaIC0eD7H2FfyvQSepoiauhX0NhpHlpaAsM1FnYw4pfzI6dW1SUficR2Q/640?wx_fmt=png&from=appmsg)

提示词5:现代化的熊猫战士


现代化的熊猫战士
Panda warrior, dressed in futuristic armor, helmet adorned with panda emblem, standing confidently on a futuristic
battlefield, holding energy sword, shield emblazoned with panda pattern, advanced jetpack strapped to back,
airbrushed camouflage design, bold lines, metallic sheen, modern technology merged with ancient symbolism.




  

插件

如果感觉每次手动复制比较麻烦,可以在SableDiffusion下载IF_prompt_MKR插件。

插件安装好,重启SableDiffusion遇到报错:

我们需要在这块安装openai框架:  

安装好openai框架后,再次启动SableDiffusion就不会报错了。这时候,我们打开Web页面,在设置—>未分类里找到iF_prompt_MKR,设置Ollama。

设置完成后,在文生图页面的脚本处设置:  

此外,我们还可以根据自己的需要设置系统提示词和反向提示词。
所有设置完毕后,在Input Prompt处输入自己想要绘画的概要内容,点击生成即
可。


这里分享给大家一份Adobe大神整理的《AIGC全家桶学习笔记》,相信大家会对AIGC有着更深入、更系统的理解。

有需要的朋友,可以点击下方免费领取!

在这里插入图片描述

AIGC所有方向的学习路线思维导图

这里为大家提供了总的路线图。它的用处就在于,你可以按照上面的知识点去找对应的学习资源,保证自己学得较为全面。如果下面这个学习路线能帮助大家将AI利用到自身工作上去,那么我的使命也就完成了:
在这里插入图片描述

AIGC工具库

AIGC工具库是一个利用人工智能技术来生成应用程序的代码和内容的工具集合,通过使用AIGC工具库,能更加快速,准确的辅助我们学习AIGC
在这里插入图片描述

有需要的朋友,可以点击下方卡片免费领取!

在这里插入图片描述

精品AIGC学习书籍手册

书籍阅读永不过时,阅读AIGC经典书籍可以帮助读者提高技术水平,开拓视野,掌握核心技术,提高解决问题的能力,同时也可以借鉴他人的经验,结合自身案例融会贯通。

在这里插入图片描述

AI绘画视频合集

我们在学习的时候,往往书籍源码难以理解,阅读困难,这时候视频教程教程是就很适合了,生动形象加上案例实战,科学有趣才能更方便的学习下去。

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值