|
|
|
@ -13,10 +13,6 @@ def test_image_prompts(sample_image, vae, borders, crop_first): |
|
|
|
img = sample_image.copy() |
|
|
|
img = img.resize((256, 256)) |
|
|
|
image_prompt = ImagePrompts(img, borders, vae, crop_first=crop_first) |
|
|
|
if crop_first: |
|
|
|
assert image_prompt.image_prompts.shape[1] == borders['up'] * 32 |
|
|
|
assert len(image_prompt.image_prompts_idx) == borders['up'] * 32 |
|
|
|
else: |
|
|
|
assert image_prompt.image_prompts.shape[1] == 32 * 32 |
|
|
|
assert len(image_prompt.image_prompts_idx) == (borders['up'] + borders['down']) * 32 \ |
|
|
|
+ (borders['left'] + borders['right']) * (32 - borders['up'] - borders['down']) |
|
|
|
assert image_prompt.image_prompts.shape[1] == 32 * 32 |
|
|
|
assert len(image_prompt.image_prompts_idx) == (borders['up'] + borders['down']) * 32 \ |
|
|
|
+ (borders['left'] + borders['right']) * (32 - borders['up'] - borders['down']) |