Spaces:
Runtime error
Runtime error
update model loading
Browse files- app.py +5 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -30,7 +30,11 @@ def _load_model_processor():
|
|
| 30 |
"black-forest-labs/FLUX.1-Kontext-dev",
|
| 31 |
torch_dtype=torch.bfloat16
|
| 32 |
)
|
| 33 |
-
pipe.load_lora_weights(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
pipe.set_adapters(["edit"], adapter_weights=[1])
|
| 35 |
|
| 36 |
vlm_model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
|
|
|
| 30 |
"black-forest-labs/FLUX.1-Kontext-dev",
|
| 31 |
torch_dtype=torch.bfloat16
|
| 32 |
)
|
| 33 |
+
pipe.load_lora_weights(
|
| 34 |
+
local_lora_dir,
|
| 35 |
+
adapter_name="edit",
|
| 36 |
+
weight_name="pytorch_lora_weights.safetensors"
|
| 37 |
+
)
|
| 38 |
pipe.set_adapters(["edit"], adapter_weights=[1])
|
| 39 |
|
| 40 |
vlm_model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
requirements.txt
CHANGED
|
@@ -12,4 +12,5 @@ torch==2.8.0
|
|
| 12 |
torchaudio==2.8.0
|
| 13 |
torchvision==0.23.0
|
| 14 |
gradio==5.47.2
|
| 15 |
-
sentencepiece
|
|
|
|
|
|
| 12 |
torchaudio==2.8.0
|
| 13 |
torchvision==0.23.0
|
| 14 |
gradio==5.47.2
|
| 15 |
+
sentencepiece
|
| 16 |
+
safetensors
|