[AI Omost] 革命性AI图像合成技术,让你的创意几乎一触即发!

介绍

Omost 是一个创新的项目,它利用大型语言模型(LLM)的编码能力来生成图像,特别是通过图像合成技术。项目的名称“Omost”发音类似于“almost”,寓意着使用该项目后,用户的图像生成工作几乎可以完成。同时,“O”代表“omni”(多模态),而“most”则表示项目旨在最大化模型的潜力。

Omost 提供了一些LLM模型,这些模型能够编写代码,并与Omost的虚拟画布代理协作,合成图像的视觉内容。这个虚拟画布能够与特定的图像生成器结合,以实际生成图像。

目前,Omost 提供了3个基于Llama3和Phi3变种的预训练LLM模型。这些模型使用混合数据进行训练,包括:

  1. 几个数据集的真实标注数据,如Open-Images。
  2. 通过自动标注图像提取的数据。
  3. 来自DPO(直接偏好优化)的强化,其中代码是否能被Python 3.10编译作为直接偏好。
  4. 来自OpenAI GPT4o的多模态能力的一小部分调整数据。

通过这些训练数据,Omost 的模型能够生成高质量的图像,为用户提供一个强大的图像合成工具。

安装

安装很简单,只需运行以下命令:

git clone https://github.com/lllyasviel/Omost.git
cd Omost
conda create -n omost python=3.10
conda activate omost
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
python gradio_app.py

原理

原理请看github上的readme(文末有链接),已经说的很清楚了。

简单说就是:说一句简单的 prompt,LLM帮你丰富,详细规划图像,最后生成高质量可控图像。

实践

纸上得来终觉浅,绝知此事要躬行。实际操作一把:

界面还是比较清楚。

右边输入 prompt,点击“submit”。

然后界面就会生成一大片详细设计描述。

生成完成,点击左边的“Render the Image!”。稍等片刻,图片生成!

script

我们来看下生成的脚本。

我输入的是“Happy Children’s Day”,下面生成了一大堆图像设计描述。

