This commit is contained in:
parent
9cdf7671e2
commit
6530ddc368
7
entry.py
7
entry.py
|
|
@ -41,6 +41,11 @@ def get_batch(keys, value_dict, N, device="cuda"):
|
|||
.to(device)
|
||||
.repeat(*N, 1)
|
||||
)
|
||||
batch_uc["original_size_as_tuple"] = (
|
||||
torch.tensor([value_dict["orig_height"], value_dict["orig_width"]])
|
||||
.to(device)
|
||||
.repeat(*N, 1) / 2
|
||||
)
|
||||
elif key == "crop_coords_top_left":
|
||||
batch["crop_coords_top_left"] = (
|
||||
torch.tensor(
|
||||
|
|
@ -104,7 +109,7 @@ with torch.no_grad():
|
|||
model.conditioner.embedders[1].device = 'cpu'
|
||||
|
||||
value_dict = {
|
||||
"prompt": "a handsome man in forest", "negative_prompt": "ugly, bad", "orig_height": 1024, "orig_width": 1024,
|
||||
"prompt": "dragon, digital art", "negative_prompt": "ugly, bad", "orig_height": 1024, "orig_width": 1024,
|
||||
"crop_coords_top": 0, "crop_coords_left": 0, "target_height": 1024, "target_width": 1024, "aesthetic_score": 7.5,
|
||||
"negative_aesthetic_score": 2.0,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue