Update app.py
Browse files
app.py
CHANGED
|
@@ -107,7 +107,7 @@ class LoRAImageTrainer:
|
|
| 107 |
target_modules=target_modules,
|
| 108 |
lora_dropout=lora_dropout,
|
| 109 |
bias="none",
|
| 110 |
-
task_type=TaskType.
|
| 111 |
)
|
| 112 |
|
| 113 |
def prepare_image_dataset(self, image_files: List[str], captions: List[str], resolution: int = 512) -> List[Dict]:
|
|
@@ -284,7 +284,7 @@ class LoRAImageTrainer:
|
|
| 284 |
"target_modules": lora_config.target_modules,
|
| 285 |
"lora_dropout": lora_dropout,
|
| 286 |
"bias": "none",
|
| 287 |
-
"task_type": "
|
| 288 |
"base_model_name": model_name,
|
| 289 |
"training_info": {
|
| 290 |
"num_epochs": num_epochs,
|
|
|
|
| 107 |
target_modules=target_modules,
|
| 108 |
lora_dropout=lora_dropout,
|
| 109 |
bias="none",
|
| 110 |
+
task_type=TaskType.CAUSAL_LM, # ✅ CORREÇÃO PRINCIPAL: DIFFUSION → CAUSAL_LM
|
| 111 |
)
|
| 112 |
|
| 113 |
def prepare_image_dataset(self, image_files: List[str], captions: List[str], resolution: int = 512) -> List[Dict]:
|
|
|
|
| 284 |
"target_modules": lora_config.target_modules,
|
| 285 |
"lora_dropout": lora_dropout,
|
| 286 |
"bias": "none",
|
| 287 |
+
"task_type": "CAUSAL_LM", # ✅ CORREÇÃO AQUI TAMBÉM: DIFFUSION → CAUSAL_LM
|
| 288 |
"base_model_name": model_name,
|
| 289 |
"training_info": {
|
| 290 |
"num_epochs": num_epochs,
|