# Initialize the canvas
canvas = Canvas()# Set a global description for the canvas
canvas.set_global_description(description="A joyful celebration of Children's Day.",detailed_descriptions=['The image captures a lively and joyful celebration of Children’s Day.','In the center, a group of happy children are playing together, laughing and having a great time.','They are dressed in colorful, festive outfits and are surrounded by balloons and streamers.','On the left, a clown is entertaining the children with tricks and jokes, adding to the festive atmosphere.','On the right, a table filled with delicious treats and toys is attracting the attention of the children.','On the top, a large banner that reads "Happy Children’s Day" is displayed, accompanied by colorful decorations.','On the bottom, a group of parents and caregivers are smiling and watching over the children, enjoying the joyous moment.','The overall atmosphere is one of happiness, joy, and celebration, with bright colors and lively energy filling the scene.',],tags="Children's Day, celebration, happiness, joy, children, playing, laughing, festive outfits, balloons, streamers, clown, tricks, jokes, treats, toys, banner, decorations, parents, caregivers, smiling, watching, bright colors, lively energy",HTML_web_color_name='lightgoldenrodyellow',
)# Add a group of happy children playing together.
canvas.add_local_description(location='in the center',offset='no offset',area='a medium-sized square area',distance_to_viewer=2.0,description='A group of happy children playing together.',detailed_descriptions=['In the center of the image, a group of happy children are playing together.','They are dressed in colorful, festive outfits that include bright dresses, shirts, and shorts.','The children are laughing and having a great time, their faces filled with joy and excitement.','They are surrounded by balloons and streamers, adding to the festive atmosphere.','The children are engaging in various activities such as running, chasing each other, and playing games.','Their energy and happiness are infectious, creating a joyful and lively scene.',],tags='children, playing, happy, colorful outfits, bright dresses, shirts, shorts, laughing, joy, excitement, balloons, streamers, running, chasing, playing games, energy, happiness',atmosphere='Joyful and lively, filled with energy and happiness.',style='Bright and colorful, with a focus on the happiness of the children.',quality_meta='High-quality, capturing the joyful moment with clarity and detail.',HTML_web_color_name='lightyellow',
)# Add a clown entertaining the children.
canvas.add_local_description(location='on the left',offset='no offset',area='a medium-sized vertical area',distance_to_viewer=3.0,description='A clown entertaining the children.',detailed_descriptions=['On the left side of the image, a clown is entertaining the children with tricks and jokes.','The clown is wearing a bright red nose, oversized shoes, and a colorful costume with large buttons and stripes.','He is performing tricks such as pulling out colorful objects from a hat and making silly jokes to make the children laugh.','The children are clearly enjoying the clown’s performance, their faces lit up with joy and amusement.','The clown’s antics add to the festive and joyful atmosphere of the celebration.',],tags='clown, entertaining, tricks, jokes, bright red nose, oversized shoes, colorful costume, large buttons, stripes, performing tricks, pulling out objects, making jokes, children laughing, joy, amusement, festive, joyful atmosphere',atmosphere='Festive and joyful, filled with laughter and amusement.',style='Colorful and lively, with a focus on the entertainment provided by the clown.',quality_meta='High-quality, capturing the clown’s performance with clarity and detail.',HTML_web_color_name='tomato',
)# Add a table filled with treats and toys.
canvas.add_local_description(location='on the right',offset='no offset',area='a medium-sized vertical area',distance_to_viewer=3.0,description='A table filled with treats and toys.',detailed_descriptions=['On the right side of the image, a table is filled with a variety of delicious treats and colorful toys.','The table is decorated with a red and white checkered cloth and is laden with goodies such as cupcakes, candies, and fruit.','Next to the table, there are piles of toys including stuffed animals, building blocks, and small cars.','The treats and toys are attracting the attention of the children, who are excitedly gathering around the table to explore and enjoy the offerings.','The table adds to the festive and enjoyable atmosphere of the celebration.',],tags='table, treats, toys, red and white checkered cloth, cupcakes, candies, fruit, stuffed animals, building blocks, small cars, attention of children, excited, exploring, enjoying, festive, enjoyable atmosphere',atmosphere='Festive and enjoyable, filled with excitement and joy.',style='Bright and colorful, with a focus on the variety of treats and toys.',quality_meta='High-quality, capturing the treats and toys with clarity and detail.',HTML_web_color_name='lightcoral',
)# Add a large banner that reads "happy children's day".
canvas.add_local_description(location='on the top',offset='no offset',area='a large horizontal area',distance_to_viewer=5.0,description="A large banner that reads 'Happy Children's Day'.",detailed_descriptions=["On the top of the image, a large banner that reads 'Happy Children's Day' is displayed.",'The banner is decorated with colorful ribbons and is placed against a backdrop of festive decorations.','The text on the banner is large and bold, making it easily readable.','The banner adds to the celebratory and joyful atmosphere of the scene, serving as a focal point that draws attention.','The decorations surrounding the banner include streamers, balloons, and other festive elements that enhance the overall celebratory feel of the image.',],tags="banner, Happy Children's Day, large, colorful ribbons, backdrop, festive decorations, text, bold, readable, celebratory, joyful atmosphere, focal point, streamers, balloons, festive elements, overall celebratory feel",atmosphere='Celebratory and joyful, with a focus on the festive decorations.',style='Colorful and festive, with a focus on the banner and decorations.',quality_meta='High-quality, capturing the banner and decorations with clarity and detail.',HTML_web_color_name='gold',
)# Add parents and caregivers smiling and watching over the children.
canvas.add_local_description(location='on the bottom',offset='no offset',area='a large horizontal area',distance_to_viewer=4.0,description='Parents and caregivers smiling and watching over the children.',detailed_descriptions=['On the bottom of the image, a group of parents and caregivers are smiling and watching over the children.','They are dressed in casual and comfortable clothing, and their expressions are filled with joy and pride as they watch their children having fun.','The parents and caregivers are standing and sitting, some holding cameras to capture the special moment.','They are actively involved in the celebration, cheering and clapping along with the children.','Their presence adds to the overall joyful and celebratory atmosphere, making the scene feel complete and heartwarming.',],tags='parents, caregivers, smiling, watching, children, casual clothing, comfortable clothing, joy, pride, having fun, standing, sitting, holding cameras, capturing moment, actively involved, cheering, clapping, overall joyful atmosphere, celebratory, heartwarming',atmosphere='Joyful and celebratory, filled with pride and joy.',style='Heartwarming and joyful, with a focus on the parents and caregivers.',quality_meta='High-quality, capturing the expressions and actions of the parents and caregivers with clarity and detail.',HTML_web_color_name='lightpink',
)

