paper-with-me

홈 › Papers

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

2024-06-17 · Alireza Ganjdanesh, Reza Shirkavand, Shangqian Gao, Heng Huang

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.

📄 PDF Abstract BibTeX arXiv:2406.12042

Code (1)

rezashkv/diffusion_pruning 공식 구현 pytorch

Tasks

AllContrastive LearningImage Generation

Methods 이 논문이 사용한 방법론

CLIP Contrastive Language-Image Pre-training (CLIP), consisting of a simplified version of ConVIRT trained from scratch, is an efficient method of image representation learning…
Diffusion Diffusion models generate samples by gradually removing noise from a signal, and their training objective can be expressed as a reweighted variational lower-bound…
Pruning 설명 없음

Similar Papers 제목 키워드 기반

Prompt Selection Matters: Enhancing Text Annotations for Social Sciences with Large Language Models

2024-07-15 · Louis Abraham, Charles Arnal, Antoine Marie

Large Language Models have recently been applied to text annotation tasks from social sciences, equalling or surpassing the performance of human workers at a fraction of the cost. However, no inquiry has yet been made on…

text annotation

Supporting Vision-Language Model Inference with Causality-pruning Knowledge Prompt

2022-05-23 · Jiangmeng Li, Wenyi Mo, Wenwen Qiang, Bing Su 외

Vision-language models are pre-trained by aligning image-text pairs in a common space so that the models can deal with open-set visual concepts by learning semantic information from textual labels. To boost the transfera…

Domain GeneralizationLanguage ModelingLanguage Modelling

Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery

2023-02-07 · NeurIPS 2023 11 · Yuxin Wen, Neel Jain, John Kirchenbauer, Micah Goldblum 외

The strength of modern generative models lies in their ability to be controlled through text-based prompts. Typical "hard" prompts are made from interpretable words and tokens, and must be hand-crafted by humans. There a…

Safety-Potential Pruning for Enhancing Safety Prompts Against VLM Jailbreaking Without Retraining

2026-03-15 · Chongxin Li, Hanzhang Wang, Lian Duan arxiv

Safety prompts constitute an interpretable layer of defense against jailbreak attacks in vision-language models (VLMs); however, their efficacy is constrained by the models' latent structural responsiveness. We observe t…

Model Compression

Heterogeneous Graph Prompt Learning via Adaptive Weight Pruning

2025-07-12 · Chu-Yuan Wei, Shun-Yao Liu, Sheng-Da Zhuo, Chang-Dong Wang 외 arxiv

Graph Neural Networks (GNNs) have achieved remarkable success in various graph-based tasks (e.g., node classification or link prediction). Despite their triumphs, GNNs still face challenges such as long training and infe…

Node ClassificationLink Prediction