Giter Site home page Giter Site logo

dreambooth-autodl's Introduction

Dreambooth-autodl

dreambooth autodl 训练脚本。 修改自 Nyanko Lepsoni 的 Colab 笔记本

使用方法

直接使用autodl镜像

dreambooth-autodl

手动部署

环境选择 Miniconda / conda3 / 3.8(ubuntu20.04) / 11.3

clone本项目后,首先利用 conda 创建 python 运行环境后再运行 install.sh

git clone https://github.com/Akegarasu/dreambooth-autodl.git
cd dreambooth-audodl
conda create -n diffusers python=3.10
conda init bash && source /root/.bashrc
conda activate diffusers
conda install ipykernel
ipython kernel install --user --name=diffusers
bash install.sh

按照提示安装依赖。

将本项目文件夹移动到 /autodl-tmp 后打开 dreambooth-aki.ipynb 运行训练

dreambooth-autodl's People

Contributors

akegarasu avatar remiliacn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dreambooth-autodl's Issues

请问这个方法适合训练Stable Diffusion 2.1 768模型吗?

我尝试过上传v2-1_768-nonema-pruned.ckpt此模型到model-sd目录下,却没有找到合适的config.yaml,让它运行ckpt的转化。后来试过直接下载https://huggingface.co/stabilityai/stable-diffusion-2-1/ 上的模型目录,但是在跑训练的时候,报错了,报错内容如下:

The config attributes {'requires_safety_checker': False} were passed to StableDiffusionPipeline, but are not expected and will be ignored. Please verify your model_index.json configuration file.
Keyword arguments {'requires_safety_checker': False} not recognized.
The config attributes {'prediction_type': 'v_prediction'} were passed to DDIMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'dual_cross_attention': False, 'num_class_embeds': None, 'only_cross_attention': False, 'use_linear_projection': True, 'upcast_attention': True} were passed to UNet2DConditionModel, but are not expected and will be ignored. Please verify your config.json configuration file.
Traceback (most recent call last):
  File "/root/autodl-tmp/dreambooth-aki/train_dreambooth.py", line 2215, in <module>
    main(args)
  File "/root/autodl-tmp/dreambooth-aki/train_dreambooth.py", line 1721, in main
    generate_class_images(args, accelerator)
  File "/root/autodl-tmp/dreambooth-aki/train_dreambooth.py", line 1574, in generate_class_images
    pipeline = StableDiffusionPipeline.from_pretrained(
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/diffusers/pipeline_utils.py", line 629, in from_pretrained
    loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/diffusers/modeling_utils.py", line 451, in from_pretrained
    model, unused_kwargs = cls.from_config(
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 174, in from_config
    model = cls(**init_dict)
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 444, in inner_init
    init(self, *args, **init_kwargs)
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/diffusers/models/unet_2d_condition.py", line 135, in __init__
    down_block = get_down_block(
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/diffusers/models/unet_2d_blocks.py", line 65, in get_down_block
    return CrossAttnDownBlock2D(
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/diffusers/models/unet_2d_blocks.py", line 535, in __init__
    out_channels // attn_num_head_channels,
TypeError: unsupported operand type(s) for //: 'int' and 'list'
Traceback (most recent call last):
  File "/root/miniconda3/envs/diffusers/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 43, in main
    args.func(args)
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/accelerate/commands/launch.py", line 837, in launch_command
    simple_launcher(args)
  File "/root/miniconda3/envs/diffusers/lib/python3.10/site-packages/accelerate/commands/launch.py", line 354, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/root/miniconda3/envs/diffusers/bin/python', 'train_dreambooth.py', '--mixed_precision=fp16', '--pretrained_model_name_or_path=./model-v2.1-768', '--instance_data_dir=./instance-images', '--class_data_dir=./class-images', '--output_dir=./output', '--instance_prompt=GaoGao, bullet train, robot, metal ,silver', '--class_prompt=bullet train, robot ,metal ,silver', '--class_negative_prompt=lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry', '--save_sample_prompt=GaoGao, bullet train, robot, metal ,silver,Hikarian robot toys, figurine, detailed product photo, hyper-detailed and intricate, realistic shaded, fine detail, realistic proportions, 8K resolution', '--save_sample_negative_prompt=broken arms, wrong reflections,wrong hands, extra fingers, ugly, boring, bad anatomy,, ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))),watermark,lowres, bad anatomy, bad hands, text,error, missing fngers,extra digt ,fewer digits,cropped, wort quality ,low quality,normal quality, jpeg artifacts,signature,watermark, username, blurry, bad feet ,asymmetrical eyes,asymmetrical face,asymmetrical,asymmetry', '--seed=1337', '--resolution=512', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--learning_rate=2e-06', '--lr_scheduler=cosine_with_restarts', '--lr_warmup_steps=100', '--num_class_images=20', '--sample_batch_size=4', '--max_train_steps=3000', '--save_interval=500', '--log_interval=10', '--clip_skip', '1', '--num_cycle=1', '--last_epoch=-1', '--append_prompt=instance', '--use_8bit_adam', '--with_prior_preservation', '--prior_loss_weight=1.0', '--gradient_checkpointing']' returned non-zero exit status 1.

关于模型

大佬,您好!
有没有一些参考的模型checkpoint提供呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.