Spaces:
Runtime error
Runtime error
Update app.py
Browse files58 unmodified lines59606162636412 unmodified lines7778798081828358 unmodified linesdef fill_image(image, model_selection):margin = 100# Open the original imagesource = image # Changed from image["background"] to match new input format12 unmodified lines# Create the maskmask = Image.new('L', output_size, 255) # Start with all whitemask_draw = ImageDraw.Draw(mask)mask_draw.rectangle([position, (position[0] + source.width, position[1] + source.height)], fill=0)# Prepare the image for ControlNetcnet_image = background.copy()58 unmodified lines5960616263646512 unmodified lines7879808182838485868758 unmodified linesdef fill_image(image, model_selection):margin = 100overlap = 10# Open the original imagesource = image # Changed from image["background"] to match new input format12 unmodified lines# Create the maskmask = Image.new('L', output_size, 255) # Start with all whitemask_draw = ImageDraw.Draw(mask)mask_draw.rectangle([(position[0] + overlap, position[1] + overlap),(position[0] + source.width - overlap, position[1] + source.height - overlap)], fill=0)# Prepare the image for ControlNetcnet_image = background.copy()
app.py+5-1