SıradakiSonraki rehber
Multimodal Modellerle Konuşmalı Görüntü Düzenleme
Görsel Yapay Zeka
Görsel Yapay Zeka KILAVUZU
LoRA sliders, introduced as Concept Sliders by researchers at Northeastern University and MIT in November 2023, are small low-rank adapters that give a diffusion image model a continuous dial for one attribute, such as age, smile or weather.
Bu kılavuzu dinleyinAI tarafından anlatılan · ~8 min
Turning the adapter's strength up or down strengthens or reverses the attribute while trying to leave the rest of the image unchanged, and dozens of sliders can be combined.
A text-to-image diffusion model such as Stable Diffusion XL makes a picture by starting from random noise and removing it step by step, guided by a text prompt. Prompts are a blunt control. Asking for a slightly older person usually changes the face, the pose and the background along with the age, because small prompt changes can produce a very different image from the same random seed. A LoRA slider is a way to get a smooth, targeted dial instead: a small add-on to the model's weights that pushes one attribute up or down by an amount the user chooses, ideally with everything else held still.
The add-on is a LoRA, short for low-rank adaptation, a technique published by Edward Hu and colleagues in June 2021 for cheaply fine-tuning large language models. Instead of changing a full weight matrix W0, LoRA learns an update written as the product of two thin matrices, B times A, whose inner dimension, the rank, is small, such as 4. The original paper reported that, compared with full fine-tuning of GPT-3 175B, LoRA cuts trainable parameters by about 10,000 times and GPU memory by about 3 times, and adds no inference latency because the update can be merged into the original weights. The update is multiplied by a scale factor when it is applied, and that scale is the slider: 0 leaves the model unchanged, positive values apply the learned edit, and negative values apply it in reverse.
Concept Sliders, the method that made this idea well known, was posted to arXiv in November 2023 by Rohit Gandikota, Joanna Materzynska, Tingrui Zhou, Antonio Torralba and David Bau, of Northeastern University, MIT and an independent researcher, and published at ECCV 2024. Training a text slider needs only prompts: a target concept, such as person, and two opposing attributes, such as old and young. The frozen original model is asked to predict noise for each, and the method builds a training target that is the model's normal prediction for person, shifted toward old and away from young by a guidance strength. The LoRA is trained so that, given only the prompt person, the adapted model produces that shifted prediction. In effect, the slider learns to apply a classifier-free-guidance style push permanently, inside the weights.
Two additions make the edits cleaner. First, a single prompt pair can pick up unwanted attributes, so the method adds preservation concepts: when training an age slider, the authors repeat the objective over prompts naming different races, so the slider learns age without shifting ethnicity. The official code exposes this as an attributes option, for example male and female for an age slider. Second, the low rank itself acts as a constraint. The authors report that fine-tuning without the low-rank restriction reduced both edit precision and image quality, while low-rank training found a minimal subspace for the concept.
Sliders can also be defined from images. Given small sets of before and after pictures, the method trains the slider to reproduce the difference between paired images, which lets an artist define a direction by example, or lets the authors transfer a direction found in StyleGAN, an older face-generation model with well-studied editable directions, into Stable Diffusion. At generation time, the authors follow a technique called SDEdit: the first denoising steps run with the slider switched off, so the overall layout is set by the original model, and the slider is applied for the remaining steps, which keeps the edited image structurally close to the unedited one.
Compared with alternatives, sliders trade setup cost for convenience at use time. Prompt editing needs no training but changes too much. Image-editing methods such as Prompt-to-Prompt change cross-attention for one image and need a separate pass for each new edit; the paper reports that its sliders achieve comparable CLIP-score changes, a measure of how well the image matches the requested edit, with smaller LPIPS distance, a measure of perceptual change, from the original image. Once trained, a slider is a small file that works in a single generation pass, can be scaled continuously and can be combined with others.
The limitations are stated in the paper. Disentanglement is imperfect: the authors observed residual effects on other attributes, and sliders trained on a single prompt pair were sometimes entangled with unintended directions. Each slider is tied to the base model it was trained on, so a Stable Diffusion XL slider does not work on another model family, and the project's own repository describes its FLUX.1 support as experimental, with results that may not match SDXL. The fix-hands slider reduced but did not eliminate hand errors, from 62% to 22% in the study. Like any image-editing tool, sliders for faces and bodies can be used to alter images of real people, so the usual consent questions apply.
In practice, the code, data and trained sliders are public through the project site and GitHub repository, along with notebooks for Stable Diffusion 1.x and XL and an inference demo. Training a text slider requires writing a short configuration of target, positive, negative and neutral prompts with settings such as rank 4 and alpha 1, and a GPU that can run the base model.
04Çalışılan örnek
Write a configuration with target person, positive old, negative young, and preservation attributes such as male and female.
Train a rank 4 LoRA on Stable Diffusion XL with the official text-slider script, keeping the base model frozen.
Generate an image of a barista with a fixed random seed and the slider scale at 0 as the baseline.
Regenerate with the same seed at scales of minus 2, minus 1, plus 1 and plus 2, keeping the slider off for the first denoising steps.
Lay the five images side by side and check that age changes steadily while pose, clothing and background stay the same.
Note any drift in other attributes, such as skin tone or gender presentation, and add preservation prompts if it appears.
Ne gösteriyor?
The learner gets a row of images showing one person aging smoothly from younger to older under a single control. A good slider shows monotonic change in age with little change elsewhere; visible drift in unrelated features is the entanglement the paper's preservation concepts are designed to reduce.
Text-defined attributes: the Concept Sliders paper trains sliders for age, hair, weather, styles and expressions from prompt pairs such as old versus young, and moving a slider negative produces the opposite effect on the same image.
Fixing hands: in a user study of Stable Diffusion XL images, raters judged 62% of 150 unedited images to have distorted hands, compared with 22% of 150 images made with the paper's fix-hands slider.
General repair: across 300 image pairs, raters preferred the output of the paper's repair slider as having fewer artifacts 80.39% of the time, addressing problems such as warped objects.
Edits that are hard to describe in words: the authors transferred directions from StyleGAN's style space, trained on face photos, into diffusion sliders, and trained image-pair sliders for fine attributes such as eyebrow shape and eye size.
Stacking controls: the paper reports that more than 50 unique sliders can be composed at once without degrading output quality, so a user can adjust several attributes in one generation pass.
Concept Sliders turned a fine-tuning technique into an interface idea: one adapter per attribute, each with a dial. The project's own follow-up, SliderSpace, aims to discover sliders automatically, extracting many control directions from a single prompt without manual prompt pairs, which addresses the cost of designing each slider by hand. The official repository has also added experimental support for the FLUX.1 model family and links community integrations such as ControlNet, showing the approach moving to newer base models. Open problems are mostly about reliability. The authors report residual interference between attributes, and entanglement grows harder to detect when sliders are stacked; the paper reports 50 or more sliders composing without quality loss, but which combinations stay disentangled is not fully characterized. Each slider must be retrained for every new base model, and directions found in one model family may not exist in the same form in another. Measuring whether an edit changed only the intended attribute still relies on a mix of automatic scores such as CLIP and LPIPS and human studies. There is also a question of what attributes should be offered. Sliders for age, body shape or ethnicity-related features raise fairness and consent concerns when applied to images of real people, and the paper's use of preservation concepts to keep such attributes stable during other edits is one example of treating them deliberately rather than as side effects.
Ücretsiz bülten
Hafta içi her sabah sade İngilizce yazılmış, doğrulanmış üç yapay zeka hikayesi. Sonsuza kadar ücretsiz, reklam yok.
Hafta içi her gün bir e-posta. Tek tıklamayla aboneliğinizi iptal edin. Adresinizi asla satmayız veya paylaşmayız.
Kendinizi test edin
Her yanıtla ilgili anında geri bildirim ve bir kursu geçtiğinizde doğrulanabilir bir kimliğe sahip paylaşılabilir bir sertifika.
Ücretsiz AI eğitimini destekleyin. AI Understanding, bir 501(c)(3) kâr amacı gütmeyen kuruluştur; hiçbir zaman reklam yoktur, ödeme duvarı yoktur. Bağış yap
LoRA sliders, introduced as Concept Sliders by researchers at Northeastern University and MIT in November 2023, are small low-rank adapters that give a diffusion image model a continuous dial for one attribute, such as age, smile or weather. Turning the adapter's strength up or down strengthens or reverses the attribute while trying to leave the rest of the image unchanged, and dozens of sliders can be combined.
LoRA, ağırlık güncellemelerini iki küçük düşük dereceli matris olan A ve B'nin ürünü olarak temsil eder ve bu, tam ağırlık matrisinin güncellenmesinden çok daha ucuzdur.
Each slider is a separate low-rank adapter applied to the frozen base model, and the paper demonstrates composing multiple sliders in its evaluated settings. Stacking behavior can depend on the model and implementation.
Kaydırıcı skaler öğrenilen bir kavramın yönünü çarpar, böylece daha büyük pozitif değerler özelliği daha yoğun bir şekilde ifade eder.
The Concept Sliders paper reports composing over 50 unique sliders without degrading output quality in its evaluated setup. The result is scoped to that paper and model setting.
Concept Sliders, bireysel niteliklere bağlı düşük dereceli yönleri eğitir ve çıkarımda bir güç kadranı olarak gösterilir.
Öğrenmeye devam et
Bu konu için daha fazla rehber seçildi
SıradakiSonraki rehber
Multimodal Modellerle Konuşmalı Görüntü Düzenleme
Görsel Yapay Zeka