Not All Prompts Are Made Equal: Prompt-based Pruning of Text-to-Image Diffusion Models

要約

テキストからイメージ(T2I)拡散モデルは、印象的な画像生成機能を実証しています。
それでも、彼らの計算強度は、リソースに制約のある組織が、内部ターゲットデータで微調整した後、T2Iモデルの展開を禁止しています。
剪定技術は、T2Iモデルの計算負担を減らすための潜在的なソリューションを提供しますが、静的な剪定方法は、さまざまなプロンプトのさまざまな容量要件を見下ろすすべての入力プロンプトに対して同じプルーニングモデルを使用します。
ダイナミックプルーニングは、各プロンプトに個別のサブネットワークを利用することによりこの問題に対処しますが、GPUのバッチ並列性を防ぎます。
これらの制限を克服するために、T2I拡散モデル向けに設計された新しいプロンプトベースの剪定法である適応促進プロンプ型剪定(APTP)を導入します。
私たちのアプローチの中心はプロンプトルーターモデルです。これは、入力テキストプロンプトに必要な容量を決定することを学び、プロンプトの完全な希望の計算予算を考慮して、アーキテクチャコードにルーティングします。
各アーキテクチャコードは、割り当てられたプロンプトに合わせた専門モデルを表し、コードの数はハイパーパラメーターです。
対照学習を使用してプロンプトルーターとアーキテクチャコードをトレーニングし、同様のプロンプトが近くのコードにマッピングされるようにします。
さらに、最適な輸送を使用して、コードが単一のものに崩壊するのを防ぎます。
ターゲットデータセットとしてCC3MとCOCOを使用して、安定した拡散(SD)v2.1を剪定することにより、APTPの有効性を示します。
APTPは、FID、クリップ、およびCMMDスコアに関して、シングルモデル剪定ベースラインよりも優れています。
APTPによって学んだクラスターの分析は、それらが意味的に意味があることを明らかにしています。
また、APTPは、SDの以前に経験的に発見された挑戦的なプロンプトを自動的に発見できることを示しています。
テキストイメージを生成し、それらをより高い容量コードに割り当てるためのプロンプト。

要約(オリジナル)

Text-to-image (T2I) diffusion models have demonstrated impressive image generation capabilities. Still, their computational intensity prohibits resource-constrained organizations from deploying T2I models after fine-tuning them on their internal target data. While pruning techniques offer a potential solution to reduce the computational burden of T2I models, static pruning methods use the same pruned model for all input prompts, overlooking the varying capacity requirements of different prompts. Dynamic pruning addresses this issue by utilizing a separate sub-network for each prompt, but it prevents batch parallelism on GPUs. To overcome these limitations, we introduce Adaptive Prompt-Tailored Pruning (APTP), a novel prompt-based pruning method designed for T2I diffusion models. Central to our approach is a prompt router model, which learns to determine the required capacity for an input text prompt and routes it to an architecture code, given a total desired compute budget for prompts. Each architecture code represents a specialized model tailored to the prompts assigned to it, and the number of codes is a hyperparameter. We train the prompt router and architecture codes using contrastive learning, ensuring that similar prompts are mapped to nearby codes. Further, we employ optimal transport to prevent the codes from collapsing into a single one. We demonstrate APTP’s effectiveness by pruning Stable Diffusion (SD) V2.1 using CC3M and COCO as target datasets. APTP outperforms the single-model pruning baselines in terms of FID, CLIP, and CMMD scores. Our analysis of the clusters learned by APTP reveals they are semantically meaningful. We also show that APTP can automatically discover previously empirically found challenging prompts for SD, e.g. prompts for generating text images, assigning them to higher capacity codes.

arxiv情報

著者 Alireza Ganjdanesh,Reza Shirkavand,Shangqian Gao,Heng Huang
発行日 2025-02-11 15:58:10+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CV, cs.LG パーマリンク