Skip to content

Commit

Permalink
rm abundant arg
Browse files Browse the repository at this point in the history
  • Loading branch information
minux302 committed Nov 29, 2024
1 parent be5860f commit f40632b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions flux_train_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@

import torch
from accelerate import Accelerator
from library.device_utils import init_ipex, clean_memory_on_device

from library.device_utils import clean_memory_on_device, init_ipex

init_ipex()

from library import flux_models, flux_train_utils, flux_utils, sd3_train_utils, strategy_base, strategy_flux, train_util
import train_network
from library import (
flux_models,
flux_train_utils,
flux_utils,
sd3_train_utils,
strategy_base,
strategy_flux,
train_util,
)
from library.utils import setup_logging

setup_logging()
Expand Down Expand Up @@ -125,7 +134,7 @@ def load_target_model(self, args, weight_dtype, accelerator):

ae = flux_utils.load_ae(args.ae, weight_dtype, "cpu", disable_mmap=args.disable_mmap_load_safetensors)

return flux_utils.MODEL_VERSION_FLUX_V1, [clip_l, t5xxl], ae, model, controlnet
return flux_utils.MODEL_VERSION_FLUX_V1, [clip_l, t5xxl], ae, model

def get_tokenize_strategy(self, args):
_, is_schnell, _, _ = flux_utils.analyze_checkpoint_state(args.pretrained_model_name_or_path)
Expand Down

0 comments on commit f40632b

Please sign in to comment.