diff --git a/img2img.py b/img2img.py index b783088..3cb25fa 100644 --- a/img2img.py +++ b/img2img.py @@ -78,7 +78,7 @@ class Pipeline: use_tiny_vae=True, device=device, dtype=torch_dtype, - t_index_list=[8, 32], + t_index_list=[1,16], # t_index_list=[1], frame_buffer_size=1, width=params.width, @@ -101,8 +101,8 @@ class Pipeline: self.stream.prepare( prompt=default_prompt, negative_prompt=default_negative_prompt, - num_inference_steps=50, - guidance_scale=0.2, + num_inference_steps=30, + guidance_scale=0.9, ) def predict(self, image: Image.Image, params: "Pipeline.InputParams") -> Image.Image: diff --git a/main.py b/main.py index fb7e7fc..a6741a3 100644 --- a/main.py +++ b/main.py @@ -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)