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

Exception training model: 'type str doesn't define __round__ method' #996

Closed
jtan-sl opened this issue Mar 2, 2023 · 3 comments
Closed
Labels
new Just added, you should probably sort this.

Comments

@jtan-sl
Copy link

jtan-sl commented Mar 2, 2023

Kindly read the entire form below and fill it out with the requested information.

Please find the following lines in the console and paste them below. If you do not provide this information, your
issue will be automatically closed.

`
Python revision: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
Dreambooth revision: d4e2f7d
SD-WebUI revision: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8

Checking Dreambooth requirements...
[+] torch version 1.13.1+cu117 installed.
[+] torchvision version 0.14.1+cu117 installed.
[+] bitsandbytes version 0.35.4 installed.
[+] diffusers version 0.13.1 installed.
[+] transformers version 4.26.1 installed.
[+] xformers version 0.0.17.dev464 installed.
`

Have you read the Readme?
yes
Have you completely restarted the stable-diffusion-webUI, not just reloaded the UI?
yes
Have you updated Dreambooth to the latest revision?
yes
Have you updated the Stable-Diffusion-WebUI to the latest version?
yes
No, really. Please save us both some trouble and update the SD-WebUI and Extension and restart before posting this.
Reply 'OK' Below to acknowledge that you did this.

OK
Describe the bug

Train - failed to start getting this error on the UI
Exception training model: 'type str doesn't define round method'.

Provide logs

Found 315 reg images.
Preparing dataset...
Init dataset!
Preparing Dataset (Without Caching)
Processing images...: 100%|██████████| 336/336 [00:00<00:00, 323156.65it/s]
Traceback (most recent call last):
File "/home/ubuntu/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/ui_functions.py", line 555, in start_training
result = main(use_txt2img=use_txt2img)
File "/home/ubuntu/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1133, in main
return inner_loop()
File "/home/ubuntu/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/memory.py", line 123, in decorator
return function(batch_size, grad_size, prof, *args, **kwargs)
File "/home/ubuntu/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 564, in inner_loop
text_encoder_epochs = round(args.num_train_epochs * stop_text_percentage)
TypeError: type str doesn't define round method

If a crash has occurred, please provide the entire stack trace from the log, including the last few log messages *
before* the crash occurred.

Environment

What OS? Ubuntu

If Windows - WSL or native?

What GPU are you using?
Nvidia T4 (on aws g4dn.xlarge)

Screenshots/Config
If the issue is specific to an error while training, please provide a screenshot of training parameters or the
db_config.json file from /models/dreambooth/MODELNAME/db_config.json

@jtan-sl jtan-sl added the new Just added, you should probably sort this. label Mar 2, 2023
@jtan-sl
Copy link
Author

jtan-sl commented Mar 2, 2023

I think this is related to UI set to default / blank values - Step Ratio of Text Encoder Training. Setting this got past this issue. Thanks to someone from discussions!

@jtan-sl jtan-sl closed this as completed Mar 2, 2023
@ef1500
Copy link

ef1500 commented Mar 4, 2023

Where do you find this setting?
Update: Found it
image
For anyone else curious

@ArrowM
Copy link
Collaborator

ArrowM commented Mar 4, 2023

last 2 comment explain a simple fix. We are aware of the issue and have an actual fix coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Just added, you should probably sort this.
Projects
None yet
Development

No branches or pull requests

3 participants