Skip to content

How to predict with batches? #43

@ManuBN786

Description

@ManuBN786

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,
                    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions