ostris / ai-toolkit

Various AI scripts. Mostly Stable Diffusion stuff.
MIT License
3.48k stars 372 forks source link

No FLUX LORA Training No error #112

Open ahgsql opened 3 months ago

ahgsql commented 3 months ago

Did you already ask in the discord?

Yes

You verified that this is a bug and not a feature request or question by asking in the discord?

Yes

The thing is, every config done by double checking, I got model files from huggingface and download them manually and put inside D:\flux-dev folder (54Gb)

configured .yaml file,

When i start to train it says Loading Flux model, then Loading transformer and its done. No error, no output but terminal asking for new input.

(venv) (base) PS D:\ai-toolkit> python run.py config/flux-d-person.yaml Running 1 job D:\ai-toolkit\venv\Lib\site-packages\controlnet_aux\mediapipe_face\mediapipe_face_common.py:7: UserWarning: The module 'mediapipe' is not installed. The package will have limited functionality. Please install it using the command: pip install 'mediapipe' warnings.warn( D:\ai-toolkit\venv\Lib\site-packages\controlnet_aux\segment_anything\modeling\tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_5m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_5m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected. return register_model(fn_wrapper) D:\ai-toolkit\venv\Lib\site-packages\controlnet_aux\segment_anything\modeling\tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_11m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_11m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected. return register_model(fn_wrapper) D:\ai-toolkit\venv\Lib\site-packages\controlnet_aux\segment_anything\modeling\tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected. return register_model(fn_wrapper) D:\ai-toolkit\venv\Lib\site-packages\controlnet_aux\segment_anything\modeling\tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_384 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_384. This is because the name being registered conflicts with an existing name. Please check if this is not expected. return register_model(fn_wrapper) D:\ai-toolkit\venv\Lib\site-packages\controlnet_aux\segment_anything\modeling\tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_512 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_512. This is because the name being registered conflicts with an existing name. Please check if this is not expected. return register_model(fn_wrapper) { "type": "sd_trainer", "training_folder": "output/duy_test", "performance_log_every": 1000, "device": "cuda:0", "trigger_word": "DuyTest", "network": { "type": "lora", "linear": 32, "linear_alpha": 32 }, "save": { "dtype": "float16", "save_every": 250, "max_step_saves_to_keep": 4 }, "datasets": [ { "folder_path": "D:\\faces\\captioned", "caption_ext": "txt", "caption_dropout_rate": 0.05, "shuffle_tokens": false, "cache_latents_to_disk": true, "resolution": [ 512, 768, 1024 ] } ], "train": { "batch_size": 1, "steps": 2000, "gradient_accumulation_steps": 1, "train_unet": true, "train_text_encoder": false, "gradient_checkpointing": true, "noise_scheduler": "flowmatch", "optimizer": "adamw8bit", "lr": 0.0001, "skip_first_sample": true, "linear_timesteps": true, "ema_config": { "use_ema": true, "ema_decay": 0.99 }, "dtype": "bf16" }, "model": { "name_or_path": "D:\\flux-dev", "is_flux": true, "quantize": true }, "sample": { "sampler": "flowmatch", "sample_every": 250, "width": 1024, "height": 1024, "prompts": [ "[trigger] with red hair, playing chess at the park, bomb going off in the background", "a [trigger] holding a coffee cup, in a beanie, sitting at a cafe", "a [trigger] is a DJ at a night club, fish eye lens, smoke machine, lazer lights, holding a martini", "a [trigger] showing off his cool new t shirt at the beach, a shark is jumping out of the water in the background", "a [trigger] building a log cabin in the snow covered mountains", "[trigger] playing the guitar, on stage, singing a song, laser lights, punk rocker", "hipster [trigger] , building a chair, in a wood shop", "photo of a [trigger] , white background, medium shot, modeling clothing, studio lighting, white backdrop", "a [trigger] holding a sign that says, 'this is a sign'", "a [trigger] , in a post apocalyptic world, with a shotgun, in a leather jacket, in a desert, with a motorcycle" ], "neg": "", "seed": 42, "walk_seed": true, "guidance_scale": 4, "sample_steps": 20 } } Using EMA D:\ai-toolkit\extensions_built_in\sd_trainer\SDTrainer.py:61: FutureWarning:torch.cuda.amp.GradScaler(args...)is deprecated. Please usetorch.amp.GradScaler('cuda', args...)` instead. self.scaler = torch.cuda.amp.GradScaler()

#############################################

Running job: duy_test

#############################################

Running 1 process Loading Flux model Loading transformer (venv) (base) PS D:\ai-toolkit>`

derpina-ai commented 3 months ago

"type": "sd_trainer", "training_folder": "output/duy_test",kinda obvious you are missing training folder parameter.