ChatPaper.aiChatPaper

バックプロパゲーションなしで量子化拡散モデルを効率的にパーソナライズする方法

Efficient Personalization of Quantized Diffusion Model without Backpropagation

March 19, 2025
著者: Hoigi Seo, Wongi Jeong, Kyungryeol Lee, Se Young Chun
cs.AI

要旨

拡散モデルは画像合成において顕著な性能を示していますが、その訓練、ファインチューニング、推論には膨大な計算リソースとメモリが必要です。高度な量子化技術により推論時のメモリ使用量は最小化されましたが、量子化モデルの訓練やファインチューニングでは、勾配の正確な計算や勾配ベースのアルゴリズムのための逆伝播のために、依然として大きなメモリを必要とします。しかし、プライベートデータを扱うモバイル端末などのエッジデバイス上で実行されることが多いパーソナライゼーションのようなアプリケーションでは、メモリ効率の良いファインチューニングが特に望まれます。本研究では、Textual Inversionを用いて拡散モデルを量子化し、ゼロ次最適化を活用してパーソナライゼーショントークンを量子化状態のまま最適化することで、逆伝播に必要な勾配と活性化の保存を不要とし、メモリ使用量を大幅に削減する手法を提案します。パーソナライゼーションにおいて単一または少数の画像に対するゼロ次最適化による勾配推定はノイズが多いため、過去のトークンの履歴を用いて構築された部分空間に勾配を投影することでノイズを除去する「部分空間勾配」を提案します。さらに、テキスト埋め込みが画像生成に与える影響を調査し、効果的な拡散タイムステップをサンプリングするための「部分一様タイムステップサンプリング」を提案します。本手法は、Stable Diffusionのパーソナライゼーションにおいて、従来手法と同等の画像とテキストの整合性スコアを達成しつつ、訓練メモリ要求量を最大8.2倍削減します。
English
Diffusion models have shown remarkable performance in image synthesis, but they demand extensive computational and memory resources for training, fine-tuning and inference. Although advanced quantization techniques have successfully minimized memory usage for inference, training and fine-tuning these quantized models still require large memory possibly due to dequantization for accurate computation of gradients and/or backpropagation for gradient-based algorithms. However, memory-efficient fine-tuning is particularly desirable for applications such as personalization that often must be run on edge devices like mobile phones with private data. In this work, we address this challenge by quantizing a diffusion model with personalization via Textual Inversion and by leveraging a zeroth-order optimization on personalization tokens without dequantization so that it does not require gradient and activation storage for backpropagation that consumes considerable memory. Since a gradient estimation using zeroth-order optimization is quite noisy for a single or a few images in personalization, we propose to denoise the estimated gradient by projecting it onto a subspace that is constructed with the past history of the tokens, dubbed Subspace Gradient. In addition, we investigated the influence of text embedding in image generation, leading to our proposed time steps sampling, dubbed Partial Uniform Timestep Sampling for sampling with effective diffusion timesteps. Our method achieves comparable performance to prior methods in image and text alignment scores for personalizing Stable Diffusion with only forward passes while reducing training memory demand up to 8.2times.

Summary

AI-Generated Summary

PDF202March 20, 2025