mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
i
This commit is contained in:
@@ -41,6 +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"] = (
|
||||||
|
torch.tensor([value_dict["orig_height"], value_dict["orig_width"]])
|
||||||
|
.to(device)
|
||||||
|
.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(
|
||||||
@@ -104,7 +109,7 @@ with torch.no_grad():
|
|||||||
model.conditioner.embedders[1].device = 'cpu'
|
model.conditioner.embedders[1].device = 'cpu'
|
||||||
|
|
||||||
value_dict = {
|
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,
|
"crop_coords_top": 0, "crop_coords_left": 0, "target_height": 1024, "target_width": 1024, "aesthetic_score": 7.5,
|
||||||
"negative_aesthetic_score": 2.0,
|
"negative_aesthetic_score": 2.0,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user