Omost

Omost

将大型语言模型转化为图像生成工具

Omost是一个将大型语言模型的编码能力转化为图像合成能力的开源项目。它提供基于Llama3和Phi3的预训练模型,通过虚拟Canvas代理生成图像。项目使用多样化的训练数据,包括真实标注、自动提取数据、强化学习和GPT4多模态能力调优,以提升图像生成质量。

Omost图像生成LLMAI绘画CanvasGithub开源项目

Omost

Omost is a project to convert LLM's coding capability to image generation (or more accurately, image composing) capability.

The name Omost (pronunciation: almost) has two meanings: 1) everytime after you use Omost, your image is almost there; 2) the O mean "omni" (multi-modal) and most means we want to get the most out of it.

Omost provides LLMs models that will write codes to compose image visual contents with Omost's virtual Canvas agent. This Canvas can be rendered by specific implementations of image generators to actually generate images.

Currently, we provide 3 pretrained LLM models based on variations of Llama3 and Phi3 (see also the model notes at the end of this page).

All models are trained with mixed data of (1) ground-truth annotations of several datasets including Open-Images, (2) extracted data by automatically annotating images, (3) reinforcement from DPO (Direct Preference Optimization, "whether the codes can be compiled by python 3.10 or not" as a direct preference), and (4) a small amount of tuning data from OpenAI GPT4o's multi-modal capability.

Get Started

You can just use the official HuggingFace space.

Or, you can use the below deployment (requires 8GB Nvidia VRAM):

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

(Note that quant LLM requires bitsandbytes - some 9XX or 10XX or 20XX GPUs may have trouble in running it. If that happens, just use our official huggingface space.)

Screenshots

(All with random seed 12345)

a ragged man wearing a tattered jacket in the nineteenth century:

image

image

the greatest escape after the apocalypse, the hope of all humanity:

image

image

jurassic dinosaur battle:

image

image

the supreme ruler with endless magic on a gothic throne, with undead armies kneeling:

image

image

a funny cartoon batman fights joker:

image

image

Example Transcripts (with Conversational Editing)

(Below is a raw transcript from default model, with random seed 123456)