最后生成了图像。效果还不错。

样例

最后给大家看几张我生成的图,效果都还不错。

问题就是有点慢,几分钟一张图。


  • github
  • AI 博客 - 从零开始学AI
  • 公众号 - 从零开始学AI

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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

bbbike下载OSM路网数据后使用GraphHopper离线进行路径规划

一、bbbike下载OSM路网数据 BBBike extracts OpenStreetMap (OSM, Garmin, Shapefile etc.) 二、GraphHopper离线搭建 GraphHopper是一种快速且内存有效的Java导航引擎,默认使用OSM和GTFS数据,也可导入其他的数据源。支持CH(Contraction Hi…

如何提高逻辑性?(小妙招)

在现代社会中,逻辑性是一种至关重要的思维能力。不论是在工作、学习还是生活中,逻辑清晰的人总能更好地解决问题和做出决策。然而,如何提高逻辑性却是许多人头疼的问题。本文将从六个方面详细探讨如何提升逻辑性,包括细心态度、逼…

网页宽度现在右侧有一个竖条空白,怎么啦车网站都没办法完全铺满宽度,怎么回事怎么解决

问: 网页宽度怎么设置全覆盖 回答: 经过检查,发现 是这个网站的最外层html标签设置了宽度,所以导致,当我们删除html的宽度后就解决了这个问题.

大模型基础——从零实现一个Transformer(1)

一、Transformer模型架构图 主要模块: embedding层: Input/Output Embedding: 将每个标记(token)转换为对应的向量表示。 Positional Encoding:由于没有时序信息,需要额外加入位置编码。 N个 block堆叠: Multi-Head …

Spring Boot 使用自定义注解和自定义线程池实现异步日志记录

😄 19年之后由于某些原因断更了三年,23年重新扬帆起航,推出更多优质博文,希望大家多多支持~ 🌷 古之立大事者,不惟有超世之才,亦必有坚忍不拔之志 🎐 个人CSND主页——Mi…

树-二叉树的最大路径和

一、问题描述 二、解题思路 因为各个节点的值可能为负数,初始化res(最大路径和)的值为最小整数:Integer.MIN_VALUE 我们这里使用深度遍历(递归)的方法,先看某一个子树的情况: 这里有一个技巧,…

纷享销客安全体系:安全运维运营

安全运维运营(Security Operations,SecOps)是指在信息安全管理中负责监控、检测、响应和恢复安全事件的一系列运营活动。它旨在保护组织的信息系统和数据免受安全威胁和攻击的损害。 通过有效的安全运维运营,组织可以及时发现和应对安全威胁,减少安全事…

【Linux文件篇】系统文件、文件描述符与重定向的实用指南

W...Y的主页 😊 代码仓库分享💕 前言:相信大家对文件都不会太陌生、也不会太熟悉。在没有学习Linux操作系统时,我们在学习C或C时都学过如何去创建、打开、读写等待文件的操作,知道一些语言级别的一些接口与函数。但…

【Pytorch】一文向您详细介绍 torch.tensor() 的常见用法

【Pytorch】一文向您详细介绍 torch.tensor() 的常见用法 下滑即可查看博客内容 🌈 欢迎莅临我的个人主页 👈这里是我静心耕耘深度学习领域、真诚分享知识与智慧的小天地!🎇 🎓 博主简介:985高校的普通…

盲盒小程序推广与运营策略的挑战

随着盲盒经济的兴起,越来越多的商家开始关注并尝试开发盲盒小程序。然而,在推广和运营盲盒小程序的过程中,我们也不可避免地会遇到一些挑战。下面,我将就用户获取、留存以及活跃度提升等方面,探讨这些挑战及可能的应对…

【Linux】生产者消费者模型——阻塞队列BlockQueue

> 作者:დ旧言~ > 座右铭:松树千年终是朽,槿花一日自为荣。 > 目标:理解【Linux】生产者消费者模型——阻塞队列BlockQueue。 > 毒鸡汤:有些事情,总是不明白,所以我不会坚持。早安!…

【网络安全】网络安全基础精讲 - 网络安全入门第一篇

目录 一、网络安全基础 1.1网络安全定义 1.2网络系统安全 1.3网络信息安全 1.4网络安全的威胁 1.5网络安全的特征 二、入侵方式 2.1黑客 2.1.1黑客入侵方式 2.1.2系统的威胁 2.2 IP欺骗 2.2.1 TCP等IP欺骗 2.2.2 IP欺骗可行的原因 2.3 Sniffer探测 2.4端口扫描技术…

知识付费小程序源码系统 一键拥有属于自己的知识店铺 带完整的安装代码包以及搭建教程

系统概述 在数字化时代,知识已成为最具价值的资产之一。随着互联网技术的飞速发展,知识付费市场迎来了前所未有的发展机遇。为了帮助广大内容创作者、教育机构及个人轻松搭建专属的知识店铺,一款高效、易用的知识付费小程序源码系统应运而生…

架构设计-用户信息及用户相关的密码信息设计

将用户的基本信息和用户密码存放在不同的数据库表中是一种常见的安全做法,这种做法旨在增强数据的安全性和管理的灵活性。以下是这种做法的几个关键原因: 安全性增强: 当用户密码被单独存放在一个表中时,可以使用更强大的加密和哈…

超详解——Python模块文档——基础篇

目录 1. Unix起始行 示例: 2. 对象和类型 示例: 3. 一切都是对象 示例: 4. 理解对象和引用 示例: 5. 理解对象和类型 示例: 6. 标准类型 示例: 7. 其他内建类型 示例: 8. 类型的类…

东南亚电商Tiki、Qoo10:如何用自养号测评提升产品曝光和销量

随着互联网的普及和全球化的推进,跨境电商在东南亚地区日益繁荣。Tiki、Qoo10作为该地区的电商巨头,不仅吸引了大量消费者,也成为了卖家竞相角逐的战场。为了在这场竞争中脱颖而出,卖家们纷纷采用测评这一方式来提升产品销量。本文…

弱智吧”,人类抵御AI的最后防线

“写遗嘱的时候错过了deadline怎么办?” “怀念过去是不是在时间的长河里刻舟求剑?” “英语听力考试总是听到两个人在广播里唠嗑,怎么把那两个干扰我做题的人赶走?” 以上这些饱含哲学但好像又莫名其妙的问题,出自…

MySQL复习题(期末考试)

MySQL复习题(期末考试) 1.MySQL支持的日期类型? DATE,DATETIME,TIMESTAMP,TIME,TEAR 2.为表添加列的语法? alter table 表名 add column 列名 数据类型; 3.修改表数据类型的语法是? alter table 表名 modify 列名 新…

在windows10 安装子系统linux(WSL安装方式)

在 windows 10 平台采用了WSL安装方式安装linux子系统 1 查找自己想要安装的linux子系统 wsl --list --online 2 在线安装 个人用Debian比较多,这里选择Debian,如下图: wsl --install -d Debian 安装过程中有一步要求输入用户名与密码&…

LNMP与动静态网站介绍

Nginx发展 Nginx nginx http server Nginx是俄罗斯人 Igor Sysoev(伊戈尔.塞索耶夫)开发的一款高性能的HTTP和反向代理服务器。 Nginx以高效的epoll.kqueue,eventport作为网络IO模型,在高并发场景下,Nginx能够轻松支持5w并发连接数的响应,并…