Научная статья на тему '基于 MIDJOURNEY 的 AI 辅助绘画工具设计与实现'

基于 MIDJOURNEY 的 AI 辅助绘画工具设计与实现 Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
0
0
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
Spring Boot / Redis / Spark / 绘画领域 / MidJourney / CRISPE / Spring Boot / Redis / Spark / painting field / MidJourney / CRISPE

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Feng Junlong, Long Junhao

随着互联网技术的快速发展, 大量的 AI 工具涌现, 其中, 绘画领域是人们重点关注的, 通过 AI 绘画工具, 人们可以简化绘画流程, 大大方便了不同层次的人群在绘画领域上创作. 但 MidJourney 的使用非常复杂, 消耗用户时间. 为解决这一问题, 本文提出了一种新的架构模式. 基于 Spring Boot 架构, 实现了与 MidJourney 官方绘画工具的交互, 结合了 Redis 和 MySQL 的数据库优势, 引入消息中间件 RabbitMQ, 实现系统内部的异步通信和任务解耦. 整个系统旨在为用户提供一个稳定, 高效的绘画资源获取平台, 推动绘画创作领域的创新发展. 系统中加入了 SparkDesk 接口, 实现了大模型万能问答的功能, 使用 CRISPE 框架优化 MidJourneySpark 模型接口所使用的 Prompt, 进一步优化用户体验.

i Надоели баннеры? Вы всегда можете отключить рекламу.

Похожие темы научных работ по компьютерным и информационным наукам , автор научной работы — Feng Junlong, Long Junhao

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Design and implementation of AI-assisted painting tools based on MidJourney

With the rapid development of Internet technology, a large number of AI tools have emerged. Among them, the field of painting is the focus of people's attention. Through AI painting tools, people can simplify the painting process, which greatly facilitates people of different levels to create in the field of painting. However, the use of MidJourney is very complicated and consumes users' time. To solve this problem, this paper proposes a new architecture. Based on the Spring Boot architecture, it realizes interaction with MidJourney's official painting tool, combines the database advantages of Redis and MySQL, and introduces the message middleware RabbitMQ to achieve asynchronous communication and task decoupling within the system. The entire system aims to provide users with a stable and efficient platform for obtaining painting resources and promote innovation in the field of painting creation. The SparkDesk interface has been added to the system to realize the universal question and answer function of large models. The CRISPE framework is used to optimize the prompts used in the MidJourney and Spark model interfaces to further optimize the user experience.

Текст научной работы на тему «基于 MIDJOURNEY 的 AI 辅助绘画工具设计与实现»

For citation-. Feng Junlong, Long Junhao. Design and implementation of Al-assisted painting tools based on MidJourney // Grand Altai Research & Education — Issue 1 (21)'2024 (DOI: 10.25712/ASTU.2410-485X.2024.01) — EDN. https://elibrary.ru/GHGFMI

UDK 004.89

Design and implementation of AI-assisted painting tools based on MidJourney

Feng Junlong1*, Long Junhao2

1 Hubei Digital Textile Equipment Key Laboratory, Wuhan Textile University, Wuhan, 430073, China E-mail: *2419785330@qq.com ; 2889373053@qq.com

Abstract. With the rapid development of Internet technology, a large number of AI tools have emerged. Among them, the field of painting is the focus of people's attention. Through AI painting tools, people can simplify the painting process, which greatly facilitates people of different levels to create in the field of painting. However, the use of MidJourney is very complicated and consumes users' time. To solve this problem, this paper proposes a new architecture. Based on the Spring Boot architecture, it realizes interaction with MidJourney's official painting tool, combines the database advantages of Redis and MySQL, and introduces the message middleware RabbitMQ to achieve asynchronous communication and task decoupling within the system. The entire system aims to provide users with a stable and efficient platform for obtaining painting resources and promote innovation in the field of painting creation. The SparkDesk interface has been added to the system to realize the universal question and answer function of large models. The CRISPE framework is used to optimize the prompts used in the MidJourney and Spark model interfaces to further optimize the user experience.

Keywords: Spring Boot; Redis; Spark; painting field; MidJourney; CRISPE

MidJourney ЕЙ AI

шж*, жтт

i йж, 430073

E-mail: *2419785330@qq.com ; 2889373053@qq.com

ШШ: МЗДШЙ^Й'Ш^М, ХЙЙ AI ХШШ,

ЖЙ ai ^ихд, л т&шшжт, хх^шт^пшжй

Ш MidJourney шшти.

ЖЧШ, Spring Boot ШШ,

MidJourney ^7 Redis ^ MySQL ЙШШШ^Щ, ЩЛ

RabbitMQ, Itliii^

^t^AT SparkDesk gP, ^ITAfiMAmÎ^fô^m, CRISPE M MMt MidJourney ^ Spark flMf^P^fèfflfô Prompt, m-^ftffl^fà^.

^^M: Spring Boot; Redis; Spark; MidJourney; CRISPE

03m

MfêA^A^M, MidJourney ft

ftmm^^mx^MM. îM^AI^A®«^^

MidJourney É^ftx«, ^ffl^m^M^M^^^M^ ai m-^

» AI MM^AfêA AI frJftÉ^mftrntA.

1 Ai^mm^Mii^

MidJourney (GAN) m

rmiMÉ^ffl. gan A^É^Î^A

[2]. ^SA^AM

T, MidJourney g&iit,

a, ^^msA^mn® 1

«IS Stable Diffusion ^^fflA^A®,

