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

Bugs in the pretrain script #23

Open
shenzy08 opened this issue May 22, 2023 · 0 comments
Open

Bugs in the pretrain script #23

shenzy08 opened this issue May 22, 2023 · 0 comments

Comments

@shenzy08
Copy link

I ran the pretraining script

CUDA_VISIBLE_DEVICES=1 accelerate launch pretrain_e4t.py --pretrained_model_name_or_path="CompVis/stable-diffusion-v1-4" --clip_model_name_or_path="ViT-H-14::laion2b_s32b_b79k" --domain_class_token="cat" --placeholder_token="*s" --prompt_template=normal --save_sample_prompt="a photo of the *s, a photo of the *s in monet style" --reg_lambda=0.01 --domain_embed_scale=0.1 --output_dir="pretrained-cat" --train_image_dataset="/dataset/e4t/dataset/cat/" --iterable_dataset --resolution=512 --train_batch_size=16 --learning_rate=1e-6 --scale_lr --checkpointing_steps=10000 --log_steps=1000 --max_train_steps=100000 --unfreeze_clip_vision --mixed_precision="fp16" --enable_xformers_memory_efficient_attention

and encountered the error
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

This bug is from the line 99 of "e4t-diffusion/e4t/utils.py", where ckpt is None for os.path.exists(ckpt_path).
When checking the related code, I notice that in line 238 and 249 of pretrain_u4t.py, the ckpt_path is specially set to a weight_offsets.pt and encoder.pt. However, there are no such files before pretraining in a base model like "CompVis/stable-diffusion-v1-4", so it seems rather weird. Please help me fix this issue, thank you!

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

No branches or pull requests

1 participant