Spaces:
Paused
Paused
lllyasviel
commited on
Commit
·
fe4e6ef
1
Parent(s):
43701e2
entry.py
CHANGED
@@ -41,11 +41,11 @@ def get_batch(keys, value_dict, N, device="cuda"):
|
|
41 |
.to(device)
|
42 |
.repeat(*N, 1)
|
43 |
)
|
44 |
-
batch_uc["original_size_as_tuple"] = (
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
)
|
49 |
elif key == "crop_coords_top_left":
|
50 |
batch["crop_coords_top_left"] = (
|
51 |
torch.tensor(
|
@@ -70,11 +70,11 @@ def get_batch(keys, value_dict, N, device="cuda"):
|
|
70 |
.to(device)
|
71 |
.repeat(*N, 1)
|
72 |
)
|
73 |
-
batch_uc["target_size_as_tuple"] = (
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
)
|
78 |
else:
|
79 |
batch[key] = value_dict[key]
|
80 |
|
@@ -100,7 +100,7 @@ sampler = EulerAncestralSampler(
|
|
100 |
verbose=True,
|
101 |
)
|
102 |
|
103 |
-
torch.manual_seed(
|
104 |
|
105 |
config_path = './sd_xl_base.yaml'
|
106 |
config = OmegaConf.load(config_path)
|
|
|
41 |
.to(device)
|
42 |
.repeat(*N, 1)
|
43 |
)
|
44 |
+
# batch_uc["original_size_as_tuple"] = (
|
45 |
+
# torch.tensor([value_dict["orig_height"], value_dict["orig_width"]])
|
46 |
+
# .to(device)
|
47 |
+
# .repeat(*N, 1) / 2
|
48 |
+
# )
|
49 |
elif key == "crop_coords_top_left":
|
50 |
batch["crop_coords_top_left"] = (
|
51 |
torch.tensor(
|
|
|
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(12345)
|
104 |
|
105 |
config_path = './sd_xl_base.yaml'
|
106 |
config = OmegaConf.load(config_path)
|