【UniControl】ControlNetの進化版?UniControlというのをとりあえず使ってみました。

github.com

はじめに

「UniControl」というものを使ってみました。

通常のControlNetとの違いがいまいちわかりません。

下に紹介文を貼っておきます。

Introduction

原文そのまま

We introduce UniControl, a new generative foundation model that consolidates a wide array of controllable condition-to-image (C2I) tasks within a singular framework, while still allowing for arbitrary language prompts. UniControl enables pixel-level-precise image generation, where visual conditions primarily influence the generated structures and language prompts guide the style and context. To equip UniControl with the capacity to handle diverse visual conditions, we augment pretrained text-to-image diffusion models and introduce a task-aware HyperNet to modulate the diffusion models, enabling the adaptation to different C2I tasks simultaneously. Experimental results show that UniControl often surpasses the performance of single-task-controlled methods of comparable model sizes. This control versatility positions UniControl as a significant advancement in the realm of controllable visual generation.

DeepLで翻訳

UniControlは、制御可能な様々なC2Iタスクを単一のフレームワークに統合し、かつ任意の言語プロンプトを可能にする新しい生成基礎モデルであることを紹介します。UniControlは、視覚条件が主に生成構造に影響を与え、言語プロンプトがスタイルとコンテキストをガイドする、ピクセルレベルの高精度な画像生成を可能にします。UniControlに多様な視覚条件を扱う能力を持たせるため、事前に訓練したテキストから画像への拡散モデルを増強し、拡散モデルを調整するためにタスクを意識したハイパーネットを導入し、同時に異なるC2Iタスクへの適応を可能にする。実験結果は、UniControlが、同程度のモデルサイズの単一タスク制御手法の性能を上回ることが多いことを示している。この制御の多様性により、UniControlは制御可能な視覚生成の領域における重要な進歩であると位置づけられる。

環境構築

Ubuntu 22.04 on WSL2 
Python 3.10
CUDA 11.7



Python環境の構築方法は自身のGitHubに載せました。
github.com

事前準備

学習済みモデルをダウンロードする必要があります。

git clone https://github.com/salesforce/UniControl
cd UniControl/ckpts
wget https://storage.googleapis.com/sfr-unicontrol-data-research/unicontrol.ckpt 

実行

その前に

「app」フォルダ内にある「gradio_all_tasks.py」の最終行を変更しないとうまく動きませんでした。

修正前

demo.launch(share=True, server_name='0.0.0.0')

修正後

demo.launch()

いざ実行

python app/gradio_all_tasks.py




このエントリーをはてなブックマークに追加