Adaptieve Begeleiding: Trainingsvrije Versnelling van Conditionele Diffusiemodellen
Adaptive Guidance: Training-free Acceleration of Conditional Diffusion Models
December 19, 2023
Auteurs: Angela Castillo, Jonas Kohler, Juan C. Pérez, Juan Pablo Pérez, Albert Pumarola, Bernard Ghanem, Pablo Arbeláez, Ali Thabet
cs.AI
Samenvatting
Dit artikel presenteert een uitgebreide studie over de rol van Classifier-Free Guidance (CFG) in tekstgeconditioneerde diffusiemodellen vanuit het perspectief van inferentie-efficiëntie. In het bijzonder versoepelen we de standaardkeuze om CFG in alle diffusiestappen toe te passen en zoeken we in plaats daarvan naar efficiënte begeleidingsbeleidsregels. We formuleren de ontdekking van dergelijke beleidsregels binnen het differentieerbare Neural Architecture Search-framework. Onze bevindingen suggereren dat de denoiseringsstappen die door CFG worden voorgesteld steeds meer overeenkomen met eenvoudige conditionele stappen, waardoor de extra neurale netwerkevaluatie van CFG overbodig wordt, vooral in de tweede helft van het denoiseringsproces. Op basis van dit inzicht stellen we "Adaptive Guidance" (AG) voor, een efficiënte variant van CFG, die netwerkevaluaties adaptief weglaat wanneer het denoiseringsproces convergentie vertoont. Onze experimenten tonen aan dat AG de beeldkwaliteit van CFG behoudt terwijl de rekenkosten met 25% worden verminderd. AG vormt dus een plug-and-play alternatief voor Guidance Distillation, waarbij 50% van de snelheidswinst van laatstgenoemde wordt bereikt, terwijl het trainingsvrij blijft en de capaciteit behoudt om negatieve prompts te verwerken. Ten slotte ontdekken we verdere redundanties van CFG in de eerste helft van het diffusieproces, waarbij we aantonen dat volledige neurale functie-evaluaties kunnen worden vervangen door eenvoudige affiene transformaties van eerdere schattingen van scores. Deze methode, genaamd LinearAG, biedt nog goedkopere inferentie ten koste van een afwijking van het basismodel. Onze bevindingen bieden inzichten in de efficiëntie van het conditionele denoiseringsproces die bijdragen aan een praktischer en snellere inzet van tekstgeconditioneerde diffusiemodellen.
English
This paper presents a comprehensive study on the role of Classifier-Free
Guidance (CFG) in text-conditioned diffusion models from the perspective of
inference efficiency. In particular, we relax the default choice of applying
CFG in all diffusion steps and instead search for efficient guidance policies.
We formulate the discovery of such policies in the differentiable Neural
Architecture Search framework. Our findings suggest that the denoising steps
proposed by CFG become increasingly aligned with simple conditional steps,
which renders the extra neural network evaluation of CFG redundant, especially
in the second half of the denoising process. Building upon this insight, we
propose "Adaptive Guidance" (AG), an efficient variant of CFG, that adaptively
omits network evaluations when the denoising process displays convergence. Our
experiments demonstrate that AG preserves CFG's image quality while reducing
computation by 25%. Thus, AG constitutes a plug-and-play alternative to
Guidance Distillation, achieving 50% of the speed-ups of the latter while being
training-free and retaining the capacity to handle negative prompts. Finally,
we uncover further redundancies of CFG in the first half of the diffusion
process, showing that entire neural function evaluations can be replaced by
simple affine transformations of past score estimates. This method, termed
LinearAG, offers even cheaper inference at the cost of deviating from the
baseline model. Our findings provide insights into the efficiency of the
conditional denoising process that contribute to more practical and swift
deployment of text-conditioned diffusion models.