This commit is contained in:
lvmin
2023-08-09 15:34:44 -07:00
parent 847c4f0c4d
commit 95bbc7825d
2 changed files with 11 additions and 11 deletions
+11 -11
View File
@@ -41,11 +41,11 @@ def get_batch(keys, value_dict, N, device="cuda"):
.to(device) .to(device)
.repeat(*N, 1) .repeat(*N, 1)
) )
batch_uc["original_size_as_tuple"] = ( # batch_uc["original_size_as_tuple"] = (
torch.tensor([value_dict["orig_height"], value_dict["orig_width"]]) # torch.tensor([value_dict["orig_height"], value_dict["orig_width"]])
.to(device) # .to(device)
.repeat(*N, 1) / 2 # .repeat(*N, 1) / 2
) # )
elif key == "crop_coords_top_left": elif key == "crop_coords_top_left":
batch["crop_coords_top_left"] = ( batch["crop_coords_top_left"] = (
torch.tensor( torch.tensor(
@@ -70,11 +70,11 @@ def get_batch(keys, value_dict, N, device="cuda"):
.to(device) .to(device)
.repeat(*N, 1) .repeat(*N, 1)
) )
batch_uc["target_size_as_tuple"] = ( # batch_uc["target_size_as_tuple"] = (
torch.tensor([value_dict["target_height"], value_dict["target_width"]]) # torch.tensor([value_dict["target_height"], value_dict["target_width"]])
.to(device) # .to(device)
.repeat(*N, 1) / 2.0 # .repeat(*N, 1) / 2.0
) # )
else: else:
batch[key] = value_dict[key] batch[key] = value_dict[key]
@@ -100,7 +100,7 @@ sampler = EulerAncestralSampler(
verbose=True, verbose=True,
) )
torch.manual_seed(123) torch.manual_seed(12345)
config_path = './sd_xl_base.yaml' config_path = './sd_xl_base.yaml'
config = OmegaConf.load(config_path) config = OmegaConf.load(config_path)
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB