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

error on train: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' #173

Closed
tcflying opened this issue Feb 15, 2023 · 7 comments · Fixed by #2682

Comments

@tcflying
Copy link

(venv) PS F:\kohya_ss> .\gui.ps1
Load CSS...
Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch().
Folder 25_allinone: 6575 steps
max_train_steps = 3288
stop_text_encoder_training = 0
lr_warmup_steps = 0
Traceback (most recent call last):
File "F:\kohya_ss\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "F:\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "F:\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "F:\kohya_ss\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "F:\kohya_ss\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "F:\kohya_ss\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "F:\kohya_ss\lora_gui.py", line 462, in train_model
run_cmd += run_cmd_advanced_training(
File "F:\kohya_ss\library\common_gui.py", line 638, in run_cmd_advanced_training
if int(kwargs.get('caption_dropout_every_n_epochs', 0)) > 0
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

@ashesashes
Copy link

ran into this issue as well. how did you fix it @bmaltais @tcflying ?

@Jackmekiss
Copy link

Same issue here

@bmaltais bmaltais reopened this Jul 22, 2024
@bmaltais
Copy link
Owner

Will to check what is going on.

@bmaltais bmaltais pinned this issue Jul 22, 2024
@bmaltais
Copy link
Owner

I can't reproduce the issue on my system ;-( All is working fine for me. What version are you using?

(venv) PS D:\kohya_ss> .\gui.ps1
18:59:49-253286 INFO     Kohya_ss GUI version: v24.1.5
18:59:49-866663 INFO     Submodule initialized and updated.
18:59:49-866663 INFO     nVidia toolkit detected
18:59:51-695771 INFO     Torch 2.1.2+cu118
18:59:51-727956 INFO     Torch backend: nVidia CUDA 11.8 cuDNN 8905
18:59:51-730576 INFO     Torch detected GPU: NVIDIA GeForce RTX 3090 VRAM 24576 Arch (8, 6) Cores 82
18:59:51-733378 INFO     Python version is 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
18:59:51-733378 INFO     Verifying modules installation status from requirements_pytorch_windows.txt...
18:59:51-733378 INFO     Verifying modules installation status from requirements_windows.txt...
18:59:51-741391 INFO     Verifying modules installation status from requirements.txt...
18:59:51-742343 WARNING  Package wrong version: gradio 4.26.0 required 4.36.0
18:59:51-742343 INFO     Installing package: gradio==4.36.0
18:59:56-559244 WARNING  Package wrong version: onnx 1.15.0 required 1.16.1
18:59:56-559244 INFO     Installing package: onnx==1.16.1
19:00:14-991188 INFO     headless: False
19:00:15-211189 INFO     Using shell=True when running external commands...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

@b-fission
Copy link
Contributor

@bmaltais
You can cause the error if the "Dropout caption every n epochs" is blank in the gui.

@bmaltais
Copy link
Owner

bmaltais commented Aug 1, 2024

Ah, that I can fix. Thanks!

@bmaltais
Copy link
Owner

bmaltais commented Aug 2, 2024

Should be fixed in most recent release.

@bmaltais bmaltais unpinned this issue Aug 2, 2024
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

Successfully merging a pull request may close this issue.

5 participants