This commit is contained in:
lvmin 2023-08-09 15:24:01 -07:00
parent 6530ddc368
commit 883352cb50
2 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,11 @@ def get_batch(keys, value_dict, N, device="cuda"):
.to(device)
.repeat(*N, 1)
)
batch_uc["target_size_as_tuple"] = (
torch.tensor([value_dict["target_height"], value_dict["target_width"]])
.to(device)
.repeat(*N, 1) / 2.0
)
else:
batch[key] = value_dict[key]
@ -95,6 +100,8 @@ sampler = EulerAncestralSampler(
verbose=True,
)
torch.manual_seed(123)
config_path = './sd_xl_base.yaml'
config = OmegaConf.load(config_path)
model = instantiate_from_config(config.model).cpu()

BIN
img.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB