Spaces:
Runtime error
Runtime error
Xu Ma
commited on
Commit
·
e697003
1
Parent(s):
b78c4c4
update
Browse files
app.py
CHANGED
@@ -344,6 +344,7 @@ def main(args):
|
|
344 |
).launch(
|
345 |
inbrowser=True, # 自动打开默认浏览器
|
346 |
show_tips=True, # 自动显示gradio最新功能
|
|
|
347 |
# favicon_path="./icon/logo.ico",
|
348 |
)
|
349 |
|
|
|
344 |
).launch(
|
345 |
inbrowser=True, # 自动打开默认浏览器
|
346 |
show_tips=True, # 自动显示gradio最新功能
|
347 |
+
enable_queue=True
|
348 |
# favicon_path="./icon/logo.ico",
|
349 |
)
|
350 |
|
main.py
CHANGED
@@ -349,9 +349,6 @@ def main_func(target, experiment, cfg_arg):
|
|
349 |
with open(cfg_arg.config, 'r') as f:
|
350 |
cfg = yaml.load(f, Loader=yaml.FullLoader)
|
351 |
cfg_default = edict(cfg['default'])
|
352 |
-
print(f"debug: {cfg_arg.experiment}")
|
353 |
-
print(f"debug: {cfg[cfg_arg.experiment]}")
|
354 |
-
print(f"debug: {edict(cfg[cfg_arg.experiment])}")
|
355 |
cfg = edict(cfg[cfg_arg.experiment])
|
356 |
cfg.update(cfg_default)
|
357 |
cfg.update(cfg_arg)
|
@@ -371,7 +368,6 @@ def main_func(target, experiment, cfg_arg):
|
|
371 |
pydiffvg.set_use_gpu(torch.cuda.is_available())
|
372 |
device = pydiffvg.get_device()
|
373 |
|
374 |
-
print(f"debug: {cfg.target}")
|
375 |
# gt = np.array(PIL.Image.open(cfg.target))
|
376 |
gt = np.array(cfg.target)
|
377 |
print(f"Input image shape is: {gt.shape}")
|
@@ -452,7 +448,6 @@ def main_func(target, experiment, cfg_arg):
|
|
452 |
para_stroke_width[path_idx] = stroke_width_var
|
453 |
para_stroke_color[path_idx] = stroke_color_var
|
454 |
else:
|
455 |
-
print(f"debug cfg.trainable.stroke false : {gt}")
|
456 |
shapes, shape_groups, point_var, color_var = init_shapes(
|
457 |
pathn, cfg.num_segments, (h, w),
|
458 |
cfg.seginit, len(shapes_record),
|
|
|
349 |
with open(cfg_arg.config, 'r') as f:
|
350 |
cfg = yaml.load(f, Loader=yaml.FullLoader)
|
351 |
cfg_default = edict(cfg['default'])
|
|
|
|
|
|
|
352 |
cfg = edict(cfg[cfg_arg.experiment])
|
353 |
cfg.update(cfg_default)
|
354 |
cfg.update(cfg_arg)
|
|
|
368 |
pydiffvg.set_use_gpu(torch.cuda.is_available())
|
369 |
device = pydiffvg.get_device()
|
370 |
|
|
|
371 |
# gt = np.array(PIL.Image.open(cfg.target))
|
372 |
gt = np.array(cfg.target)
|
373 |
print(f"Input image shape is: {gt.shape}")
|
|
|
448 |
para_stroke_width[path_idx] = stroke_width_var
|
449 |
para_stroke_color[path_idx] = stroke_color_var
|
450 |
else:
|
|
|
451 |
shapes, shape_groups, point_var, color_var = init_shapes(
|
452 |
pathn, cfg.num_segments, (h, w),
|
453 |
cfg.seginit, len(shapes_record),
|