Stable Diffusion Dream booth JA

Lora Textual Inversion JJA

Dream Booth É^ffifi^AM^, Lora ^A, M Textual Inversion l^ffifi^AÎÊ, JJUi^lM^WM^fJA^M [3]. Stable Diffusion ^S^ Text Encoder &

amA Noise Predictor m^iA?«, s^^ffl vae m^^fé, A^M^fô

SA, ÊAÎIAim (stable

diffusion) GPU AëÎT,

fJTAr±№ffl [4].

Ш1 шшшш

Figure 1 System function module diagram

ШршшШ, яр^-щыш ai тя^нтп ai ^ИШ. Ж+ШРЯ

шмш. ЯЯШ^Ш^Ж, ai ^И

ai ШШШШЯ

штшш.

(1) SparkDesk

l^T^ SparkDesk ШШШМШ. Ш2

1' 1 г U

ш щди А1ЩР

®2 SparkDesk ШРЯШ&ЙШ

Figure 2 SparkDesk chat module function diagram £ SparkDesk ЛШИ^ШЯШ*, ^Я^ФШШ^ШЙЛёВЙ«^

M ai тшшш. Шший вшт, Ш^^^ШМ^ШЙШ. ВДЯШРЯ ШШ&^&ШШШЖ, т^тштшшшлд. тяшшш

OpenAI ЬШШ.

(2) MidJourney ШШШШ

MidJourney ^ттштт. адз fjpk

Aims

1 1 1

sa и hse и mm №ср

MidJourney ^nm&Mrn Figure 3. MidJourney drawing module function diagram

2 Mid-Prompt ffiftr^^W

^^mmmx^k^m, MIdJourney

nm token, ^mm^rnrn^mmmm, m

Prompt Bt, M4 m^. ^WMM,

MidJourney

®4 ^Prompt Figure 4. Chinese Prompt

fêffl^f'Jft Prompt 0t, Ш5 ЯЯА. АШИШ^А

Figure 5. Highly thermally conductive, high-strength graphene-based composite films

by eliminating nanosheet wrinkles

ai ААИ^ШАЯА^п^Ат

ШАйёВШАШШЖ ЯШ MidJourney ö Prompt i

a^, ША, ад, швд, ш, ш, ш.

АШПШШФ^ЗД Prompt 0А

£пТ®б ЯЯА

Figure б. Use structured prompts

3 Prompt ffift-CRISPE m^&fr

Prompt iMKMlM, MM^iiiffl Prompt ffifofofi CRISPE ffl^UM^^M

flM^TS^. CRISPE CRISPE m^:

CR: Capacity and Role (iA^fe). AI

I: Insight (»), S: Statement (P№), AI

P: Personality (^ft), AI Uf^M ^A^M^i.

E: Experiment AI Aili^^M.

»a Mm^m^rnmrnw^ti

mm&amm&m. Mrasmidjoumey Aigai«. ttM—ssE, smmrnsm

m-^mn&om, nmmsm-Tm^imm, tmn-msm, ^eissMsss, Jta^^a-^ssi®,

mSiJUi^'J-CRISPE mmzft

Figure 6. Dialogue training example-CRISPE framework design

4 mi&m

^M^^ffl Java spring boot feA^^, iiffi MidJourney-proxy f^fMM^P AM. MSGitHub chat next web M»AM. M^tiffl№

AI ^WIMAMM MidJourney image MidJourney ff

^7 Discord Bot feA, Discord

Stable Diffusion m OpenAI № AI

^t^A Stable Diffusion m OpenAI № AI

2021. DOI:10.27239/d.cnki.gnhhu.2020.000814.

[2] GAN g^fcfffi, 2017, 43(03):321-332.D0I:10.16383/j.aas.2017.y000003.

[3] Mokady, Ron, et al. "Null-text Inversion for Editing Real Images using Guided Diffusion Models." ArXiv (2022).

[4] mxrn. ai ^bma g^efj&wtim. 2023,

5(03):424-430.

[5] Appleone. (2023-12-05). Prompt ffiA https://zhuanlan.zhihu.eom/p/670552915.

[6] AI ^i^tSft. (^ AI ^fM). https://zhuanlan.zhihu.eom/p/677432362?utm_psn=1762030859241132032.

References

[1] Wang Chenwei. Comparative Research on "Artificial Intelligence Painting" and Artist Painting from the Perspective of Creative Theory [D]. Nanjing University, 2021. DOI: 10.27239/D.cnki.gnhhu.2020. 000814.

[2] Wang Kunfeng, Gou Chao, Duan Yanjie, et al. Research progress and prospects of generative adversarial network GAN [J]. Acta Automata, 2017, 43(03): 321-332. DOI: 10.16383/j.aas.2017.y000003.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

[3] Mokady, Ron, et al. "Null-text Inversion for Editing Real Images using Guided Diffusion Models." ArXiv (2022).

[4] Ma Yuan. The Future of AI Painting from the Perspective of Jurisprudence: The Balance of Freedom and Control [J]. Journal of Intelligent Science and Technology, 2023, 5 (03): 424-430.

[5] Appleone. (2023-12-05). Prompt optimization https://zhuanlan.zhihu.com/p/670552915.

[6] Shangjin AI painting creative base. These tools are awesome! Generate Midjourney prompt words with one click! (AI tutorial attached). https://zhuanlan.zhihu.com/p/677432362?utm_psn=1762030859241132032.

i Надоели баннеры? Вы всегда можете отключить рекламу.