yizhangliu commited on
Commit
210411f
·
1 Parent(s): 5f65d94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -34,7 +34,7 @@ from loguru import logger
34
 
35
  from lama_cleaner.model_manager import ModelManager
36
  from lama_cleaner.schema import Config
37
-
38
  try:
39
  torch._C._jit_override_can_fuse_on_cpu(False)
40
  torch._C._jit_override_can_fuse_on_gpu(False)
@@ -191,7 +191,7 @@ model = ModelManager(
191
  # sd_run_local=True,
192
  # callback=diffuser_callback,
193
  )
194
-
195
 
196
  '''
197
  pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", dtype=torch.float16, revision="fp16", use_auth_token=auth_token).to(device)
@@ -222,14 +222,14 @@ def predict(dict):
222
  mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
223
  '''
224
  image = Image.fromarray(dict["image"])
225
- mask= Image.fromarray(dict["mask"])
226
  #output = model_process(image, mask)
227
  output = mask #output.images[0]
228
  # output = pipe(prompt = prompt, image=init_image, mask_image=mask,guidance_scale=7.5)
229
 
230
  return output #, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
231
 
232
- print(f'liuyz_400_here_')
233
 
234
  css = '''
235
  .container {max-width: 1150px;margin: auto;padding-top: 1.5rem}
 
34
 
35
  from lama_cleaner.model_manager import ModelManager
36
  from lama_cleaner.schema import Config
37
+ '''
38
  try:
39
  torch._C._jit_override_can_fuse_on_cpu(False)
40
  torch._C._jit_override_can_fuse_on_gpu(False)
 
191
  # sd_run_local=True,
192
  # callback=diffuser_callback,
193
  )
194
+ '''
195
 
196
  '''
197
  pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", dtype=torch.float16, revision="fp16", use_auth_token=auth_token).to(device)
 
222
  mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
223
  '''
224
  image = Image.fromarray(dict["image"])
225
+ mask = Image.fromarray(dict["mask"])
226
  #output = model_process(image, mask)
227
  output = mask #output.images[0]
228
  # output = pipe(prompt = prompt, image=init_image, mask_image=mask,guidance_scale=7.5)
229
 
230
  return output #, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
231
 
232
+ print(f'liuyz_500_here_')
233
 
234
  css = '''
235
  .container {max-width: 1150px;margin: auto;padding-top: 1.5rem}