someone-in-the-world Claude Sonnet 4.6 commited on
Commit
fe5e4a1
·
1 Parent(s): b3330b2

Time transformer/pipeline loads; allow pipeline to fetch config from Hub

Browse files

Adds wall-clock seconds to each from_pretrained step so we can see
how long the xet-mount read takes. Removes local_files_only from the
pipeline load — its cache is missing entirely but the config files are
small and will pull from Hub quickly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -65,6 +65,8 @@ if os.path.isdir(_hf_cache):
65
  _inspect_cache("transformer (V23)", os.path.join(_hf_cache, "models--prithivMLmods--Qwen-Image-Edit-Rapid-AIO-V23"))
66
  _inspect_cache("pipeline (FireRed-Image-Edit-1.1)", os.path.join(_hf_cache, "models--FireRedTeam--FireRed-Image-Edit-1.1"))
67
 
 
 
68
  print("[startup] loading transformer from_pretrained (prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23)...", flush=True)
69
  _transformer = QwenImageTransformer2DModel.from_pretrained(
70
  "prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23",
@@ -72,16 +74,16 @@ _transformer = QwenImageTransformer2DModel.from_pretrained(
72
  device_map="cuda",
73
  local_files_only=True,
74
  )
75
- print("[startup] transformer loaded", flush=True)
76
 
 
77
  print("[startup] loading pipeline from_pretrained (FireRedTeam/FireRed-Image-Edit-1.1)...", flush=True)
78
  pipe = QwenImageEditPlusPipeline.from_pretrained(
79
  "FireRedTeam/FireRed-Image-Edit-1.1",
80
  transformer=_transformer,
81
  torch_dtype=dtype,
82
- local_files_only=True,
83
  ).to(device)
84
- print("[startup] pipeline loaded and moved to device", flush=True)
85
 
86
  print("Using default attention processor (FA3 skipped for ZeroGPU GPU-arch compatibility).", flush=True)
87
 
 
65
  _inspect_cache("transformer (V23)", os.path.join(_hf_cache, "models--prithivMLmods--Qwen-Image-Edit-Rapid-AIO-V23"))
66
  _inspect_cache("pipeline (FireRed-Image-Edit-1.1)", os.path.join(_hf_cache, "models--FireRedTeam--FireRed-Image-Edit-1.1"))
67
 
68
+ import time as _time
69
+ _t0_load = _time.perf_counter()
70
  print("[startup] loading transformer from_pretrained (prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23)...", flush=True)
71
  _transformer = QwenImageTransformer2DModel.from_pretrained(
72
  "prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23",
 
74
  device_map="cuda",
75
  local_files_only=True,
76
  )
77
+ print(f"[startup] transformer loaded in {_time.perf_counter()-_t0_load:.1f}s", flush=True)
78
 
79
+ _t1_load = _time.perf_counter()
80
  print("[startup] loading pipeline from_pretrained (FireRedTeam/FireRed-Image-Edit-1.1)...", flush=True)
81
  pipe = QwenImageEditPlusPipeline.from_pretrained(
82
  "FireRedTeam/FireRed-Image-Edit-1.1",
83
  transformer=_transformer,
84
  torch_dtype=dtype,
 
85
  ).to(device)
86
+ print(f"[startup] pipeline loaded in {_time.perf_counter()-_t1_load:.1f}s", flush=True)
87
 
88
  print("Using default attention processor (FA3 skipped for ZeroGPU GPU-arch compatibility).", flush=True)
89