CCSR icon indicating copy to clipboard operation
CCSR copied to clipboard

How to predict with batches?

Open ManuBN786 opened this issue 1 year ago • 3 comments

My application requires me to chop up a FullHD image into patches and run it in batches for a 1X SR.

So I would prefer the patches to be predicted with a batch size.

But unfortunately this pipeline accepts only a single 'validation_image'

So how to process it with a Batch_Size ?

pipeline = load_pipeline(args, accelerator, enable_xformers_memory_efficient_attention)

inference_time, image = pipeline(
                        args.t_max,
                        args.t_min,
                        args.tile_diffusion,
                        args.tile_diffusion_size,
                        args.tile_diffusion_stride,
                        args.added_prompt,
                        validation_image,
                        num_inference_steps=args.num_inference_steps,
                        generator=generator,
                        height=height,
                        width=width,
                        guidance_scale=args.guidance_scale,
                        negative_prompt=args.negative_prompt,
                        conditioning_scale=args.conditioning_scale,
                        start_steps=args.start_steps,
                        start_point=args.start_point,
                        use_vae_encode_condition=args.use_vae_encode_condition,
                    )

ManuBN786 avatar Dec 24 '24 02:12 ManuBN786

Hello, any ideas to predict images in batches ?

ManuBN786 avatar Jan 06 '25 08:01 ManuBN786

Currently, batch inference is not supported. We plan to add this functionality next week.

csslc avatar Jan 06 '25 10:01 csslc

Thank you so much !!!

ManuBN786 avatar Jan 06 '25 10:01 ManuBN786