(If the GitHub's code block rendering is causing troubles to reading long lines, click here to read raw texts.)

User

generate an image of the fierce battle of warriors and the dragon

Assistant

# Initialize the canvas canvas = Canvas() # Set a global description for the canvas canvas.set_global_description( description='A fierce battle between warriors and a dragon.', detailed_descriptions=[ 'In this intense scene, a group of fierce warriors is engaged in an epic battle with a mighty dragon.', 'The warriors, clad in armor and wielding swords and shields, are positioned on the left side of the image.', 'Their expressions are determined and focused, reflecting their resolve to defeat the dragon.', 'The dragon, with its massive wings spread wide and its fiery breath illuminating the scene, dominates the center of the image.', 'Its scales glisten with a metallic sheen, and its eyes burn with a fierce intensity.', 'The background is a dark, stormy sky with flashes of lightning, adding to the drama and tension of the battle.', 'The ground is littered with debris and the remnants of previous battles, enhancing the sense of a long and brutal conflict.', 'The overall atmosphere is one of chaos and intensity, with the warriors and the dragon locked in a fierce struggle for survival.', ], tags='battle, warriors, dragon, fierce, armor, swords, shields, determined, focused, epic, intense, metallic, glistening, fiery breath, stormy sky, lightning, debris, conflict, struggle, survival, chaos, tension, drama, wings, scales, eyes, burning, illuminated', HTML_web_color_name='darkslategray', ) # Add a group of fierce warriors. canvas.add_local_description( location='on the left', offset='no offset', area='a large horizontal area', distance_to_viewer=5.0, description='A group of fierce warriors.', detailed_descriptions=[ 'The warriors, clad in gleaming armor, are positioned on the left side of the image.', 'They are armed with swords, shields, and spears, ready for battle.', 'Their faces are set with determination and focus, reflecting their resolve to defeat the dragon.', 'Some warriors are in mid-action, swinging their swords or shields, while others stand ready to strike.', 'The armor they wear is intricately designed, with symbols and patterns that signify their rank and bravery.', 'The ground beneath them is uneven and littered with debris, adding to the sense of a chaotic and intense battle.', ], tags='warriors, armor, swords, shields, spears, determined, focused, mid-action, intricate design, symbols, patterns, rank, bravery, uneven ground, debris, chaotic, intense, battle', atmosphere='Determined and focused, ready for the fierce battle.', style='Highly detailed and dynamic, capturing the intensity of the warriors.', quality_meta='High resolution with intricate details and dynamic poses.', HTML_web_color_name='darkgoldenrod', ) # Add a mighty dragon. canvas.add_local_description( location='in the center', offset='no offset', area='a large square area', distance_to_viewer=7.0, description='A mighty dragon.', detailed_descriptions=[ 'The dragon is a massive creature, dominating the center of the image with its wide-spread wings and fiery breath.', 'Its scales glisten with a metallic sheen, reflecting the light from its fiery breath.', "The dragon's eyes burn with a fierce intensity, and its teeth are sharp and menacing.", 'The wings of the dragon are powerful and spread wide, casting shadows over the battlefield.', 'The dragon’s body is muscular and covered in protective scales, with a long, sinewy tail that adds to its formidable appearance.', 'The fiery breath of the dragon illuminates the scene, casting a reddish glow over the warriors and the battlefield.', ], tags='dragon, massive, wings, fiery breath, glistening scales, metallic sheen, fierce eyes, sharp teeth, powerful wings, shadows, battlefield, muscular body, protective scales, sinewy tail, formidable, reddish glow, illumination', atmosphere='Intense and menacing, with a powerful presence.', style='Epic and dramatic, emphasizing the grandeur and danger of the dragon.', quality_meta='High resolution with dramatic lighting and detailed textures.', HTML_web_color_name='firebrick', ) # Add a stormy sky with flashes of lightning. canvas.add_local_description( location='on the top', offset='no offset', area='a large horizontal area', distance_to_viewer=10.0, description='A stormy sky with flashes of lightning.', detailed_descriptions=[ 'The background of the image is a dark, stormy sky filled with swirling clouds and flashes of lightning.', 'The sky is turbulent, with clouds dark and foreboding, adding to the dramatic tension of the battle.', 'The lightning flashes illuminate the scene, casting sharp, brief lights over the warriors and the dragon.', 'The stormy sky creates a sense of chaos and unpredictability, heightening the intensity of the battle below.', 'The overall atmosphere is one of impending doom and relentless conflict, with the storm mirroring the fierce struggle between the warriors and the dragon.', ], tags='stormy sky, dark clouds, lightning, turbulent, foreboding, dramatic tension, illumination, chaos, unpredictability, intensity, impending doom, relentless conflict, battle, warriors, dragon, swirling clouds, sharp lights, brief lights', atmosphere='Chaotic and intense, mirroring the fierce battle below.', style='Dramatic and turbulent, emphasizing the conflict and tension.', quality_meta='High resolution with dynamic lighting and detailed cloud textures.', HTML_web_color_name='midnightblue', ) # Add a debris-covered battlefield. canvas.add_local_description( location='on the bottom', offset='no offset', area='a large horizontal area', distance_to_viewer=5.0, description='A debris-covered battlefield.', detailed_descriptions=[ 'The ground of the battlefield is littered with debris, remnants of previous battles.', 'Broken weapons, shattered shields, and scattered armor pieces are strewn across the battlefield.', 'The terrain is uneven, with patches of mud and dirt, adding to the sense of a long and brutal conflict.', 'The debris-covered battlefield enhances the chaotic and intense atmosphere of the scene, reflecting the ferocity and duration of the battle.', 'The overall appearance is one of destruction and turmoil, with the remnants of previous battles serving as a grim reminder of the ongoing struggle.', ], tags='battlefield, debris, broken weapons, shattered shields, scattered armor, uneven terrain, mud, dirt, brutal conflict, chaos, intensity, destruction, turmoil, previous battles, ongoing struggle, remnants, ferocity, duration', atmosphere='Chaotic and intense, reflecting the ferocity of the battle.', style='Detailed and realistic, emphasizing the destruction and chaos.', quality_meta='High resolution with detailed textures and realistic debris.', HTML_web_color_name='darkolivegreen', )

User

change the dragon to a dinosaur

Assistant

# Initialize the canvas canvas = Canvas() # Set a global description for the canvas canvas.set_global_description( description='A fierce battle between warriors and a dinosaur.', detailed_descriptions=[ 'In this intense scene, a group of fierce warriors is engaged in an epic battle with a mighty dinosaur.', 'The warriors, clad in armor and wielding swords and shields, are positioned on the left side of the image.', 'Their expressions are determined and focused, reflecting their resolve to defeat the dinosaur.', 'The dinosaur, with its massive body and powerful legs, dominates the center of the image.', 'Its scales glisten with a metallic sheen, and its eyes burn with a fierce intensity.', 'The background is a dark, stormy sky with flashes of lightning, adding to the drama and tension of the battle.', 'The ground is littered with debris and the remnants of previous battles, enhancing the sense of a long and brutal conflict.', 'The overall atmosphere is one of chaos and intensity, with the warriors and the dinosaur locked in a fierce struggle for survival.', ], tags='battle, warriors, dinosaur, fierce, armor, swords, shields, determined, focused, epic, intense, metallic, glistening, stormy sky, lightning, debris, conflict, struggle, survival, chaos, tension, drama, powerful legs, scales, eyes, burning, illuminated', HTML_web_color_name='darkslategray', ) # Add a group of fierce warriors. canvas.add_local_description( location='on the left', offset='no offset', area='a large horizontal area', distance_to_viewer=5.0, description='A group of fierce warriors.', detailed_descriptions=[ 'The warriors, clad in gleaming armor, are positioned on the left side of the image.', 'They are armed with swords, shields, and spears, ready for battle.', 'Their faces are set with determination and focus, reflecting their resolve to defeat the dinosaur.', 'Some warriors are in mid-action, swinging their swords or shields, while others stand ready to strike.', 'The armor they wear is intricately designed, with symbols and patterns that signify their rank and bravery.', 'The ground beneath them is uneven and littered with debris, adding to the sense of a chaotic and intense battle.', ], tags='warriors, armor, swords, shields, spears, determined, focused, mid-action, intricate design, symbols, patterns, rank, bravery, uneven ground, debris, chaotic, intense, battle', atmosphere='Determined and focused, ready for the fierce battle.', style='Highly detailed and dynamic, capturing the intensity of the warriors.', quality_meta='High resolution with intricate details and dynamic poses.', HTML_web_color_name='darkgoldenrod', ) # Add a mighty dinosaur. canvas.add_local_description( location='in the center', offset='no offset', area='a large square area', distance_to_viewer=7.0, description='A mighty dinosaur.', detailed_descriptions=[ 'The dinosaur is a massive creature, dominating the center of the image with its powerful legs and fierce roar.', 'Its scales glisten with a metallic sheen, reflecting the light from the stormy sky.', "The dinosaur's eyes burn with a fierce intensity, and its teeth are sharp and menacing.", 'The powerful legs of the dinosaur are muscular and add to its formidable appearance.', 'The ground shakes beneath its feet, enhancing the sense of a long and brutal conflict.', 'The overall appearance is one of destruction and turmoil, with the dinosaur adding to the chaotic atmosphere.', ], tags='dinosaur, massive, powerful legs, fierce roar, glistening scales, metallic sheen, fierce eyes, sharp teeth, muscular legs, formidable, ground shaking, destruction, turmoil, chaos, battle', atmosphere='Intense and menacing, with a powerful presence.', style='Epic and dramatic, emphasizing the grandeur and danger of the dinosaur.', quality_meta='High resolution with dramatic lighting and detailed textures.', HTML_web_color_name='firebrick', ) # Add a stormy sky with flashes of lightning. canvas.add_local_description( location='on the top', offset='no offset', area='a large horizontal area', distance_to_viewer=10.0, description='A stormy sky with flashes of lightning.', detailed_descriptions=[ 'The background of the image is a dark, stormy sky filled with swirling clouds and flashes of lightning.', 'The sky is turbulent, with clouds dark and foreboding, adding to the dramatic tension of the battle.', 'The lightning flashes illuminate the scene, casting sharp, brief lights over the warriors and the dinosaur.', 'The stormy sky creates a sense of chaos and unpredictability, heightening the intensity of the battle below.', 'The overall atmosphere is one of impending doom and relentless conflict, with the storm mirroring the fierce struggle between the warriors and the dinosaur.', ], tags='stormy sky, dark clouds, lightning, turbulent, foreboding, dramatic tension, illumination, chaos, unpredictability, intensity, impending doom, relentless conflict, battle, warriors, dinosaur, swirling clouds, sharp lights, brief lights', atmosphere='Chaotic and intense, mirroring the fierce battle below.', style='Dramatic and turbulent, emphasizing the conflict and tension.', quality_meta='High resolution with dynamic lighting and detailed cloud textures.', HTML_web_color_name='midnightblue', ) # Add a debris-covered battlefield. canvas.add_local_description( location='on the bottom', offset='no offset', area='a large horizontal area', distance_to_viewer=5.0, description='A debris-covered battlefield.', detailed_descriptions=[ 'The ground of the battlefield is littered with debris, remnants of previous battles.', 'Broken weapons, shattered shields, and scattered armor pieces are strewn across the battlefield.', 'The terrain is uneven, with patches of mud and dirt, adding to the sense of a long and brutal conflict.', 'The debris-covered battlefield enhances the chaotic and intense atmosphere of the scene, reflecting the ferocity and duration of the battle.', 'The overall appearance is one of destruction and turmoil, with the remnants of previous battles serving as a grim reminder of the ongoing struggle.', ], tags='battlefield, debris, broken weapons, shattered shields, scattered armor, uneven terrain, mud, dirt, brutal conflict, chaos, intensity, destruction, turmoil, previous battles, ongoing struggle, remnants, ferocity, duration', atmosphere='Chaotic and intense, reflecting the ferocity of the battle.', style='Detailed and realistic, emphasizing the destruction and chaos.', quality_meta='High resolution with detailed textures and realistic debris.', HTML_web_color_name='darkolivegreen', )

(User can click the render button to actually render the image from any of those Canvas

编辑推荐精选

Keevx

Keevx

AI数字人视频创作平台

Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。

即梦AI

即梦AI

一站式AI创作平台

提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作

扣子-AI办公

扣子-AI办公

AI办公助手,复杂任务高效处理

AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!

TRAE编程

TRAE编程

AI辅助编程,代码自动修复

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
蛙蛙写作

蛙蛙写作

AI小说写作助手,一站式润色、改写、扩写

蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。

AI辅助写作AI工具蛙蛙写作AI写作工具学术助手办公助手营销助手AI助手
问小白

问小白

全能AI智能助手,随时解答生活与工作的多样问题

问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。

热门AI助手AI对话AI工具聊天机器人
Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

下拉加载更多