Spaces:
Runtime error
Runtime error
Update app.py
Browse files48 unmodified lines4950515253542 unmodified lines575859606162636448 unmodified lineswidth, height = source_img.sizeif randomize_seed:seed = random.randint(0, MAX_SEED)generator = torch.Generator("cpu").manual_seed(seed)2 unmodified linesprompt=inpaint_prompt,image=source_img,mask_image=binary_mask,width=width,height=height,num_inference_steps=num_steps,generator=generator,guidance_scale=guidance,48 unmodified lines495051525354555657585960612 unmodified lines646566676869707148 unmodified lineswidth, height = source_img.sizenew_width = (width // 16) * 16new_height = (height // 16) * 16# If the image size is not already divisible by 16, resize itif width != new_width or height != new_height:source_img = source_img.resize((new_width, new_height), Image.LANCZOS)if randomize_seed:seed = random.randint(0, MAX_SEED)generator = torch.Generator("cpu").manual_seed(seed)2 unmodified linesprompt=inpaint_prompt,image=source_img,mask_image=binary_mask,width=new_width,height=new_height,num_inference_steps=num_steps,generator=generator,guidance_scale=guidance,
app.py+9-2