Dreambooth-Stable-Diffusion icon indicating copy to clipboard operation
Dreambooth-Stable-Diffusion copied to clipboard

AttributeError: 'int' object has no attribute 'strip'

Open RowanUnderwood opened this issue 3 years ago • 4 comments

My command is

python main.py --base configs/stable-diffusion/v1-finetune_unfrozen.yaml --train --actual_resume models/ldm/stable-diffusion-v1/sd-v1-4-full-ema.ckpt --name jacobpederson --gpus 1, --data_root training/face --reg_data_root classes/class-face-samples --class_word man

Error is

Traceback (most recent call last): File "main.py", line 792, in ngpu = len(lightning_config.trainer.gpus.strip(",").split(',')) AttributeError: 'int' object has no attribute 'strip'

Full text here https://pastebin.com/cPtUUe6H

Also referenced here https://github.com/XavierXiao/Dreambooth-Stable-Diffusion/pull/46

Thanks!

RowanUnderwood avatar Oct 04 '22 16:10 RowanUnderwood

(https://github.com/XavierXiao/Dreambooth-Stable-Diffusion/issues/32#issuecomment-1260049348) - FIX IS HERE

TemporalLabsLLC-SOL avatar Oct 05 '22 09:10 TemporalLabsLLC-SOL

Yes, its --gpus "0," like so

python main.py --base configs/stable-diffusion/v1-finetune_unfrozen.yaml --train --actual_resume models/ldm/stable-diffusion-v1/sd-v1-4-full-ema.ckpt --name jacobpederson --gpus "0," --data_root training/face --reg_data_root classes/class-face-samples --class_word man

On Wed, Oct 5, 2022 at 4:25 AM UrbanLegendXV @.***> wrote:

Did you find a fix?

— Reply to this email directly, view it on GitHub https://github.com/XavierXiao/Dreambooth-Stable-Diffusion/issues/54#issuecomment-1268180583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHNT56JMTNLDPOWXOWUGTWBVCPZANCNFSM6AAAAAAQ4W74OM . You are receiving this because you authored the thread.Message ID: @.***>

RowanUnderwood avatar Oct 05 '22 11:10 RowanUnderwood

You could only add lightning_config.trainer.gpus = str (lightning_config.trainer.gpus) before ngpu = len(lightning_config.trainer.gpus.strip(",").split(',')) and its solved

bh-github-learn avatar Oct 16 '23 09:10 bh-github-learn

Commenting for future Zero123 users: the --gpus 0 --> --gpus "0," solution also works for running Zero123 on a single A100.

perturbedmuffin avatar Feb 20 '24 20:02 perturbedmuffin