Closed ChengMacsaewe closed 11 months ago
This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days
I had the same issue, but the fix mentioned by the original poster fixed it for me as well. Thank you.
Is there an existing issue for this?
What happened?
Train sd1.5 lora, error: File "~/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/ui_functions.py", line 730, in start_training result = main(class_gen_method=class_gen_method) File "~/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1809, in main return inner_loop() File "~/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/memory.py", line 126, in decorator return function(batch_size, grad_size, prof, *args, **kwargs) File "~/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 420, in inner_loop and accelerator.unwrap_model(text_encoder_two).dtype != torch.float32 AttributeError: 'NoneType' object has no attribute 'dtype'
Steps to reproduce the problem
any more
Commit and libraries
any more
Command Line Arguments
Console logs
Additional information
You must check the train model type: Modify this file:dreambooth/train_dreambooth.py +420
The detailed code is as follows: if args.model_type == "SDXL" : ---- Add this line of compatibility model type check ¦ ¦ ¦ if ( ¦ ¦ ¦ ¦ ¦ args.stop_text_encoder != 0 ¦ ¦ ¦ ¦ ¦ and accelerator.unwrap_model(text_encoder_two).dtype != torch.float32 ¦ ¦ ¦ ): ¦ ¦ ¦ ¦ logger.warning( ¦ ¦ ¦ ¦ ¦ f"Text encoder loaded as datatype {accelerator.unwrap_model(text_encoder_two).dtype}." ¦ ¦ ¦ ¦ ¦ f" {low_precision_error_string}" ¦ ¦ ¦ ¦ )