File size: 1,822 Bytes
37aeb5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
pretrained_model_name_or_path: "lambdalabs/sd-image-variations-diffusers"
mixed_precision: "bf16"

init_config: 
  # enable controls
  enable_cross_attn_lora: False
  enable_cross_attn_ip: False
  enable_self_attn_lora: False
  enable_self_attn_ref: True
  enable_multiview_attn: False

  # for cross attention
  init_cross_attn_lora: False
  init_cross_attn_ip: False
  cross_attn_lora_rank: 512        # 0 for not enabled
  cross_attn_lora_only_kv: False
  ipadapter_pretrained_name: "h94/IP-Adapter"
  ipadapter_subfolder_name: "models"
  ipadapter_weight_name: "ip-adapter_sd15.safetensors"
  ipadapter_effect_on: "all"    # all, first

  # for self attention
  init_self_attn_lora: False
  self_attn_lora_rank: 512
  self_attn_lora_only_kv: False

  # for self attention ref
  init_self_attn_ref: True
  self_attn_ref_position: "attn1"
  self_attn_ref_other_model_name: "lambdalabs/sd-image-variations-diffusers"
  self_attn_ref_pixel_wise_crosspond: True
  self_attn_ref_effect_on: "all"
  
  # for multiview attention
  init_multiview_attn: False
  multiview_attn_position: "attn1"
  num_modalities: 1
  
  # for unet
  init_unet_path: "${pretrained_model_name_or_path}"
  init_num_cls_label: 0     # for initialize
  cls_labels: []  # for current task

trainers: 
  - trainer_type: "image2image_trainer"
    trainer:
        pretrained_model_name_or_path: "${pretrained_model_name_or_path}"
        attn_config:
          cls_labels: []  # for current task
          enable_cross_attn_lora: False
          enable_cross_attn_ip: False
          enable_self_attn_lora: False
          enable_self_attn_ref: True
          enable_multiview_attn: False
        resolution: "512"
        condition_image_resolution: "512"
        condition_image_column_name: "conditioning_image"
        image_column_name: "image"