mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
refactor(backend): use BICUBIC resampling for Kontext images
Switch from LANCZOS to BICUBIC for smoother image resizing to reduce artifacts in reference image processing
This commit is contained in:
@@ -133,7 +133,8 @@ class KontextExtension:
|
||||
image = image.convert("RGB")
|
||||
final_width = 8 * scaled_width
|
||||
final_height = 8 * scaled_height
|
||||
image = image.resize((final_width, final_height), Image.Resampling.LANCZOS)
|
||||
# Use BICUBIC for smoother resizing to reduce artifacts
|
||||
image = image.resize((final_width, final_height), Image.Resampling.BICUBIC)
|
||||
|
||||
# Convert to tensor with same normalization as BFL
|
||||
image_np = np.array(image)
|
||||
|
||||
Reference in New Issue
Block a user