def METHOD_NAME(self, inputs: Dict[str, Any],
            **forward_params) -> Dict[str, Any]:
    if not isinstance(inputs, dict):
        raise ValueError(
            f'Expected the input to be a dictionary, but got {type(input)}'
        )
    num_inference_steps = inputs.get('num_inference_steps', 50)
    guidance_scale = inputs.get('guidance_scale', 7.5)
    negative_prompt = inputs.get('negative_prompt', None)
    num_images_per_prompt = inputs.get('num_images_per_prompt', 1)
    eta = inputs.get('eta', 0.0)
    if 'prompt' in inputs.keys():
        prompt = inputs['prompt']
    else:
        # for demo_service
        prompt = forward_params.get('prompt', 'background')
    print(f'Test with prompt: {prompt}')
    image = load_image(inputs['image'])
    mask = load_image(inputs['mask'])
    w, h = image.size
    print(f'loaded input image of size ({w}, {h})')
    width, height = map(lambda x: x - x % 64,
                        (w, h))  # resize to integer multiple of 64
    image = image.resize((width, height))
    mask = mask.resize((width, height))
    out_image = self.pipeline(
        prompt=prompt,
        image=image,
        mask_image=mask,
        height=height,
        width=width,
        num_inference_steps=num_inference_steps,
        guidance_scale=guidance_scale,
        negative_prompt=negative_prompt,
        num_images_per_prompt=num_images_per_prompt,
        eta=eta).images[0]
    return {'result': out_image}