


The powerful combination of diffusion + super-resolution models, the technology behind Google's image generator Imagen
In recent years, multimodal learning has received attention, especially in the two directions of text-image synthesis and image-text contrastive learning. Some AI models have attracted widespread public attention due to their application in creative image generation and editing, such as the text image models DALL・E and DALL-E 2 launched by OpenAI, and NVIDIA's GauGAN and GauGAN2.
Not to be outdone, Google released its own text-to-image model Imagen at the end of May, which seems to further expand the boundaries of caption-conditional image generation.
Given just a description of a scene, Imagen can generate high-quality, high-resolution images, regardless of whether the scene makes sense in the real world. The following figure shows several examples of Imagen text-generated images, with corresponding subtitles displayed below the image.
These impressive generated images make you wonder: How does Imagen work?
Recently, developer lecturer Ryan O'Connor wrote a long article "How Imagen Actually Works" on the AssemblyAI blog, explaining in detail the working principle of Imagen, giving an overview of Imagen, analyzing and understanding its High-level components and the relationships between them.
Overview of Imagen's working principle
In this part, the author shows the overall architecture of Imagen and gives a high-level explanation of other working principles; and then analyzes each of Imagen's features more thoroughly in turn. components. The following animation shows the workflow of Imagen.
First, input the subtitles into the text encoder. This encoder converts text subtitles into numerical representations that encapsulate semantic information in the text. The text encoder in Imagen is a Transformer encoder, which ensures that the text encoding understands how the words in the subtitles relate to each other, using self-attention methods.
If Imagen only focuses on individual words rather than the associations between them, although high-quality images capable of capturing individual elements of subtitles can be obtained, describing these images cannot reflect the subtitle semantics in an appropriate manner. As shown in the example below, if the association between words is not considered, a completely different generation effect will occur.
Although the text encoder generates a useful representation for Imagen's subtitle input, a method still needs to be devised to generate images that use this representation, that is, Image Generator. To do this, Imagen uses the diffusion model, a generative model that has gained popularity in recent years thanks to its SOTA performance on multiple tasks.
The diffusion model destroys the training data by adding noise to achieve training, and then learns to recover the data by reversing this noise process. Given an input image, the diffusion model will iteratively corrupt the image with Gaussian noise over a series of time steps, eventually leaving Gaussian noise or TV static. The following figure shows the iterative noise process of the diffusion model:
The diffusion model will then work backwards, learning how to isolate and eliminate the noise at each time step, canceling out what just happened the destruction process. After training is complete, the model can be split into two. In this way, you can start from randomly sampling Gaussian noise and use a diffusion model to gradually denoise to generate an image, as shown in the following figure:
Подводя итог, можно сказать, что обученная модель диффузии начинается с гауссовского шума, а затем итеративно генерирует изображения, аналогичные обучающим изображениям. Очевидно, что нет никакого контроля над фактическим выводом изображения: просто введите в модель гауссов шум, и она выведет случайное изображение, которое выглядит так, как будто оно принадлежит набору обучающих данных. Однако
цель состоит в том, чтобы создать изображения, которые инкапсулируют семантическую информацию субтитров, входящую в Imagen, поэтому необходим способ включения субтитров в процесс распространения. Как это сделать? Как упоминалось выше, кодировщик текста создает репрезентативную кодировку субтитров, которая на самом деле представляет собой векторную последовательность. Чтобы внедрить эту закодированную информацию в модель диффузии,
эти векторы объединяются вместе, и модель диффузии корректируется на их основе. Регулируя этот вектор, модель диффузии учится настраивать процесс шумоподавления для создания изображений, которые хорошо соответствуют субтитрам. Визуализация процесса показана ниже:
Поскольку генератор изображений или базовая модель выводит небольшое изображение размером 64x64, чтобы повысить частоту этой модели до окончательной версии 1024x1024,
Интеллектуальное повышение разрешения изображений с использованием моделей сверхвысокого разрешения.
Для модели сверхвысокого разрешения Imagen снова использует модель диффузии. Общий процесс в основном такой же, как и в базовой модели, за исключением того, что он настраивается исключительно на основе кодирования субтитров, а также с повышением разрешения изображений меньшего размера. Визуализация всего процесса выглядит следующим образом:
Вывод этой модели со сверхвысоким разрешением на самом деле не является конечным результатом, а изображением среднего размера
. Чтобы масштабировать это изображение до окончательного разрешения 1024x1024, используется другая модель сверхвысокого разрешения. Две архитектуры сверхвысокого разрешения примерно одинаковы, поэтому они не будут описываться снова. Результат второй модели сверхвысокого разрешения является окончательным результатом Imagen.
Почему Imagen лучше, чем DALL-E 2?
Точно ответить, почему Imagen лучше, чем DALL-E 2, сложно. Однако значительная часть разницы в производительности связана с различиями в субтитрах и репликах. DALL-E 2 использует контрастные цели, чтобы определить, насколько тесно текстовые кодировки связаны с изображениями (по сути, CLIP). Кодеры текста и изображения корректируют свои параметры таким образом, чтобы косинусное подобие аналогичных пар субтитр-изображение было максимальным, в то время как косинусное подобие несходных пар субтитр-изображение было минимизировано.
Значительная часть разницы в производительности связана с тем, что текстовый кодер Imagen намного больше и обучен на большем количестве данных, чем текстовый кодер DALL-E 2. В качестве доказательства этой гипотезы мы можем изучить производительность Imagen при масштабировании кодировщика текста. Вот кривая Парето для производительности Imagen:
Эффект от масштабирования текстовых кодировщиков на удивление высок, тогда как эффект от масштабирования U-Net на удивление низок. Этот результат показывает, что относительно простые модели диффузии могут давать высококачественные результаты, если они обусловлены строгим кодированием.
Учитывая, что текстовый кодер T5 намного больше, чем текстовый кодер CLIP, а также тот факт, что данные для обучения естественному языку обязательно богаче, чем пары «изображение-подпись», большая часть разницы в производительности, вероятно, связана с этой разницей. .
###Кроме того, автор также перечисляет несколько ключевых моментов Imagen, в том числе следующие: ###- Расширение кодировщика текста очень эффективно;
- Расширение кодировщика текста более важно, чем увеличение размера U-Net;
- Динамическое пороговое определение имеет решающее значение;
- Улучшение условий шума имеет решающее значение в моделях сверхвысокого разрешения;
- Очень важно использовать перекрестное внимание для обработки текста;
- Эффективная U-Net имеет решающее значение.
Эти идеи дают ценные указания для исследователей, работающих над моделями диффузии, которые полезны не только в области преобразования текста в изображение.
The above is the detailed content of The powerful combination of diffusion + super-resolution models, the technology behind Google's image generator Imagen. For more information, please follow other related articles on the PHP Chinese website!

