someone-in-the-world Claude Sonnet 4.6 commited on
Commit
b40674b
·
1 Parent(s): 170974c

Log HF cache state before from_pretrained to diagnose hang

Browse files

Prints whether the transformer and pipeline model dirs exist in
/data/hf_cache/hub before loading, so we can confirm if the V23
weights are missing from the dataset mount.

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

Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -45,6 +45,15 @@ print("[startup] all imports done", flush=True)
45
 
46
  dtype = torch.bfloat16
47
 
 
 
 
 
 
 
 
 
 
48
  print("[startup] loading transformer from_pretrained (prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23)...", flush=True)
49
  _transformer = QwenImageTransformer2DModel.from_pretrained(
50
  "prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23",
 
45
 
46
  dtype = torch.bfloat16
47
 
48
+ _hf_cache = os.path.join(os.environ.get("HF_HOME", "/data/hf_cache"), "hub")
49
+ _transformer_cache = os.path.join(_hf_cache, "models--prithivMLmods--Qwen-Image-Edit-Rapid-AIO-V23")
50
+ _pipeline_cache = os.path.join(_hf_cache, "models--FireRedTeam--FireRed-Image-Edit-1.1")
51
+ print(f"[startup] HF cache dir : {_hf_cache}", flush=True)
52
+ print(f"[startup] transformer cache exists: {os.path.isdir(_transformer_cache)}", flush=True)
53
+ print(f"[startup] pipeline cache exists : {os.path.isdir(_pipeline_cache)}", flush=True)
54
+ if os.path.isdir(_hf_cache):
55
+ print(f"[startup] /hub contents: {os.listdir(_hf_cache)}", flush=True)
56
+
57
  print("[startup] loading transformer from_pretrained (prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23)...", flush=True)
58
  _transformer = QwenImageTransformer2DModel.from_pretrained(
59
  "prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V23",