-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
Hi,
I have an issue with my output image which does not have the same dimensions as the input one.
Original image: 640x480
Output image: 576x512
Do you know why ?
here the sample :
import numpy
from controlnet_aux.processor import MidasDetector
from PIL import Image
image_path = "d:/temp/cat.png"
model_path = "d:/model/dreamshaper-v8.0"
convertedImage = Image.open(image_path)
resolution = min(convertedImage.size)
processor = MidasDetector.from_pretrained(model_path)
controlnet_image = processor(
input_image=convertedImage,
a=numpy.pi * 2.0,
bg_th=0.1,
depth_and_normal=False,
detect_resolution=resolution,
image_resolution=resolution,
output_type='pil'
)
controlnet_image.save("d:/temp/cat_result.png")
Thank you!
Metadata
Metadata
Assignees
Labels
No labels