ameerazam08 commited on
Commit
93a3928
1 Parent(s): b545136

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -18,7 +18,6 @@ from safetensors.torch import load_file
18
  dtype = torch.bfloat16
19
  from huggingface_hub import snapshot_download
20
  model_path = snapshot_download(repo_id="nyanko7/flux-dev-de-distill")
21
- print("model_list ",os.listdir(model_path))
22
  device = "cuda" if torch.cuda.is_available() else "cpu"
23
  # ---------------- Encoders ----------------
24
 
@@ -633,7 +632,7 @@ class EmptyInitWrapper(torch.overrides.TorchFunctionMode):
633
  with EmptyInitWrapper():
634
  model = Flux().to(dtype=torch.bfloat16, device="cuda")
635
 
636
- sd = load_file("./consolidated_s6700.safetensors")
637
  sd = {k.replace("model.", ""): v for k, v in sd.items()}
638
  result = model.load_state_dict(sd)
639
 
 
18
  dtype = torch.bfloat16
19
  from huggingface_hub import snapshot_download
20
  model_path = snapshot_download(repo_id="nyanko7/flux-dev-de-distill")
 
21
  device = "cuda" if torch.cuda.is_available() else "cpu"
22
  # ---------------- Encoders ----------------
23
 
 
632
  with EmptyInitWrapper():
633
  model = Flux().to(dtype=torch.bfloat16, device="cuda")
634
 
635
+ sd = load_file(f"{model_path}/consolidated_s6700.safetensors")
636
  sd = {k.replace("model.", ""): v for k, v in sd.items()}
637
  result = model.load_state_dict(sd)
638