{"id":360014,"date":"2024-05-21T00:44:34","date_gmt":"2024-05-21T00:44:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=360014"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=360014","title":{"rendered":"<span>\u041e\u0431\u0437\u043e\u0440 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/961\/d8e\/e46\/961d8ee46fff0456b5b53065f45be664.png\" width=\"1600\" height=\"1000\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/961\/d8e\/e46\/961d8ee46fff0456b5b53065f45be664.png\"\/><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 text-to-image \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0434\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043c\u043e\u0433\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0445. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u0434\u043b\u044f \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u044f\u0434\u043e\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c: \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u0434\u0440. <\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0421\u0435\u0440\u0433\u0435\u0439 \u041c\u0438\u0445\u0430\u0439\u043b\u0438\u043d. \u042f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0433\u0440\u0443\u043f\u043f\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u041e\u041a. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043e\u0431\u0437\u043e\u0440 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 text-to-image \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Stable Diffision, \u0434\u0435\u043b\u044e\u0441\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u0422\u0430\u043a\u0436\u0435, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 text-to-image \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u044f \u0434\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0417\u0430 \u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 text-to-image \u043c\u043e\u0434\u0435\u043b\u0438 [1, 2, 3]\u00a0\u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0440\u0435\u0437\u043a\u0438\u0439 \u0441\u043a\u0430\u0447\u043e\u043a \u0432 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438, \u0447\u0435\u043c \u0441\u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u044e \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u041c\u043e\u0434\u0435\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0438\u043b\u044f\u0445 \u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0446\u0435\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u2013 \u0434\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c\u0435 \u043a\u043e\u0441\u043c\u043e\u043d\u0430\u0432\u0442\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u0445 \u044d\u0442\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.\u00a0 \u041d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u042f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438: Textual Inversion [4], DreamBooth [5], Low-Rank Adaptation (LoRA) [6], Encoder for Tuning (E4T) [7], HyperDreamBooth [8], \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0438\u0445 \u043f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 Stable Diffusion, \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<h4>\u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<p>\u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 D<sub>\u03b8<\/sub> \u2013 \u044d\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041e\u043d\u0438 \u0443\u0447\u0430\u0442\u0441\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043e\u0447\u0438\u0449\u0430\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u0433\u0430\u0443\u0441\u0441\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <em>x<\/em> \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0448\u0443\u043c, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430 <em>T<\/em> \u0448\u0430\u0433\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u0438:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation*} L(x, c, t) = \\|D_{\\theta}(z_{x, t}, c) - x\\|^2_2 \\end{equation*}\" alt=\"\\begin{equation*} L(x, c, t) = \\|D_{\\theta}(z_{x, t}, c) - x\\|^2_2 \\end{equation*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f06\/482\/be0\/f06482be0aedc30d65282de6dbd03c19.svg\" width=\"244\" height=\"24\"\/><\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0437\u0430\u0448\u0443\u043c\u043b\u044f\u0435\u0442\u0441\u044f <em>x\u2192z<sub>x,t<\/sub><\/em> \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u0448\u0443\u043c\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, DDIM [9]), \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <em>t\u223cU(0,T)<\/em>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 t \u2013 \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043e \u0448\u0443\u043c\u0430:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} z_{x, t = 0} &amp;= x \\\\ z_{x, t \\rightarrow T} &amp;\\sim \\mathcal{N}(0, I). \\end{aligned} \\end{equation*}\" alt=\"\\begin{equation*} \\begin{aligned} z_{x, t = 0} &amp;= x \\\\ z_{x, t \\rightarrow T} &amp;\\sim \\mathcal{N}(0, I). \\end{aligned} \\end{equation*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/707\/df7\/196\/707df719662b1eb726d6e2aade7e4e92.svg\" width=\"150\" height=\"51\"\/><\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <em>z<sub>t<\/sub>\u223cN(0,I)<\/em> \u0438, \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u201c\u043e\u0447\u0438\u0449\u0430\u044f\u201d \u0435\u0433\u043e \u043e\u0442 \u0448\u0443\u043c\u0430, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.  <\/p>\n<h4>Stable Diffusion<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1d8\/40c\/eec\/1d840ceec0c69b7ed4b24889047dc5b5.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Stable Diffusion\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Stable Diffusion\" width=\"1024\" height=\"508\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1d8\/40c\/eec\/1d840ceec0c69b7ed4b24889047dc5b5.png\"\/><\/p>\n<div><figcaption><em>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Stable Diffusion<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Stable Diffusion \u2013 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438. \u041e\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0431\u043b\u043e\u043a\u043e\u0432: Pixel Space, Latent Space, Conditioning. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<ul>\n<li>\n<p><strong>Pixel Space<\/strong>. \u041d\u0430 \u0432\u0445\u043e\u0434 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <em>x<\/em> \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (512\u00d7512). \u041e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c (encoder) \u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (64\u00d764) \u0432 \u043a\u0430\u0440\u0442\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u0434\u0435\u0440 <em>D<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441\u0436\u0430\u0442\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 <em>x: 64\u00d764\u2192512\u00d7512<\/em>.<\/p>\n<\/li>\n<li>\n<p><strong>Latent Space<\/strong>. \u0421\u0436\u0430\u0442\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0448\u0443\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430 <em>T<\/em> \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u044c UNet\u00a0[10] \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u0448\u0443\u043c, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0439 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u0438\u044f <em>timestamp<\/em> \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <em>prompt<\/em> \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0448\u0443\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c <em>T<\/em> \u0440\u0430\u0437. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0439 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u201c\u0448\u0443\u043c\u0430 \u043e\u0442 \u0448\u0443\u043c\u0430\u201d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>Conditioning<\/strong>. \u0411\u043b\u043e\u043a \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. Text-To-Image \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 cross-attention\u00a0[11] \u0441\u043b\u043e\u0438 UNet \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u2013 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<h3>Textual Inversion<\/h3>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0445\u043e\u0434, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u2013 \u044d\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (prompt). \u041d\u0430\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u0447\u0435\u043d\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u201c\u0412\u044b\u0441\u043e\u043a\u0438\u0439 \u043c\u0443\u0436\u0447\u0438\u043d\u0430 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u043e\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0443\u0434\u0440\u044f\u0432\u044b\u0435 \u0432\u043e\u043b\u043e\u0441\u044b, \u0435\u0432\u0440\u043e\u043f\u0435\u0439\u0441\u043a\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u043e\u0441\u0442\u0438, &#8230;\u201d. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e \u043c\u0435\u043b\u043a\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043d\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 Stable Diffusion \u043e\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e 77 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f [4] \u0441\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u044b\u043c. \u042d\u0442\u0443 \u0438\u0434\u0435\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u0439\u0434\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (embedding) \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u0435\u0432\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6bb\/b8d\/4b3\/6bbb8d4b385fee3361a4e1e70fd8c394.jpeg\" alt=\"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c Textual Inversion. \u0414\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430 S\u2217 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 v\u2217 \u2013 \u0432 \u043d\u0435\u043c \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.     \" title=\"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c Textual Inversion. \u0414\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430 S\u2217 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 v\u2217 \u2013 \u0432 \u043d\u0435\u043c \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.     \" width=\"1345\" height=\"758\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6bb\/b8d\/4b3\/6bbb8d4b385fee3361a4e1e70fd8c394.jpeg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c Textual Inversion. \u0414\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430 S\u2217 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 v\u2217 \u2013 \u0432 \u043d\u0435\u043c \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.     <\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <em>[tag]<\/em>) \u0438 \u0437\u0430\u0432\u0435\u0434\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0432 Tokenizer. \u042d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c embedding \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e Text Encoder. \u042d\u0442\u043e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u044b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 Text Encoder \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0444\u0440\u0430\u0437\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <em>a photo of [tag]<\/em>. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0440\u0430\u0437\u0443, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443, \u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439: <em>a closeup photo of [tag], a picture of [tag]<\/em> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412\u0430\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0441\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0435\u0432 \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u043e\u0432 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d embedding, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0433 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0435: <em>a photo of [tag] &lt;\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0446\u0435\u043d\u044b><\/em>.<\/p>\n<p>\u041a \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430\u043c textual inversion \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0438 \u043d\u0438\u0437\u043a\u0438\u0439 \u0448\u0430\u043d\u0441 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0420\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432 \u043c\u0430\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 8 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0433\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0447\u0430\u0441\u0442\u043e \u201c\u0442\u0435\u0440\u044f\u0435\u0442\u201d \u0434\u0435\u0442\u0430\u043b\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.<\/p>\n<h2>DreamBooth  <\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Textual Inversion \u2013 \u043f\u043b\u043e\u0445\u0430\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0435\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u043e\u0435 \u0438 \u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/717\/9f4\/fee\/7179f4fee0ace4a3fa7f6ac2a5ec7c9d.png\" alt=\"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c DreamBooth\" title=\"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c DreamBooth\" width=\"3010\" height=\"1482\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/717\/9f4\/fee\/7179f4fee0ace4a3fa7f6ac2a5ec7c9d.png\"\/><\/p>\n<div><figcaption><em>\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c DreamBooth<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0430 DreamBooth\u00a0[5] \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u044e \u0441\u0435\u0442\u044c, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0438 \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0445\u043e\u0434 UNet. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u044b, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 Textual Inversion, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430: <em>a photo of [tag] [class]<\/em>, \u0433\u0434\u0435 <em>[tag]<\/em> \u2013 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442, <em>[class]<\/em> \u2013 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0448 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u2013 <em>person<\/em>, \u0434\u043b\u044f \u043a\u043e\u0448\u043a\u0438 \u2013 <em>cat<\/em>. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>[class]<\/em> \u201c\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u201d \u0441\u0435\u0442\u0438 \u0442\u0438\u043f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u2013 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0438 \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u043e\u0439 \u0442\u0435\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u043c, \u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e. \u041f\u0440\u0438\u0447\u0435\u043c, \u0447\u0435\u043c \u201c\u0441\u0438\u043b\u044c\u043d\u0435\u0435\u201d \u0441\u043b\u043e\u0432\u043e (\u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0435\u0435, \u0437\u043d\u0430\u0447\u0438\u043c\u0435\u0435), \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0422\u0430\u043a, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u043e\u043a\u0435\u043d <em>blue (a photo of <\/em><strong><em>blue<\/em><\/strong><em> person)<\/em>, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u043e \u0441\u0438\u043d\u0435\u0433\u043e \u0446\u0432\u0435\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0433\u0430 \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e: \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u2013 \u043a\u0430\u043a \u0432 Textual Inversion.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 D<sub>\u03b8 \u0302<\/sub>, \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f <strong>Prior Preservation Loss<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u043d\u0438\u0435 [12]. \u0418\u0434\u0435\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u0438 \u043f\u0440\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0443 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u0435\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation} \\label{eq:pploss} L(x_t, c_t, x_p, c_p, t) = \\|D_{\\hat{\\theta}}(x_t + \\epsilon_t, c_t) - x_t\\|^2_2 + \\lambda \\|D_\\theta(x_p + \\epsilon_t, c_p) - x_p\\|^2_2 \\end{equation}\" alt=\"\\begin{equation} \\label{eq:pploss} L(x_t, c_t, x_p, c_p, t) = \\|D_{\\hat{\\theta}}(x_t + \\epsilon_t, c_t) - x_t\\|^2_2 + \\lambda \\|D_\\theta(x_p + \\epsilon_t, c_p) - x_p\\|^2_2 \\end{equation}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a84\/99e\/6a5\/a8499e6a57a98e8a7d5c4999e3b337ed.svg\" width=\"585\" height=\"25\"\/><\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 DreamBoth \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u0411\u0435\u0440\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e Stable Diffusion \u0441 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438 D<sub>\u03b8<\/sub>.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u044e\u0431\u043e\u0435 (\u0438\u0437 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435) \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0441\u043b\u043e\u0432\u043e, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0435\u0435 \u043a\u043b\u0430\u0441\u0441 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0430\u0435\u043c \u0444\u0440\u0430\u0437\u0443 c<sub>p<\/sub> \u0432\u0438\u0434\u0430 <em>a photo of [class]<\/em> \u0432 \u043d\u0430\u0448\u0443 \u0441\u0435\u0442\u044c \u0438 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b x<sub>p<\/sub>.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0430\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0435\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 x<sub>t<\/sub> c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c c<sub>t<\/sub> \u0432\u0438\u0434\u0430 <em>a photo of [tag] [class]<\/em> \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 loss-\u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0430\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0435\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043f.4 (x<sub>p<\/sub>, c<sub>p<\/sub>) \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 loss-\u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 (1), \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u0438\u0437 \u043f.6 \u0438 \u043f.7, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0448\u0430\u0433\u0438 6-8 \u0434\u043e \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0438. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u043e\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u00a01300 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u043c \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0421\u0440\u0435\u0434\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432: \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0432\u0435\u0441\u0430, \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432, \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438 (\u043d\u0430\u0434\u043e \u0434\u043e 30 \u0413\u0431).<\/p>\n<h3>Low-Rank Adaptation<\/h3>\n<p>\u0412 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u0445 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u201c\u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u201d \u2013 \u0432\u044b\u0431\u043e\u0440 \u043c\u0435\u0436\u0434\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u0434\u0445\u043e\u0434 LoRA (Low Rank Adaptation)\u00a0[6] \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u2013\u2013 \u043d\u0438\u0437\u043a\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u0441\u043e\u0432, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u044b.<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043f\u043e\u043f\u0440\u0430\u0432\u043e\u043a \u0434\u043b\u044f cross- \u0438 self-attention \u0432\u0435\u0441\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 UNet. \u042d\u0442\u0430 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u201c\u0441\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u201d \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b W<sub>0<\/sub> \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0438 W<sub>\u03b4<\/sub> \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u043d\u0433\u0430, \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u0435\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u043a \u0443 W<sub>0<\/sub>. \u0412\u044b\u0445\u043e\u0434\u044b \u0441\u043b\u043e\u0435\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 W<sub>0<\/sub> \u0438 W<sub>\u03b4<\/sub>, \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{align*} &amp;y = W x, \\, W \\in \\mathbb{R}^{n \\times m} \\\\ &amp;W = W_0 x + W_{\\delta}x, \\, W_0, W_\\delta \\in \\mathbb{R}^{n \\times m} \\\\ &amp;W_{\\delta} = BA, \\, B \\in \\mathbb{R}^{n \\times r}, \\, A \\in \\mathbb{R}^{r \\times m}, \\, r \\ll min(n, m), \\\\ &amp;y = W_0 x + B A x \\end{align*}\" alt=\"\\begin{align*} &amp;y = W x, \\, W \\in \\mathbb{R}^{n \\times m} \\\\ &amp;W = W_0 x + W_{\\delta}x, \\, W_0, W_\\delta \\in \\mathbb{R}^{n \\times m} \\\\ &amp;W_{\\delta} = BA, \\, B \\in \\mathbb{R}^{n \\times r}, \\, A \\in \\mathbb{R}^{r \\times m}, \\, r \\ll min(n, m), \\\\ &amp;y = W_0 x + B A x \\end{align*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8bc\/405\/69b\/8bc40569bb37a698640816138f3df3d0.svg\" width=\"416\" height=\"99\"\/><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u0435\u043d\u0435\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u043a \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438. \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u044b A \u0438 B \u043d\u0438\u0437\u043a\u043e\u0433\u043e \u0440\u0430\u043d\u0433\u0430 \u2013 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430\u0445. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0438 \u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u0432\u0435\u0441\u043e\u0432 W<sub>0<\/sub> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u043f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c W<sub>\u03b4<\/sub> \u043c\u043e\u0436\u043d\u043e \u201c\u043d\u0430 \u0445\u043e\u0434\u0443\u201d. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u0433\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u043c \u0446\u0435\u043b\u0435\u0432\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 LoRA \u0432\u043d\u043e\u0441\u0438\u0442 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447: \u0437\u0430\u043c\u0435\u043d\u044b \u0447\u0435\u0440\u0442 \u043b\u0438\u0446\u0430 \u0443 \u0432\u0441\u0435\u0445 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0433\u043b\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043c\u0435\u0442\u043e\u0434 LoRA \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438 \u2013 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u043b\u0443\u0447\u0448\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u041a \u043f\u043b\u044e\u0441\u0430\u043c \u043c\u0435\u0442\u043e\u0434\u0430 LoRA \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043d\u0438\u0437\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0438\u0437\u043a\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u043e\u043a\u043e\u043b\u043e 20 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442).<\/p>\n<h3>Encoder for Tuning<\/h3>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 Textual Inversion \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u0438 \u2013 Encoder for Tuning (E4T) [7]. \u0413\u043e\u0432\u043e\u0440\u044f \u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435, \u0441\u0442\u043e\u0438\u0442 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u2013 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0432 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/8ab\/e36\/190\/8abe361909273f2b1527c9a9898392fc.jpeg\" alt=\"\u041f\u043e\u0434\u0445\u043e\u0434 Encoder for Tuning\" title=\"\u041f\u043e\u0434\u0445\u043e\u0434 Encoder for Tuning\" width=\"1548\" height=\"714\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ab\/e36\/190\/8abe361909273f2b1527c9a9898392fc.jpeg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption><em>\u041f\u043e\u0434\u0445\u043e\u0434 Encoder for Tuning<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0434\u0432\u0438\u0433\u043e\u0432 \u0432\u0435\u0441\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/strong> \u0410\u0432\u0442\u043e\u0440\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0443\u0447\u0430\u044e\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 Word Encoder \u2013 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435 \u0441\u0435\u0442\u0438 \u2013 \u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0430\u043f\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u201c\u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u201c\u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u043f.1 \u0438 \u043f.2 \u0441 \u0432\u0435\u0441\u043e\u043c \u03bb, \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u0430 \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0430\u0432\u0442\u043e\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c: <\/p>\n<ol>\n<li>\n<p>\u0424\u043e\u0442\u043e \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u044d\u043d\u043a\u043e\u0434\u0435\u0440 OpenCLIP ViT-H\/14 [13]. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043b\u043e\u044f.<\/p>\n<\/li>\n<li>\n<p>\u042d\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0441\u043b\u043e\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a UNet Stable Diffusion.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438\u0437 \u043f.2 \u0438 \u043f.3 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0441\u043b\u043e\u0439.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0430\u0432\u0442\u043e\u0440\u044b \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0441\u0435\u0442\u0435\u0439 \u2013\u2013 CLIP \u0438 UNet \u2013\u2013 \u0441 \u0446\u0435\u043b\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u043e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434, \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0440\u0430\u0441\u0430, \u0446\u0432\u0435\u0442 \u0432\u043e\u043b\u043e\u0441) \u0438 \u0435\u0433\u043e \u201c\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445\u201d \u0441\u0432\u043e\u0439\u0441\u0442\u0432 (\u0444\u043e\u0440\u043c\u0430 \u0432\u043e\u043b\u043e\u0441, \u0448\u0440\u0430\u043c\u044b, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0440\u043e\u0432\u0435\u0439, \u0433\u043b\u0430\u0437, \u0433\u0443\u0431 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0435\u0440\u0442\u044b). \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0432 Stable Diffusion \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 Textual Inversion.<\/p>\n<p><strong>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0434\u0432\u0438\u0433\u043e\u0432 \u0432\u0435\u0441\u043e\u0432.<\/strong> \u0410\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 50 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0439 Stable Diffusion \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b W<sub>Q<\/sub>, W<sub>K<\/sub>, W<sub>O<\/sub> \u0432 cross-attention \u0441\u043b\u043e\u044f\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0438\u0441\u043a\u043e\u0432 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u201c\u0441\u0434\u0432\u0438\u0433\u201d W<sub>\u03b4<\/sub> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043c\u0430\u0442\u0440\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} v_0 &amp;\\in \\mathbb{R}^1, \\\\ l_1 &amp;\\in \\mathbb{R}^{M \\times 1}, \\\\ l_2 &amp;\\in \\mathbb{R}^{1 \\times N}, \\\\ l_3 &amp;\\in \\mathbb{R}^{M \\times M}, \\\\ l_4 &amp;\\in \\mathbb{R}^{N \\times N}  \\end{aligned} \\end{equation*}\" alt=\"\\begin{equation*} \\begin{aligned} v_0 &amp;\\in \\mathbb{R}^1, \\\\ l_1 &amp;\\in \\mathbb{R}^{M \\times 1}, \\\\ l_2 &amp;\\in \\mathbb{R}^{1 \\times N}, \\\\ l_3 &amp;\\in \\mathbb{R}^{M \\times M}, \\\\ l_4 &amp;\\in \\mathbb{R}^{N \\times N}  \\end{aligned} \\end{equation*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0f0\/b97\/d16\/0f0b97d166a6bc09cdb3566a80a4036f.svg\" width=\"108\" height=\"132\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} v_1 &amp;= v_0 l_1, \\, v_1 \\in \\mathbb{R}^{M \\times 1} \\\\ v_2 &amp;= v_0 l_2, \\, v_2 \\in \\mathbb{R}^{1 \\times N} \\\\ \\end{aligned} \\end{equation*}\" alt=\"\\begin{equation*} \\begin{aligned} v_1 &amp;= v_0 l_1, \\, v_1 \\in \\mathbb{R}^{M \\times 1} \\\\ v_2 &amp;= v_0 l_2, \\, v_2 \\in \\mathbb{R}^{1 \\times N} \\\\ \\end{aligned} \\end{equation*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fc1\/79e\/2f3\/fc179e2f3f59d5e5050a712343e0bd35.svg\" width=\"184\" height=\"51\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} W_1 &amp;= v_1 v_2^T, \\, W_1 \\in \\mathbb{R}^{M \\times N} \\\\ W_2 &amp;= W_1^T l_3^T, \\, W_2 \\in \\mathbb{R}^{N \\times M} \\\\ W_\\delta &amp;= W_2^T l_4^T, \\, W_\\delta \\in \\mathbb{R}^{M \\times N} \\\\ W &amp;= W_0 (1 + W_\\delta) \\end{aligned} \\end{equation*}\" alt=\"\\begin{equation*} \\begin{aligned} W_1 &amp;= v_1 v_2^T, \\, W_1 \\in \\mathbb{R}^{M \\times N} \\\\ W_2 &amp;= W_1^T l_3^T, \\, W_2 \\in \\mathbb{R}^{N \\times M} \\\\ W_\\delta &amp;= W_2^T l_4^T, \\, W_\\delta \\in \\mathbb{R}^{M \\times N} \\\\ W &amp;= W_0 (1 + W_\\delta) \\end{aligned} \\end{equation*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/257\/41e\/0ff\/25741e0ff7d4571e5b431f85738aa25e.svg\" width=\"224\" height=\"111\"\/><\/p>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u0440\u0438 \u0448\u0430\u0433\u0430:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0434\u0432\u0438\u0433\u0430 \u0432\u0435\u0441\u043e\u0432 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u201c\u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d \u0438 word encoder. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0434\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 word encoder. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e 3-5 \u0448\u0430\u0433\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/820\/584\/d88\/820584d88ac35ddfcd77083411f1f2ae.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Encoder for Tuning.\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Encoder for Tuning.\" width=\"1212\" height=\"387\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/820\/584\/d88\/820584d88ac35ddfcd77083411f1f2ae.png\"\/><\/p>\n<div><figcaption><em>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Encoder for Tuning.<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043b\u044e\u0441\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0438\u0437\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u223c1 \u043c\u0438\u043d\u0443\u0442\u0430) \u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u0421\u0440\u0435\u0434\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438 (\u043e\u043a\u043e\u043b\u043e 50 \u0413\u0431) \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 Word Encoder.<\/p>\n<h3>HyperDreamBooth<\/h3>\n<p>\u0412 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u00a0[8] \u043e\u0431 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 DreamBooth \u0430\u0432\u0442\u043e\u0440\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u0441\u043e\u0432. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432: LiDB (Lightweight DreamBooth), HyperNetwork \u0438 Relaxed Fine-tuning.<\/p>\n<p><strong>Lightweight DreamBooth<\/strong><\/p>\n<p>\u041f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 DreamBooth \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0432\u0435\u0441\u043e\u0432: \u043e\u0442 1 \u0434\u043e 3 \u0413\u0431 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u0410\u0432\u0442\u043e\u0440\u044b \u0440\u0435\u0448\u0430\u044e\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 LoRA. \u0422\u0430\u043a, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u0435\u0441\u043e\u0432 W=AB, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u201c\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u0438\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} &amp;W = AB \\\\ &amp;A = A_{\\text{aux}}A_{\\text{train}} \\\\ &amp;B = B_{\\text{train}}B_{\\text{aux}} \\\\ &amp;W = A_{\\text{aux}}A_{\\text{train}}B_{\\text{train}}B_{\\text{aux}} \\end{aligned} \\end{equation*}\" alt=\"\\begin{equation*} \\begin{aligned} &amp;W = AB \\\\ &amp;A = A_{\\text{aux}}A_{\\text{train}} \\\\ &amp;B = B_{\\text{train}}B_{\\text{aux}} \\\\ &amp;W = A_{\\text{aux}}A_{\\text{train}}B_{\\text{train}}B_{\\text{aux}} \\end{aligned} \\end{equation*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/38b\/ed0\/00d\/38bed000dbb8a66a1d877d64078946ed.svg\" width=\"219\" height=\"98\"\/><\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0438\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 a, b, r:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} A_{\\text{aux}} &amp;\\in \\mathbb{R}^{n \\times a} \\\\ A_{\\text{train}} &amp;\\in \\mathbb{R}^{a \\times r} \\\\ B_{\\text{train}} &amp;\\in \\mathbb{R}^{r \\times b} \\\\ B_{\\text{aux}} &amp;\\in \\mathbb{R}^{b \\times m} \\end{aligned} \\end{equation*}\" alt=\"\\begin{equation*} \\begin{aligned} A_{\\text{aux}} &amp;\\in \\mathbb{R}^{n \\times a} \\\\ A_{\\text{train}} &amp;\\in \\mathbb{R}^{a \\times r} \\\\ B_{\\text{train}} &amp;\\in \\mathbb{R}^{r \\times b} \\\\ B_{\\text{aux}} &amp;\\in \\mathbb{R}^{b \\times m} \\end{aligned} \\end{equation*}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6ba\/f2e\/cb3\/6baf2ecb3505a44c8cd0ff3531e3c218.svg\" width=\"119\" height=\"102\"\/><\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b A<sub>train<\/sub> \u0438 B<sub>train<\/sub> \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b A<sub>aux<\/sub> \u0438 B<sub>aux<\/sub> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u043b\u0443\u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u0438 \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0412 \u0441\u0438\u043b\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u043e\u043b\u0443\u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u043d\u043e\u0440\u043c\u0430 \u043c\u0430\u0442\u0440\u0438\u0446 A \u0438 B \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 A<sub>train<\/sub> \u0438 B<sub>train<\/sub>. C\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0437\u0430 \u0441\u0447\u0435\u0442 \u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0435\u0441. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 W\u2208R<sup>5\u00d75<\/sup> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 25 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0422\u043e\u0433\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 LoRA \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432 \u0434\u043e 10 (\u0432\u0441\u0435 \u0432\u0435\u0441\u0430 \u0432 A\u2208R<sup>5\u00d71<\/sup> \u0438 B\u2208R<sup>1\u00d75<\/sup> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u043c\u0438):<\/p>\n<p><img class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} &amp;W = AB, W \\in \\mathbb{R}^{5 \\times 5}, A \\in \\mathbb{R}^{5 \\times 1}, B \\in \\mathbb{R}^{1 \\times 5} \\\\ &amp;5 * 5 = 25 > 5 * 1 + 1 * 5 = 10 \\end{aligned} \\end{equation*}&#187; alt=&#187;\\begin{equation*} \\begin{aligned} &amp;W = AB, W \\in \\mathbb{R}^{5 \\times 5}, A \\in \\mathbb{R}^{5 \\times 1}, B \\in \\mathbb{R}^{1 \\times 5} \\\\ &amp;5 * 5 = 25 > 5 * 1 + 1 * 5 = 10 \\end{aligned} \\end{equation*}&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ed6\/a32\/fe8\/ed6a32fe8e939b51d3e62e919e1a830c.svg&#187; width=&#187;347&#8243; height=&#187;49&#8243;\/><\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435. \u041f\u0443\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c A<sub>train<\/sub>\u2208R<sup>3\u00d71<\/sup>,B<sub>train<\/sub>\u2208R<sup>1\u00d73<\/sup>. \u0412\u0435\u0441\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f:<\/p>\n<p><img class=\"formula\" source=\"\\begin{equation*} \\begin{aligned} &amp;W = A_{aux}A_{train}B_{train}B_{aux} \\\\ &amp;W \\in \\mathbb{R}^{5 \\times 5}, A_{aux} \\in \\mathbb{R}^{5 \\times 3}, A_{train} \\in \\mathbb{R}^{3 \\times 1}, B_{train} \\in \\mathbb{R}^{1 \\times 3} B_{aux} \\in \\mathbb{R}^{3 \\times 5} \\\\ &amp;5 * 5 = 25 > 1 * 3 + 1 * 3 = 6 \\end{aligned} \\end{equation*}&#187; alt=&#187;\\begin{equation*} \\begin{aligned} &amp;W = A_{aux}A_{train}B_{train}B_{aux} \\\\ &amp;W \\in \\mathbb{R}^{5 \\times 5}, A_{aux} \\in \\mathbb{R}^{5 \\times 3}, A_{train} \\in \\mathbb{R}^{3 \\times 1}, B_{train} \\in \\mathbb{R}^{1 \\times 3} B_{aux} \\in \\mathbb{R}^{3 \\times 5} \\\\ &amp;5 * 5 = 25 > 1 * 3 + 1 * 3 = 6 \\end{aligned} \\end{equation*}&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1ff\/937\/133\/1ff9371339496bfdca0690d78e8ad7d9.svg&#187; width=&#187;544&#8243; height=&#187;74&#8243;\/><\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 6 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0442\u0438\u0432 10 \u0434\u043b\u044f LoRa \u0438 25 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b. \u0412 \u0441\u0432\u043e\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 a=100,b=50,r=1: \u0432 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0441\u0430 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 120 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442 \u043f\u0430\u043c\u044f\u0442\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p><strong>HyperNetwork<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02b\/227\/40f\/02b22740fb332953c68fddddffd4920a.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 HyperNetwork.\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 HyperNetwork.\" width=\"2339\" height=\"521\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/02b\/227\/40f\/02b22740fb332953c68fddddffd4920a.png\"\/><\/p>\n<div><figcaption><em>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 HyperNetwork.<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c LiDB \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 self- \u0438 cross-attention \u0441\u043b\u043e\u0435\u0432 \u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a \u03b8 \u0302. \u0412\u0432\u0435\u0434\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c-\u0433\u0438\u043f\u0435\u0440\u0441\u0435\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c A<sub>train<\/sub> \u0438 B<sub>train<\/sub> \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u0438\u0445 \u0432\u0435\u0441\u043e\u0432: \u03b8 \u0302=H(x). \u0427\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0433\u043b\u0430 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, \u043e\u0431\u0443\u0447\u0438\u043c \u0435\u0435 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u043c \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u043d\u0430\u0431\u043e\u0440\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u2013 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, CelebAHQ [14]. \u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 15000 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043b\u0438\u0446.<\/p>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 HyperNetwork \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043b\u0438\u0446\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Visual transformer Encoder (ViT-H) [13]. \u042d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430 (face embedding).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0432\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Transormer Decoder\u00a0[11] \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e K \u0440\u0430\u0437.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0441\u043b\u043e\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 HyperNetwork \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0432 \u0441\u043b\u043e\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c Text Encoder \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u0430 <em>a [tag] face<\/em>. \u041f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u043e\u0431\u044b\u0447\u043d\u043e\u0439 Stable Diffusion \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"L(x) = \\alpha ||D_{\\hat{\\theta}}(x + \\epsilon, c) - x||_2^2 + \\beta||\\hat{\\theta} - \\theta||_2^2\" alt=\"L(x) = \\alpha ||D_{\\hat{\\theta}}(x + \\epsilon, c) - x||_2^2 + \\beta||\\hat{\\theta} - \\theta||_2^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2b\/181\/816\/f2b181816f49ce14fd193a3492699cec.svg\" width=\"351\" height=\"28\"\/><\/p>\n<p>\u0433\u0434\u0435 \u03b1 \u0438 \u03b2 \u2013 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0430 \u03b8 \u2013 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0447\u0438\u0442\u0441\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u03b8 \u0302. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<p><strong>Relaxed Fine-tuning<\/strong><\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0441 HyperNetwork \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0430\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0414\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u044d\u0442\u043e \u043f\u043e\u043b, \u0444\u043e\u0440\u043c\u0430 \u0438 \u0446\u0432\u0435\u0442 \u0432\u043e\u043b\u043e\u0441, \u0446\u0432\u0435\u0442 \u043a\u043e\u0436\u0438 \u0438 \u0442.\u0434.. \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u0438\u043c, \u043c\u0435\u043b\u043a\u0438\u0435 \u0447\u0435\u0440\u0442\u044b \u043b\u0438\u0446\u0430 \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u2013 \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 A<sub>train<\/sub>,B<sub>train<\/sub> \u0434\u043e r=1 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u043e\u0442\u0435\u0440\u0435 \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u043b\u044b \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u0433\u0438\u043f\u0435\u0440\u0441\u0435\u0442\u0438, \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043b\u043e\u0435\u0432 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 LoRA, \u043d\u043e \u0443\u0436\u0435 \u0441 r>1. \u041f\u0440\u0438\u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 40 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 (20-30 \u0441\u0435\u043a\u0443\u043d\u0434) \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u042d\u0442\u043e \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e1d\/016\/09c\/e1d01609c8536269a17bfede41383daa.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 HyperDreamBooth.\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 HyperDreamBooth.\" width=\"820\" height=\"308\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e1d\/016\/09c\/e1d01609c8536269a17bfede41383daa.png\"\/><\/p>\n<div><figcaption><em>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 HyperDreamBooth.<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0440\u0435\u0434\u0438 \u043f\u043b\u044e\u0441\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0438\u0437\u043a\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432, \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041c\u0438\u043d\u0443\u0441\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0433\u0438\u043f\u0435\u0440\u0441\u0435\u0442\u0438.<\/p>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0442\u0440\u0435\u0445 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432: Textual Inversion, DreamBooth, LoRA \u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb6\/5ef\/92d\/bb65ef92d32fe59367c0a20262821942.png\" alt=\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0438\u043b\u044f\u0445 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0438 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.\" title=\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0438\u043b\u044f\u0445 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0438 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.\" width=\"976\" height=\"1012\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb6\/5ef\/92d\/bb65ef92d32fe59367c0a20262821942.png\"\/><\/p>\n<div><figcaption><em>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0438\u043b\u044f\u0445 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0438 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 Encoder for Tuning \u0438 HyperDreamBooth \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435. \u0417\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u043d\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 DreamBooth \u0438 \u0435\u0433\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/bf3\/b36\/f28\/bf3b36f284e49474697331365c543513.jpg\" alt=\"\u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043d\u0430 nVidia Tesla V100 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 (\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f, xformers \u0438 \u0434\u0440.)\" title=\"\u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043d\u0430 nVidia Tesla V100 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 (\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f, xformers \u0438 \u0434\u0440.)\" width=\"955\" height=\"221\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf3\/b36\/f28\/bf3b36f284e49474697331365c543513.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption><em>\u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043d\u0430 nVidia Tesla V100 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 (\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f, xformers \u0438 \u0434\u0440.)<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0434\u0430\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u0435\u0441\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435. Textual Inversion \u0432 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a, \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u044c. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434 LoRA \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u041d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u0438, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 DreamBooth \u0438 LoRA. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Textual Inversion \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0441\u0441\u044b\u043b\u0430\u044e\u0441\u044c. \u0412\u044b\u0434\u0435\u043b\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<h4>\u041d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u0432\u0435\u0441\u043e\u0432 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 Stable Diffusion \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0441\u0430 \u2013 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u043e\u0431\u0449\u0430\u044e\u0449\u0435\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043d\u043e\u0441\u044f\u0442 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<p>DreamBooth \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0435\u0441\u0430 \u0434\u0432\u0443\u0445 \u0438\u0437 \u0442\u0440\u0435\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u2013 UNet \u0438 Text Encoder. \u041d\u043e \u0440\u0438\u0441\u043a \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432.<\/p>\n<h4>\u0414\u043e\u043b\u0433\u043e\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435<\/h4>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0438\u043f\u0435\u0440\u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u043c\u0435\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 Stable Diffusion, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. \u0417\u0430 \u0441\u0447\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<h4>\u0412\u044b\u0441\u043e\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043e\u0431\u044a\u0435\u043c\u0443 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438<\/h4>\n<p>\u0412\u044b\u0441\u043e\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c, \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0441\u043e\u0432.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 xformers\u00a0[15] \u0438 \u0434\u0440., \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u0438.<\/p>\n<h4>\u041f\u043b\u043e\u0445\u043e\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/h4>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043f\u043b\u043e\u0445\u043e\u043c\u0443 \u0437\u0430\u0445\u0432\u0430\u0442\u0443 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u043e\u043a \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 UNet \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<h4>\u0417\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c<\/h4>\n<p>\u0412 \u043d\u0430\u0448\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e \u0441\u0435\u0431\u044f, \u043a\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0434\u0435\u043b\u0430\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c \u043f\u043e\u0445\u043e\u0436\u0435\u0439 \u043d\u0430 \u201c\u043f\u0438\u043b\u0443\u201d, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0421\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 [16].<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0440\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0440\u0435\u0448\u0435\u043d\u0430. \u041d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435. \u042f \u043e\u043f\u0438\u0441\u0430\u043b \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u043f\u0443\u0442\u0438, \u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043b \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u043f\u043e \u0438\u0445 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044e. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0430 \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u0438\u0445 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u0445.<\/p>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432<\/h3>\n<p>[1] Saharia C. et al. Photorealistic text-to-image diffusion models with deep language understanding \/\/Advances in Neural Information Processing Systems. \u2013 2022. \u2013 \u0422. 35. \u2013 \u0421. 36479-36494.<\/p>\n<p>[2] Ramesh A. et al. Hierarchical text-conditional image generation with clip latents \/\/arXiv preprint arXiv:2204.06125. \u2013 2022.<\/p>\n<p>[3] Rombach R. et al. High-resolution image synthesis with latent diffusion models \/\/Proceedings of the IEEE\/CVF conference on computer vision and pattern recognition. \u2013 2022. \u2013 \u0421. 10684-10695.<\/p>\n<p>[4] Gal R. et al. An image is worth one word: Personalizing text-to-image generation using textual inversion \/\/arXiv preprint arXiv:2208.01618. \u2013 2022<\/p>\n<p>[5] Ruiz N. et al. Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation\/\/Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition. \u2013 2023. \u2013 \u0421.22500-22510.<\/p>\n<p>[6] Hu E. J. et al. Lora: Low-rank adaptation of large language models \/\/arXiv preprint arXiv:2106.09685. \u2013 2021.<\/p>\n<p>[7] Gal R. et al. Designing an encoder for fast personalization of text-to-image models \/\/arXiv preprint arXiv:2302.12228. \u2013 2023.<\/p>\n<p>[8] Ruiz N. et al. HyperDreamBooth: HyperNetworks for Fast Personalization of Text-to-Image Models \/\/arXiv preprint arXiv:2307.06949. \u2013 2023.<\/p>\n<p>[9] Song J., Meng C., Ermon S. Denoising diffusion implicit models \/\/arXiv preprint arXiv:2010.02502. \u2013 2020.<\/p>\n<p>[10] Ronneberger O., Fischer P., Brox T. U-net: Convolutional networks for biomedical image segmentation \/\/Medical Image Computing and Computer-Assisted Intervention\u2013MICCAI 2015: 18th International Conference, Munich, Germany, October 5-9, 2015, Proceedings, Part III 18. \u2013 Springer International Publishing, 2015. \u2013 \u0421. 234-241.<\/p>\n<p>[11] Vaswani A. et al. Attention is all you need \/\/Advances in neural information processing systems. \u2013 2017. \u2013 \u0422. 30.<\/p>\n<p>[12] Kirkpatrick J. et al. Overcoming catastrophic forgetting in neural networks \/\/Proceedings of the national academy of sciences. \u2013 2017. \u2013 \u0422. 114. \u2013 \u2116. 13. \u2013 \u0421. 3521-3526.<\/p>\n<p>[13] Dosovitskiy A. et al. An image is worth 16&#215;16 words: Transformers for image recognition at scale \/\/arXiv preprint arXiv:2010.11929. \u2013 2020.<\/p>\n<p>[14] Karras T. et al. Progressive growing of gans for improved quality, stability, and variation \/\/arXiv preprint arXiv:1710.10196. \u2013 2017.<\/p>\n<p>[15] xFormers &#8212; Toolbox to Accelerate Research on Transformers. https:\/\/github.com\/facebookresearch\/xformers<\/p>\n<p>[16] Voronov A. et al. Is This Loss Informative? Speeding Up Textual Inversion with Deterministic Objective Evaluation \/\/arXiv preprint arXiv:2302.04841. \u2013 2023<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/773578\/\"> https:\/\/habr.com\/ru\/articles\/773578\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 text-to-image \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0434\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043c\u043e\u0433\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0445. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u0434\u043b\u044f \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u044f\u0434\u043e\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c: \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u0434\u0440. <\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0421\u0435\u0440\u0433\u0435\u0439 \u041c\u0438\u0445\u0430\u0439\u043b\u0438\u043d. \u042f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0433\u0440\u0443\u043f\u043f\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u041e\u041a. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043e\u0431\u0437\u043e\u0440 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 text-to-image \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Stable Diffision, \u0434\u0435\u043b\u044e\u0441\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u0422\u0430\u043a\u0436\u0435, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 text-to-image \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u044f \u0434\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0417\u0430 \u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 text-to-image \u043c\u043e\u0434\u0435\u043b\u0438 [1, 2, 3]\u00a0\u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0440\u0435\u0437\u043a\u0438\u0439 \u0441\u043a\u0430\u0447\u043e\u043a \u0432 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438, \u0447\u0435\u043c \u0441\u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u044e \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u041c\u043e\u0434\u0435\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0438\u043b\u044f\u0445 \u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0446\u0435\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u2013 \u0434\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c\u0435 \u043a\u043e\u0441\u043c\u043e\u043d\u0430\u0432\u0442\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u0445 \u044d\u0442\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.\u00a0 \u041d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u042f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438: Textual Inversion [4], DreamBooth [5], Low-Rank Adaptation (LoRA) [6], Encoder for Tuning (E4T) [7], HyperDreamBooth [8], \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0438\u0445 \u043f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 Stable Diffusion, \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<h4>\u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<p>\u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 D<sub>\u03b8<\/sub> \u2013 \u044d\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041e\u043d\u0438 \u0443\u0447\u0430\u0442\u0441\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043e\u0447\u0438\u0449\u0430\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u0433\u0430\u0443\u0441\u0441\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <em>x<\/em> \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0448\u0443\u043c, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430 <em>T<\/em> \u0448\u0430\u0433\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u0438:<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0437\u0430\u0448\u0443\u043c\u043b\u044f\u0435\u0442\u0441\u044f <em>x\u2192z<sub>x,t<\/sub><\/em> \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u0448\u0443\u043c\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, DDIM [9]), \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <em>t\u223cU(0,T)<\/em>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 t \u2013 \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043e \u0448\u0443\u043c\u0430:<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <em>z<sub>t<\/sub>\u223cN(0,I)<\/em> \u0438, \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u201c\u043e\u0447\u0438\u0449\u0430\u044f\u201d \u0435\u0433\u043e \u043e\u0442 \u0448\u0443\u043c\u0430, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.  <\/p>\n<h4>Stable Diffusion<\/h4>\n<figure class=\"full-width\">\n<div><figcaption><em>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Stable Diffusion<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Stable Diffusion \u2013 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438. \u041e\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0431\u043b\u043e\u043a\u043e\u0432: Pixel Space, Latent Space, Conditioning. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<ul>\n<li>\n<p><strong>Pixel Space<\/strong>. \u041d\u0430 \u0432\u0445\u043e\u0434 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <em>x<\/em> \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (512\u00d7512). \u041e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c (encoder) \u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (64\u00d764) \u0432 \u043a\u0430\u0440\u0442\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u0434\u0435\u0440 <em>D<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441\u0436\u0430\u0442\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 <em>x: 64\u00d764\u2192512\u00d7512<\/em>.<\/p>\n<\/li>\n<li>\n<p><strong>Latent Space<\/strong>. \u0421\u0436\u0430\u0442\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0448\u0443\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430 <em>T<\/em> \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u044c UNet\u00a0[10] \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u0448\u0443\u043c, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0439 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u0438\u044f <em>timestamp<\/em> \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <em>prompt<\/em> \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0448\u0443\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c <em>T<\/em> \u0440\u0430\u0437. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0439 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u201c\u0448\u0443\u043c\u0430 \u043e\u0442 \u0448\u0443\u043c\u0430\u201d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>Conditioning<\/strong>. \u0411\u043b\u043e\u043a \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. Text-To-Image \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 cross-attention\u00a0[11] \u0441\u043b\u043e\u0438 UNet \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u2013 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<h3>Textual Inversion<\/h3>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0445\u043e\u0434, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u2013 \u044d\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (prompt). \u041d\u0430\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u0447\u0435\u043d\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u201c\u0412\u044b\u0441\u043e\u043a\u0438\u0439 \u043c\u0443\u0436\u0447\u0438\u043d\u0430 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u043e\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0443\u0434\u0440\u044f\u0432\u044b\u0435 \u0432\u043e\u043b\u043e\u0441\u044b, \u0435\u0432\u0440\u043e\u043f\u0435\u0439\u0441\u043a\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u043e\u0441\u0442\u0438, &#8230;\u201d. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e \u043c\u0435\u043b\u043a\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043d\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 Stable Diffusion \u043e\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e 77 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f [4] \u0441\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u044b\u043c. \u042d\u0442\u0443 \u0438\u0434\u0435\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u0439\u0434\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (embedding) \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u0435\u0432\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c Textual Inversion. \u0414\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430 S\u2217 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 v\u2217 \u2013 \u0432 \u043d\u0435\u043c \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.     <\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <em>[tag]<\/em>) \u0438 \u0437\u0430\u0432\u0435\u0434\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0432 Tokenizer. \u042d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c embedding \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e Text Encoder. \u042d\u0442\u043e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u044b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 Text Encoder \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0444\u0440\u0430\u0437\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <em>a photo of [tag]<\/em>. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0440\u0430\u0437\u0443, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443, \u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439: <em>a closeup photo of [tag], a picture of [tag]<\/em> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412\u0430\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0441\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0435\u0432 \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u043e\u0432 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d embedding, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0433 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0435: <em>a photo of [tag] &lt;\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0446\u0435\u043d\u044b><\/em>.<\/p>\n<p>\u041a \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430\u043c textual inversion \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0438 \u043d\u0438\u0437\u043a\u0438\u0439 \u0448\u0430\u043d\u0441 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0420\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0432\u0435\u0441\u043e\u0432 \u043c\u0430\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 8 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0433\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0447\u0430\u0441\u0442\u043e \u201c\u0442\u0435\u0440\u044f\u0435\u0442\u201d \u0434\u0435\u0442\u0430\u043b\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.<\/p>\n<h2>DreamBooth  <\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Textual Inversion \u2013 \u043f\u043b\u043e\u0445\u0430\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0435\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u043e\u0435 \u0438 \u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption><em>\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c DreamBooth<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0430 DreamBooth\u00a0[5] \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u044e \u0441\u0435\u0442\u044c, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0438 \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0445\u043e\u0434 UNet. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u044b, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 Textual Inversion, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430: <em>a photo of [tag] [class]<\/em>, \u0433\u0434\u0435 <em>[tag]<\/em> \u2013 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442, <em>[class]<\/em> \u2013 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0448 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u2013 <em>person<\/em>, \u0434\u043b\u044f \u043a\u043e\u0448\u043a\u0438 \u2013 <em>cat<\/em>. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>[class]<\/em> \u201c\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u201d \u0441\u0435\u0442\u0438 \u0442\u0438\u043f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u2013 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0438 \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u043e\u0439 \u0442\u0435\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u043c, \u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e. \u041f\u0440\u0438\u0447\u0435\u043c, \u0447\u0435\u043c \u201c\u0441\u0438\u043b\u044c\u043d\u0435\u0435\u201d \u0441\u043b\u043e\u0432\u043e (\u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0435\u0435, \u0437\u043d\u0430\u0447\u0438\u043c\u0435\u0435), \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0422\u0430\u043a, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u043e\u043a\u0435\u043d <em>blue (a photo of <\/em><strong><em>blue<\/em><\/strong><em> person)<\/em>, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u043e \u0441\u0438\u043d\u0435\u0433\u043e \u0446\u0432\u0435\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0433\u0430 \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e: \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u2013 \u043a\u0430\u043a \u0432 Textual Inversion.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 D<sub>\u03b8 \u0302<\/sub>, \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f <strong>Prior Preservation Loss<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u043d\u0438\u0435 [12]. \u0418\u0434\u0435\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u0438 \u043f\u0440\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0443 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u0435\u0435:<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 DreamBoth \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u0411\u0435\u0440\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e Stable Diffusion \u0441 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438 D<sub>\u03b8<\/sub>.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u044e\u0431\u043e\u0435 (\u0438\u0437 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435) \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0441\u043b\u043e\u0432\u043e, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0435\u0435 \u043a\u043b\u0430\u0441\u0441 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0430\u0435\u043c \u0444\u0440\u0430\u0437\u0443 c<sub>p<\/sub> \u0432\u0438\u0434\u0430 <em>a photo of [class]<\/em> \u0432 \u043d\u0430\u0448\u0443 \u0441\u0435\u0442\u044c \u0438 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b x<sub>p<\/sub>.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0430\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0435\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 x<sub>t<\/sub> c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c c<sub>t<\/sub> \u0432\u0438\u0434\u0430 <em>a photo of [tag] [class]<\/em> \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 loss-\u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0430\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0435\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043f.4 (x<sub>p<\/sub>, c<sub>p<\/sub>) \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 loss-\u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 (1), \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u0438\u0437 \u043f.6 \u0438 \u043f.7, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0448\u0430\u0433\u0438 6-8 \u0434\u043e \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0438. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u043e\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u00a01300 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u043c<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-360014","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/360014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360014"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/360014\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}