mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
fix: text_encoder_conds referenced before assignment
This commit is contained in:
@@ -1081,12 +1081,12 @@ class NetworkTrainer:
|
|||||||
# print(f"set multiplier: {multipliers}")
|
# print(f"set multiplier: {multipliers}")
|
||||||
accelerator.unwrap_model(network).set_multiplier(multipliers)
|
accelerator.unwrap_model(network).set_multiplier(multipliers)
|
||||||
|
|
||||||
|
text_encoder_conds = []
|
||||||
text_encoder_outputs_list = batch.get("text_encoder_outputs_list", None)
|
text_encoder_outputs_list = batch.get("text_encoder_outputs_list", None)
|
||||||
if text_encoder_outputs_list is not None:
|
if text_encoder_outputs_list is not None:
|
||||||
text_encoder_conds = text_encoder_outputs_list # List of text encoder outputs
|
text_encoder_conds = text_encoder_outputs_list # List of text encoder outputs
|
||||||
if (
|
if (
|
||||||
text_encoder_conds is None
|
len(text_encoder_conds) == 0
|
||||||
or len(text_encoder_conds) == 0
|
|
||||||
or text_encoder_conds[0] is None
|
or text_encoder_conds[0] is None
|
||||||
or train_text_encoder
|
or train_text_encoder
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user