|
|
|
|
@ -82,9 +82,10 @@ def main(): |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
image_rgb_array = image_bgra[:, :, [2,1,0]] |
|
|
|
|
image_rgb_array = (image_rgb_array+ 1.0 )/2.0 |
|
|
|
|
#image_rgb_array = (image_rgb_array+ 1.0 )/2.0 |
|
|
|
|
input_image = Image.fromarray(image_rgb_array, 'RGB') |
|
|
|
|
# input_image.save("debug_input.png") |
|
|
|
|
#print(f"Input size:{input_image.size}") |
|
|
|
|
|
|
|
|
|
if not prompt_queue.empty(): |
|
|
|
|
new_prompt = prompt_queue.get(block=False) |
|
|
|
|
@ -96,7 +97,7 @@ def main(): |
|
|
|
|
params = img2img.Pipeline.InputParams(prompt=PROMPT) |
|
|
|
|
output_image = pipeline.predict(image=input_image, params=params) |
|
|
|
|
# output_image.save("debug_output.png") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# output_rgba_array = np.array(output_image.convert("RGBA")) |
|
|
|
|
# output_bgra_array = output_rgba_array[:, :, [2, 1, 0, 3]] |
|
|
|
|
# buffer = np.ascontiguousarray(output_bgra_array) |
|
|
|
|
|