Commit ·
09b1e3f
1
Parent(s): 1c0e2b4
merge conflicts
Browse files- gradio_server.py +3 -3
gradio_server.py
CHANGED
|
@@ -1086,7 +1086,7 @@ def generate_video(
|
|
| 1086 |
del wan_model
|
| 1087 |
if offloadobj is not None:
|
| 1088 |
offloadobj.release()
|
| 1089 |
-
|
| 1090 |
gc.collect()
|
| 1091 |
print(f"Loading model {get_model_name(file_model_needed)}...")
|
| 1092 |
wan_model, offloadobj, trans = load_models(image2video)
|
|
@@ -1197,8 +1197,8 @@ def generate_video(
|
|
| 1197 |
if len(list_mult_choices_nums ) < len(loras_choices):
|
| 1198 |
list_mult_choices_nums += [1.0] * ( len(loras_choices) - len(list_mult_choices_nums ) )
|
| 1199 |
loras_selected = [ lora for i, lora in enumerate(loras) if str(i) in loras_choices]
|
| 1200 |
-
pinnedLora = False #profile !=5 #False # # #
|
| 1201 |
-
offload.load_loras_into_model(trans, loras_selected, list_mult_choices_nums, activate_all_loras=True, preprocess_sd=preprocess_loras, pinnedLora=pinnedLora, split_linear_modules_map = None)
|
| 1202 |
errors = trans._loras_errors
|
| 1203 |
if len(errors) > 0:
|
| 1204 |
error_files = [msg for _ , msg in errors]
|
|
|
|
| 1086 |
del wan_model
|
| 1087 |
if offloadobj is not None:
|
| 1088 |
offloadobj.release()
|
| 1089 |
+
del offloadobj
|
| 1090 |
gc.collect()
|
| 1091 |
print(f"Loading model {get_model_name(file_model_needed)}...")
|
| 1092 |
wan_model, offloadobj, trans = load_models(image2video)
|
|
|
|
| 1197 |
if len(list_mult_choices_nums ) < len(loras_choices):
|
| 1198 |
list_mult_choices_nums += [1.0] * ( len(loras_choices) - len(list_mult_choices_nums ) )
|
| 1199 |
loras_selected = [ lora for i, lora in enumerate(loras) if str(i) in loras_choices]
|
| 1200 |
+
pinnedLora = False #profile !=5 #False # # #
|
| 1201 |
+
offload.load_loras_into_model(trans, loras_selected, list_mult_choices_nums, activate_all_loras=True, preprocess_sd=preprocess_loras, pinnedLora=pinnedLora, split_linear_modules_map = None)
|
| 1202 |
errors = trans._loras_errors
|
| 1203 |
if len(errors) > 0:
|
| 1204 |
error_files = [msg for _ , msg in errors]
|