From 0795c3c0295412dc769344c7fed03e3ba4026f55 Mon Sep 17 00:00:00 2001 From: linoytsaban Date: Sat, 11 Jul 2026 11:56:29 +0000 Subject: [PATCH] [lora training] tag krea2 LoRA card with Turbo base model first to enable inference widget --- examples/dreambooth/train_dreambooth_lora_krea2.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/dreambooth/train_dreambooth_lora_krea2.py b/examples/dreambooth/train_dreambooth_lora_krea2.py index 0ac631ea0f54..89ff227fa030 100644 --- a/examples/dreambooth/train_dreambooth_lora_krea2.py +++ b/examples/dreambooth/train_dreambooth_lora_krea2.py @@ -132,6 +132,11 @@ def _is_hub_id(s): if not _is_hub_id(inference_model): inference_model = "krea/Krea-2-Turbo" + # List Turbo first in the card's `base_model` metadata: the Hub keys the Inference Providers + # widget off the first entry, and these LoRAs are served on Turbo — so leading with it enables + # the widget on the pushed LoRA. RAW (the training base) stays linked as the second entry. + card_base_models = [inference_model] + ([card_base_model] if card_base_model != inference_model else []) + model_description = f""" # Krea 2 DreamBooth LoRA - {repo_id} @@ -174,7 +179,7 @@ def _is_hub_id(s): repo_id_or_path=repo_id, from_training=True, license="apache-2.0", - base_model=card_base_model, + base_model=card_base_models, prompt=instance_prompt, model_description=model_description, widget=widget_dict,