diff --git a/entry.py b/entry.py index 4f573e9c..5eca7557 100644 --- a/entry.py +++ b/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, } diff --git a/img.png b/img.png index c176aae7..aa1869b7 100644 Binary files a/img.png and b/img.png differ