ostris / ai-toolkit

Various AI scripts. Mostly Stable Diffusion stuff.
MIT License
3.29k stars 336 forks source link

OverflowError: cannot fit 'int' into an index-sized integer #70

Closed Aderek514 closed 2 months ago

Aderek514 commented 2 months ago

E:\ai-toolkit>python run.py first2 Running 1 job Error running job: Could not find config file first2

======================================== Result:

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

======================================== Result:

emonk2010 commented 2 months ago

Having the same issue - did you get this resolved?

Aderek514 commented 2 months ago

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: @.***>

Aderek514 commented 2 months ago

clear cache, clear install and not working:

Result:

(venv) E:\ai-toolkit>

Aderek514 commented 2 months ago

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

Aderek514 commented 2 months ago

Resolved: i was error in name in flux.1-dev downolaed folder.

Aderek514 commented 2 months ago

Resolved: i was error in name in flux.1-dev downolaed folder.