bitsandbytes-foundation / bitsandbytes

Accessible large language models via k-bit quantization for PyTorch.
https://huggingface.co/docs/bitsandbytes/main/en/index
MIT License
6.28k stars 630 forks source link

About this error content #368

Closed ruiboy1919 closed 1 year ago

ruiboy1919 commented 1 year ago

G:\kohya_ss\venv\lib\site-packages\accelerate\accelerator.py:249: FutureWarning: logging_dir is deprecated and will be removed in version 0.18.0 of πŸ€— Accelerate. Use project_dir instead.

warnings.warn( Using accelerator 0.15.0 or above. loading model for process 0/1 load Diffusers pretrained models safety_checker\model.safetensors not found Fetching 19 files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 19/19 [00:00<00:00, 18808.54it/s] You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . Replace CrossAttention.forward to use xformers import network module: networks.lora create LoRA network. base dim (rank): 32, alpha: 16.0 create LoRA for Text Encoder: 72 modules. create LoRA for U-Net: 192 modules. enable LoRA for text encoder enable LoRA for U-Net prepare optimizer, data loader etc.

===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes

and submit this information together with your error trace to: https://github.com/TimDettmers/bitsandbytes/issues

bin G:\kohya_ss\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda116.dll G:\kohya_ss\venv\lib\site-packages\bitsandbytes\cuda_setup\main.py:152: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('G:/kohya_ss/venv/Lib/site-packages/cv2/../../x64/vc14/bin')} warn(msg) CUDA SETUP: CUDA runtime path found: G:\kohya_ss\venv\Lib\site-packages\torch\lib\cudart64_110.dll CUDA SETUP: Highest compute capability among GPUs detected: 8.6 CUDA SETUP: Detected CUDA version 116 CUDA SETUP: Loading binary G:\kohya_ss\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda116.dll... use 8-bit AdamW optimizer | {} Traceback (most recent call last): File "G:\kohya_ss\train_network.py", line 773, in train(args) File "G:\kohya_ss\train_network.py", line 217, in train train_dataloader = torch.utils.data.DataLoader( File "G:\kohya_ss\venv\lib\site-packages\torch\utils\data\dataloader.py", line 241, in init raise ValueError('persistent_workers option needs num_workers > 0') ValueError: persistent_workers option needs num_workers > 0 Traceback (most recent call last): File "C:\Users\rui\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\rui\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "G:\kohya_ss\venv\Scripts\accelerate.exe__main__.py", line 7, in File "G:\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 45, in main args.func(args) File "G:\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 923, in launch_command simple_launcher(args) File "G:\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 579, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['G:\kohya_ss\venv\Scripts\python.exe', 'train_network.py', '--enable_bucket', '--pretrained_model_name_or_path=runwayml/stable-diffusion-v1-5', '--train_data_dir=G:\AI\training_images', '--resolution=512,512', '--output_dir=G:\AI\output_folder', '--logging_dir=G:\AI\training_log', '--network_alpha=16', '--save_model_as=safetensors', '--network_module=networks.lora', '--text_encoder_lr=5e-05', '--unet_lr=0.0001', '--network_dim=32', '--output_name=melonav1', '--lr_scheduler_num_cycles=60', '--learning_rate=0.0001', '--lr_scheduler=constant_with_warmup', '--lr_warmup_steps=900', '--train_batch_size=1', '--max_train_steps=9000', '--save_every_n_epochs=1', '--mixed_precision=fp16', '--save_precision=fp16', '--seed=1234', '--caption_extension=.txt', '--optimizer_type=AdamW8bit', '--max_data_loader_n_workers=0', '--bucket_reso_steps=64', '--color_aug', '--flip_aug', '--shuffle_caption', '--xformers', '--persistent_data_loader_workers', '--bucket_no_upscale', '--noise_offset=0.05']' returned non-zero exit status 1.

Does anyone know what is wrong with it? Please advise.

swumagic commented 1 year ago

Bitsandbytes was not supported windows before, but my method can support windows.(yuhuangοΌ‰ 1 open folder J:\StableDiffusion\sdwebui,Click the address bar of the folder and enter CMD or WIN+R, CMD 。enter,cd /d J:\StableDiffusion\sdwebui 2 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes

3 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes-windows

4 J:\StableDiffusion\sdwebui\py310\python.exe -m pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.1-py3-none-win_amd64.whl

Replace your SD venv directory file(python.exe FolderοΌ‰ here(J:\StableDiffusion\sdwebui\py310οΌ‰