OverflowError: cannot fit 'int' into an index-sized integer
E:\ai-toolkit>python run.py first2 Running 1 job Error running job: Could not find config file first2
======================================== Result:
- 0 completed jobs
- 1 failure
========================================
Traceback (most recent call last):
File "E:\ai-toolkit\run.py", line 90, in
main() File "E:\ai-toolkit\run.py", line 86, in main raise e File "E:\ai-toolkit\run.py", line 77, in main job = get_job(config_file, args.name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\toolkit\job.py", line 10, in get_job config = get_config(config_path, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\toolkit\config.py", line 97, in get_config raise ValueError(f"Could not find config file {config_file_path}") ValueError: Could not find config file first2
E:\ai-toolkit>python run.py first2.yaml Running 1 job { "type": "sd_trainer", "training_folder": "output", "device": "cuda:0", "network": { "type": "lora", "linear": 16, "linear_alpha": 16 }, "save": { "dtype": "float16", "save_every": 250, "max_step_saves_to_keep": 4 }, "datasets": [ { "folder_path": "E:\baza-trenowania\modele-caldari3", "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, "disable_sampling": true, "linear_timesteps": true, "ema_config": { "use_ema": true, "ema_decay": 0.99 }, "dtype": "bf16" }, "model": { "name_or_path": "E://FLUX.1-dev", "is_flux": true, "quantize": true }, "sample": { "sampler": "flowmatch", "sample_every": 1250, "width": 1024, "height": 1024, "prompts": [ "woman with red hair, playing chess at the park, bomb going off in the background", "a woman holding a coffee cup, in a beanie, sitting at a cafe", "a horse is a DJ at a night club, fish eye lens, smoke machine, lazer lights, holding a martini", "a man showing off his cool new t shirt at the beach, a shark is jumping out of the water in the background", "a bear building a log cabin in the snow covered mountains", "woman playing the guitar, on stage, singing a song, laser lights, punk rocker", "hipster man with a beard, building a chair, in a wood shop", "photo of a man, white background, medium shot, modeling clothing, studio lighting, white backdrop", "a man holding a sign that says, 'this is a sign'", "a bulldog, 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
#############################################
Running job: my_first_flux_lora_v1
#############################################
Running 1 process
Loading Flux model
Loading transformer
Quantizing transformer
Loading vae
Loading t5
You set add_prefix_space. The tokenizer needs to be converted from the slow tokenizers
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 6.29it/s]
Quantizing T5
Loading clip
C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: clean_up_tokenization_spaces was not set. It will be set to True by default. This behavior will be depracted in transformers v4.45, and will be then set to False by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
warnings.warn(
making pipe
preparing
create LoRA network. base dim (rank): 16, alpha: 16
neuron dropout: p=None, rank dropout: p=None, module dropout: p=None
create LoRA for Text Encoder: 0 modules.
create LoRA for U-Net: 494 modules.
enable LoRA for U-Net
Dataset: E:\baza-trenowania\modele-caldari3
- Preprocessing image dimensions 100%|██████████████████████████████████████████████████████████████████████████████████████████| 18/18 [00:00<?, ?it/s]
- Found 18 images Bucket sizes for E:\baza-trenowania\modele-caldari3: 576x384: 1 files 384x576: 2 files 512x512: 12 files 576x448: 3 files 4 buckets made Caching latents for E:\baza-trenowania\modele-caldari3
- Saving latents to disk Caching latents to disk: 100%|███████████████████████████████████████████████████████| 18/18 [00:00<00:00, 9002.80it/s] Dataset: E:\baza-trenowania\modele-caldari3
- Preprocessing image dimensions 100%|██████████████████████████████████████████████████████████████████████████████████████████| 18/18 [00:00<?, ?it/s]
- Found 18 images Bucket sizes for E:\baza-trenowania\modele-caldari3: 832x576: 1 files 576x832: 2 files 768x768: 12 files 832x640: 3 files 4 buckets made Caching latents for E:\baza-trenowania\modele-caldari3
- Saving latents to disk Caching latents to disk: 100%|██████████████████████████████████████████████████████| 18/18 [00:00<00:00, 18001.30it/s] Dataset: E:\baza-trenowania\modele-caldari3
- Preprocessing image dimensions 100%|██████████████████████████████████████████████████████████████████████████████████████████| 18/18 [00:00<?, ?it/s]
- Found 18 images Bucket sizes for E:\baza-trenowania\modele-caldari3: 1152x768: 1 files 768x1152: 2 files 1024x1024: 12 files 1152x832: 2 files 1152x896: 1 files 5 buckets made Caching latents for E:\baza-trenowania\modele-caldari3
- Saving latents to disk Caching latents to disk: 100%|██████████████████████████████████████████████████████| 18/18 [00:00<00:00, 17979.87it/s] Skipping first sample due to config setting my_first_flux_lora_v1: 0%| | 0/2000 [00:00<?, ?it/s]Error running job: cannot fit 'int' into an index-sized integer
======================================== Result:
- 0 completed jobs
- 1 failure
========================================
Traceback (most recent call last):
File "E:\ai-toolkit\run.py", line 90, in
main() File "E:\ai-toolkit\run.py", line 86, in main raise e File "E:\ai-toolkit\run.py", line 78, in main job.run() File "E:\ai-toolkit\jobs\ExtensionJob.py", line 22, in run process.run() File "E:\ai-toolkit\jobs\process\BaseSDTrainProcess.py", line 1701, in run loss_dict = self.hook_train_loop(batch) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\extensions_built_in\sd_trainer\SDTrainer.py", line 1207, in hook_train_loop conditional_embeds = self.sd.encode_prompt( ^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\toolkit\stable_diffusion_model.py", line 1904, in encode_prompt prompt_embeds, pooled_prompt_embeds = train_tools.encode_prompts_flux( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\toolkit\train_tools.py", line 536, in encode_prompts_flux text_inputs = tokenizer[0]( ^^^^^^^^^^^^^ File "C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils_base.py", line 3055, in call encodings = self._call_one(text=text, text_pair=text_pair, **all_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils_base.py", line 3142, in _call_one return self.batch_encode_plus( ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils_base.py", line 3338, in batch_encode_plus return self._batch_encode_plus( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils.py", line 886, in _batch_encode_plus batch_outputs = self._batch_prepare_for_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils.py", line 961, in _batch_prepare_for_model batch_outputs = self.pad( ^^^^^^^^^ File "C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils_base.py", line 3547, in pad outputs = self._pad( ^^^^^^^^^^ File "C:\Users\Aderek\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\tokenization_utils_base.py", line 3916, in _pad encoded_inputs["attention_mask"] = encoded_inputs["attention_mask"] + [0] * difference ~~~~^~~~~~~~~~~~ OverflowError: cannot fit 'int' into an index-sized integer
Having the same issue - did you get this resolved?
Not yet...
niedz., 18 sie 2024, 02:12 użytkownik emonk2010 @.***> napisał:
Having the same issue - did you get this resolved?
— Reply to this email directly, view it on GitHub https://github.com/ostris/ai-toolkit/issues/70#issuecomment-2295037130, or unsubscribe https://github.com/notifications/unsubscribe-auth/APTDZ5VZZBVXJ3DSSHJK2GTZR7RFTAVCNFSM6AAAAABMSVWIVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGAZTOMJTGA . You are receiving this because you authored the thread.Message ID: @.***>
clear cache, clear install and not working:
Result:
- 0 completed jobs
- 1 failure
========================================
Traceback (most recent call last):
File "E:\ai-toolkit\run.py", line 90, in
main() File "E:\ai-toolkit\run.py", line 86, in main raise e File "E:\ai-toolkit\run.py", line 78, in main job.run() File "E:\ai-toolkit\jobs\ExtensionJob.py", line 22, in run process.run() File "E:\ai-toolkit\jobs\process\BaseSDTrainProcess.py", line 1701, in run loss_dict = self.hook_train_loop(batch) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\extensions_built_in\sd_trainer\SDTrainer.py", line 1208, in hook_train_loop conditional_embeds = self.sd.encode_prompt( ^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\toolkit\stable_diffusion_model.py", line 1904, in encode_prompt prompt_embeds, pooled_prompt_embeds = train_tools.encode_prompts_flux( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\toolkit\train_tools.py", line 536, in encode_prompts_flux text_inputs = tokenizer[0]( ^^^^^^^^^^^^^ File "E:\ai-toolkit\venv\Lib\site-packages\transformers\tokenization_utils_base.py", line 3055, in call encodings = self._call_one(text=text, text_pair=text_pair, **all_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\venv\Lib\site-packages\transformers\tokenization_utils_base.py", line 3142, in _call_one return self.batch_encode_plus( ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\venv\Lib\site-packages\transformers\tokenization_utils_base.py", line 3338, in batch_encode_plus return self._batch_encode_plus( ^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\venv\Lib\site-packages\transformers\tokenization_utils.py", line 886, in _batch_encode_plus batch_outputs = self._batch_prepare_for_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ai-toolkit\venv\Lib\site-packages\transformers\tokenization_utils.py", line 961, in _batch_prepare_for_model batch_outputs = self.pad( ^^^^^^^^^ File "E:\ai-toolkit\venv\Lib\site-packages\transformers\tokenization_utils_base.py", line 3547, in pad outputs = self._pad( ^^^^^^^^^^ File "E:\ai-toolkit\venv\Lib\site-packages\transformers\tokenization_utils_base.py", line 3916, in _pad encoded_inputs["attention_mask"] = encoded_inputs["attention_mask"] + [0] * difference ~~~~^~~~~~~~~~~~ OverflowError: cannot fit 'int' into an index-sized integer my_first_flux_lora_v1: 0%| | 0/2000 [00:00<?, ?it/s]
(venv) E:\ai-toolkit>
instalation history: 19-08 E:\ai-toolkit>python -m venv venv
E:\ai-toolkit>.\venv\Scripts\activate
pip install python-dotenv pip install oyaml pip install safetensors python -m pip install torch==2.4.0 --index-url https://download.pytorch.org/whl/cu121 (venv) E:\ai-toolkit>pip install diffusers pip install -r requirements.txt Successfully installed PyWavelets-1.7.0 absl-py-2.1.0 accelerate-0.33.0 albucore-0.0.13 albumentations-1.4.14 annotated-types-0.7.0 antlr4-python3-runtime-4.9.3 attrs-24.2.0 bitsandbytes-0.43.3 clean-fid-0.1.35 click-8.1.7 clip-anytorch-2.6.0 controlnet_aux-0.0.7 dctorch-0.1.2 diffusers-0.31.0.dev0 docker-pycreds-0.4.0 einops-0.8.0 eval-type-backport-0.2.0 flatten_json-0.1.14 ftfy-6.2.3 gitdb-4.0.11 gitpython-3.1.43 grpcio-1.65.5 hf_transfer-0.1.8 imageio-2.35.1 invisible-watermark-0.2.0 jsonmerge-1.9.2 jsonschema-4.23.0 jsonschema-specifications-2023.12.1 k-diffusion-0.1.1.post1 kornia-0.7.3 kornia-rs-0.1.5 lazy-loader-0.4 lpips-0.1.4 lycoris-lora-1.8.3 markdown-3.7 ninja-1.11.1.1 numpy-1.26.4 omegaconf-2.3.0 open_clip_torch-2.26.1 opencv-python-4.10.0.84 opencv-python-headless-4.10.0.84 optimum-quanto-0.2.4 platformdirs-4.2.2 prodigyopt-1.0 protobuf-5.27.3 psutil-6.0.0 pydantic-2.8.2 pydantic-core-2.20.1 pytorch_fid-0.3.0 referencing-0.35.1 rpds-py-0.20.0 scikit-image-0.24.0 scipy-1.14.0 sentencepiece-0.2.0 sentry-sdk-2.13.0 setproctitle-1.3.3 six-1.16.0 smmap-5.0.1 tensorboard-2.17.1 tensorboard-data-server-0.7.2 tifffile-2024.8.10 timm-1.0.8 tokenizers-0.19.1 toml-0.10.2 tomli-2.0.1 torchdiffeq-0.2.4 torchsde-0.2.6 torchvision-0.19.0 trampoline-0.1.2 transformers-4.44.0 wandb-0.17.7 wcwidth-0.2.13 werkzeug-3.0.3
pip install mediapipe (venv) E:\ai-toolkit>pip install -U controlnet_aux
Resolved: i was error in name in flux.1-dev downolaed folder.
Resolved: i was error in name in flux.1-dev downolaed folder.