Running large language models at home with ease: LM Studio User Guide In recent years, advances in software and hardware have made it possible to run large language models (LLMs) on personal computers. LM Studio is an excellent tool to make this process easy and convenient. This article will dive into how to run LLM locally using LM Studio, covering key steps, potential challenges, and the benefits of having LLM locally. Whether you are a tech enthusiast or are curious about the latest AI technologies, this guide will provide valuable insights and practical tips. Let's get started! Overview Understand the basic requirements for running LLM locally. Set up LM Studi on your computer

Guy Peri is McCormick’s Chief Information and Digital Officer. Though only seven months into his role, Peri is rapidly advancing a comprehensive transformation of the company’s digital capabilities. His career-long focus on data and analytics informs

Introduction Artificial intelligence (AI) is evolving to understand not just words, but also emotions, responding with a human touch. This sophisticated interaction is crucial in the rapidly advancing field of AI and natural language processing. Th

Introduction In today's data-centric world, leveraging advanced AI technologies is crucial for businesses seeking a competitive edge and enhanced efficiency. A range of powerful tools empowers data scientists, analysts, and developers to build, depl

This week's AI landscape exploded with groundbreaking releases from industry giants like OpenAI, Mistral AI, NVIDIA, DeepSeek, and Hugging Face. These new models promise increased power, affordability, and accessibility, fueled by advancements in tr

But the company’s Android app, which offers not only search capabilities but also acts as an AI assistant, is riddled with a host of security issues that could expose its users to data theft, account takeovers and impersonation attacks from malicious

You can look at what’s happening in conferences and at trade shows. You can ask engineers what they’re doing, or consult with a CEO. Everywhere you look, things are changing at breakneck speed. Engineers, and Non-Engineers What’s the difference be

Simulate Rocket Launches with RocketPy: A Comprehensive Guide This article guides you through simulating high-power rocket launches using RocketPy, a powerful Python library. We'll cover everything from defining rocket components to analyzing simula


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Atom editor mac version download
The most popular open source editor