首页 > 其他分享 >[AI Omost] 革命性AI图像合成技术,让你的创意几乎一触即发!

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

时间:2024-06-11 15:30:36浏览次数:17  
标签:atmosphere description festive AI Omost joyful 革命性 banner children

介绍

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',
)

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

样例

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

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


标签:atmosphere,description,festive,AI,Omost,joyful,革命性,banner,children
From: https://blog.csdn.net/mahone3297/article/details/139599793

相关文章

  • 2024最新国产免费AI工具合集
    【导读】谁还在说国产AI不好用?今天就给大家分享几款2024年最新出品的免费又好用的国产AI工具集吧。一、阿里通义万相这是阿里出品的一款免费的AI绘图工具。你可以轻松制作自己想要的插画或海报,对于需要处理大量图片的设计师、摄影师或电商从业者来说,这款工具无疑能大大提升工......
  • 通义千问,大模型AI提示词,银泰业务测试点【多测师】
     需求点:智能客服他想查询积分  ==》去系统里面查积分返回具体的值现在有没有营销活动  ==》推出来当前的营销文档有没有券可以领取呢? ==》领取页面测试点:营销活动列表会不会完整显示会不会推送错能不能分页显示推送的券 有哪些是不是都可以领取会不会以链接显示问问题的次......
  • 什么是AIGC?AIGC是否会颠覆未来的内容生产模式?普通人如何利用好AI提高内容生产效率?
    2024年是AI元年,正好我在AI公司里面工作,对AIGC有着几年的研究,接下来把我这对AIGC的学习经验毫无保留的给大家分享一下AIGC的简要介绍在狭义上,AIGC是指利用AI自动生成内容的生产方式,比如自动写作、自动设计等。在广义上,AIGC是指像人类一样具备生成创造能力的AI技术,它可以基于......
  • AIGC绘画设计基础教学:一篇文章看懂AIGC基本概念
    在这个全新的时代,AIGC(ArtificialIntelligenceGenerativeContent,即人工智能生成内容)正在重新定义内容创作生态。当机器可以理解语言,艺术重新被定义,创意可以批量输出时,广告营销行业将迎来一场巨大的生产变革。本期内容中,我们将梳理24个AI的基础概念,带领大家全面了解AIGC。......
  • AIGC绘画设计基础:全网最全Midjourney出图关键词咒语汇总
    Midjourney是第一个快速生成AI制图并开放予大众申请使用的平台。Midjourney生成的作品往往带有电脑生成的痕迹,比较不会被当成假新闻素材,但对色情、血腥、暴力创作题材的审核还不够精准。例如,输入“一棵长着立方体形桃子的大树”,就会生成四张不同图像供选择。一、什么是midjo......
  • 探索国内大模型AIGC产品
     ​人不走空                                           ......
  • c/c++ 设计模式-----职责链(Chain Of Responsibility)模式
    一个关于涨薪审批的范例#include<iostream>#ifdef_DEBUG//只在Debug(调试)模式下#ifndefDEBUG_NEW#defineDEBUG_NEWnew(_NORMAL_BLOCK,__FILE__,__LINE__)//重新定义new运算符#definenewDEBUG_NEW#endif#endif//#include<boost/type_index.hpp>usingnames......
  • AI绘画Stable Diffusion必看:如何生成人物的全身照实战教程!
    大家好,我是画画的小强在小伙伴们私下留言中,关于如何实现人物的全身照一直有人咨询,看来这个问题还是困惑着不少小伙伴,今天我们就这个问题详细讨论一下。一.宽高比参数设置在讨论如何生成图片的全身照之前,我们先来讨论一下StableDiffusion中宽高比的参数设置。这2个参......
  • 一文了解AI绘画两大鼻祖 Midjourney 和 Stable Diffusion的区别,超详细讲解小白入门必
    大家好,我是画画的小强要说AI绘画软件哪家强?有人说Midjoureny(MJ),有人说StableDiffuion(SD),那他们到底有什么区别?应该选择哪款软件学习?今天带大家全面了解一下!文末可白嫖AI资料哦~一.使用费用对比Midjourney的收费为每月8-120美金不等,折算成RMB为60-880左右。分为4......
  • Python集成开发环境(IDE)JetBrains pycharm pro 2024 for mac
    JetBrainsPyCharmPro2024确实是一款强大的Python集成开发环境(IDE),为Python开发者提供了许多高级功能和改进,旨在提高开发效率和代码质量。以下是对您提到的PyCharm2024新增功能的详细解释:Python集成开发环境(IDE)软件地址HuggingFace模型和数据集的文档预览PyCharm2024......