Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: PIECEWISE_CONSTANT #770

Closed
kevinyhj12 opened this issue Sep 14, 2023 · 7 comments
Closed

AttributeError: PIECEWISE_CONSTANT #770

kevinyhj12 opened this issue Sep 14, 2023 · 7 comments

Comments

@kevinyhj12
Copy link

===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
For effortless bug reporting copy-paste your error into this form: https://docs.google.com/forms/d/e/1FAIpQLScPB8emS3Thkp66nvqwmjTEgxp8Y9ufuWTzFyr9kJ5AoI47dQ/viewform?usp=sf_link

CUDA SETUP: Loading binary G:\stable\lora-scripts\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda116.dll...
use 8-bit AdamW optimizer | {}
override steps. steps for 20 epochs is / 指定エポックまでのステップ数: 4200
Traceback (most recent call last):
File "G:\stable\lora-scripts\sd-scripts\train_network.py", line 990, in
trainer.train(args)
File "G:\stable\lora-scripts\sd-scripts\train_network.py", line 353, in train
lr_scheduler = train_util.get_scheduler_fix(args, optimizer, accelerator.num_processes)
File "G:\stable\lora-scripts\sd-scripts\library\train_util.py", line 3659, in get_scheduler_fix
if name == SchedulerType.PIECEWISE_CONSTANT:
File "C:\Program Files\Python310\lib\enum.py", line 437, in getattr
raise AttributeError(name) from None
AttributeError: PIECEWISE_CONSTANT
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "G:\stable\lora-scripts\venv\lib\site-packages\accelerate\commands\launch.py", line 996, in
main()
File "G:\stable\lora-scripts\venv\lib\site-packages\accelerate\commands\launch.py", line 992, in main
launch_command(args)
File "G:\stable\lora-scripts\venv\lib\site-packages\accelerate\commands\launch.py", line 986, in launch_command
simple_launcher(args)
File "G:\stable\lora-scripts\venv\lib\site-packages\accelerate\commands\launch.py", line 628, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['G:\stable\lora-scripts\venv\Scripts\python.exe', './sd-scripts/train_network.py', '--enable_bucket', '--pretrained_model_name_or_path=./sd-models/chilloutmix_NiPrunedFp32Fix.safetensors', '--train_data_dir=./train/test', '--output_dir=./output', '--logging_dir=./logs', '--log_prefix=testout', '--resolution=512,768', '--network_module=networks.lora', '--max_train_epochs=20', '--learning_rate=1e-4', '--unet_lr=1e-4', '--text_encoder_lr=1e-5', '--lr_scheduler=cosine_with_restarts', '--lr_warmup_steps=0', '--lr_scheduler_num_cycles=1', '--network_dim=32', '--network_alpha=32', '--output_name=testout', '--train_batch_size=1', '--save_every_n_epochs=2', '--mixed_precision=fp16', '--save_precision=fp16', '--seed=1337', '--cache_latents', '--prior_loss_weight=1', '--max_token_length=225', '--caption_extension=.txt', '--save_model_as=safetensors', '--min_bucket_reso=256', '--max_bucket_reso=1024', '--keep_tokens=0', '--xformers', '--shuffle_caption', '--clip_skip=2', '--optimizer_type=AdamW8bit', '--log_with=tensorboard']' returned non-zero exit status 1.

@aka7774
Copy link

aka7774 commented Oct 18, 2023

same

@loikp4
Copy link

loikp4 commented Oct 25, 2023

me too

@lc1314555
Copy link

Have somebody solved this problem?Help!

Copy link

github-actions bot commented Jan 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@TimDettmers
Copy link
Owner

This is not a bitsandbytes error. It seems one of your libraries is not up-to-date. Please update your other libraries and try again.

@MOGRAINEREPORTS
Copy link

MOGRAINEREPORTS commented Jan 12, 2024

Necro but for people finding this thread first;

This is not a bitsandbytes error. It seems one of your libraries is not up-to-date. Please update your other libraries and try again.

Correct.

go to .\venv\scripts using cmd write "activate", then "pip install bitsandbytes-windows"

This link has the answer, should work even if you use a different repo for the ./venv/

@Titus-von-Koeller
Copy link
Collaborator

Dear all,

Since the current release (last week, 8th of March) we now have official support for Windows 🎉 (which we did not have before) via

pip install bitsandbytes>=0.43.0

We're closing all old Windows issues and are asking everyone to try installing with this new version as outlined above and validate the install with python -m bitsandbytes which should spit out a bunch of stuff and then SUCCESS. Please let us know if everything worked correctly in this new umbrella / catch-all issue. Thanks 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants