Changed to round up to closest 64
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import comfy.utils
|
||||
|
||||
import math
|
||||
|
||||
class LatentUpscaleBy:
|
||||
upscale_methods = ["nearest-exact", "bilinear", "area"]
|
||||
@@ -18,7 +18,11 @@ class LatentUpscaleBy:
|
||||
def upscale(self, samples, upscale_method, scale, crop):
|
||||
s = samples.copy()
|
||||
w = round(samples["samples"].shape[3] * 8 * scale)
|
||||
w = 64 * math.ceil(w / 64)
|
||||
|
||||
h = round(samples["samples"].shape[2] * 8 * scale)
|
||||
h = 64 * math.ceil(h / 64)
|
||||
|
||||
s["samples"] = comfy.utils.common_upscale(
|
||||
samples["samples"], w // 8, h // 8, upscale_method, crop)
|
||||
return (s,)
|
||||
|
||||
Reference in New Issue
Block a user