lllyasviel commited on
Commit
ad0cc98
·
1 Parent(s): c114a31
Files changed (1) hide show
  1. entry.py +7 -0
entry.py CHANGED
@@ -70,6 +70,11 @@ def get_batch(keys, value_dict, N, device="cuda"):
70
  .to(device)
71
  .repeat(*N, 1)
72
  )
 
 
 
 
 
73
  else:
74
  batch[key] = value_dict[key]
75
 
@@ -95,6 +100,8 @@ sampler = EulerAncestralSampler(
95
  verbose=True,
96
  )
97
 
 
 
98
  config_path = './sd_xl_base.yaml'
99
  config = OmegaConf.load(config_path)
100
  model = instantiate_from_config(config.model).cpu()
 
70
  .to(device)
71
  .repeat(*N, 1)
72
  )
73
+ batch_uc["target_size_as_tuple"] = (
74
+ torch.tensor([value_dict["target_height"], value_dict["target_width"]])
75
+ .to(device)
76
+ .repeat(*N, 1) / 2.0
77
+ )
78
  else:
79
  batch[key] = value_dict[key]
80
 
 
100
  verbose=True,
101
  )
102
 
103
+ torch.manual_seed(123)
104
+
105
  config_path = './sd_xl_base.yaml'
106
  config = OmegaConf.load(config_path)
107
  model = instantiate_from_config(config.model).cpu()