mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
i
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user