File size: 3,006 Bytes
1a234dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
model:
  params:
    conditioner_config:
      params:
        emb_models:
        - input_key: txt
          is_trainable: false
          params:
            layer: hidden
            layer_idx: 11
          target: sgm.modules.encoders.modules.FrozenCLIPEmbedder
        - input_key: txt
          is_trainable: false
          params:
            always_return_pooled: true
            arch: ViT-bigG-14
            freeze: true
            layer: penultimate
            legacy: false
            version: laion2b_s39b_b160k
          target: sgm.modules.encoders.modules.FrozenOpenCLIPEmbedder2
        - input_key: original_size_as_tuple
          is_trainable: false
          params:
            outdim: 256
          target: sgm.modules.encoders.modules.ConcatTimestepEmbedderND
        - input_key: crop_coords_top_left
          is_trainable: false
          params:
            outdim: 256
          target: sgm.modules.encoders.modules.ConcatTimestepEmbedderND
        - input_key: target_size_as_tuple
          is_trainable: false
          params:
            outdim: 256
          target: sgm.modules.encoders.modules.ConcatTimestepEmbedderND
      target: sgm.modules.GeneralConditioner
    denoiser_config:
      params:
        discretization_config:
          target: sgm.modules.diffusionmodules.discretizer.LegacyDDPMDiscretization
        num_idx: 1000
        scaling_config:
          target: sgm.modules.diffusionmodules.denoiser_scaling.EpsScaling
        weighting_config:
          target: sgm.modules.diffusionmodules.denoiser_weighting.EpsWeighting
      target: sgm.modules.diffusionmodules.denoiser.DiscreteDenoiser
    disable_first_stage_autocast: true
    first_stage_config:
      params:
        ddconfig:
          attn_resolutions: []
          attn_type: vanilla-xformers
          ch: 128
          ch_mult:
          - 1
          - 2
          - 4
          - 4
          double_z: true
          dropout: 0.0
          in_channels: 3
          num_res_blocks: 2
          out_ch: 3
          resolution: 256
          z_channels: 4
        embed_dim: 4
        lossconfig:
          target: torch.nn.Identity
        monitor: val/rec_loss
      target: sgm.models.autoencoder.AutoencoderKLInferenceWrapper
    network_config:
      params:
        adm_in_channels: 2816
        attention_resolutions:
        - 4
        - 2
        channel_mult:
        - 1
        - 2
        - 4
        context_dim: 2048
        in_channels: 4
        legacy: false
        model_channels: 320
        num_classes: sequential
        num_head_channels: 64
        num_res_blocks: 2
        out_channels: 4
        spatial_transformer_attn_type: softmax-xformers
        transformer_depth:
        - 1
        - 2
        - 10
        use_checkpoint: true
        use_linear_in_transformer: true
        use_spatial_transformer: true
      target: sgm.modules.diffusionmodules.openaimodel.UNetModel
    scale_factor: 0.13025
  target: sgm.models.diffusion.DiffusionEngine