ameerazam08 commited on
Commit
cef54d0
1 Parent(s): b3d87df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -15,6 +15,8 @@ from torch import Tensor, nn
15
  from transformers import CLIPTextModel, CLIPTokenizer, T5EncoderModel, T5Tokenizer
16
  from safetensors.torch import load_file
17
  dtype = torch.bfloat16
 
 
18
  device = "cuda" if torch.cuda.is_available() else "cpu"
19
  # ---------------- Encoders ----------------
20
 
@@ -628,6 +630,7 @@ class EmptyInitWrapper(torch.overrides.TorchFunctionMode):
628
 
629
  with EmptyInitWrapper():
630
  model = Flux().to(dtype=torch.bfloat16, device="cuda")
 
631
  sd = load_file("./consolidated_s6700.safetensors")
632
  sd = {k.replace("model.", ""): v for k, v in sd.items()}
633
  result = model.load_state_dict(sd)
 
15
  from transformers import CLIPTextModel, CLIPTokenizer, T5EncoderModel, T5Tokenizer
16
  from safetensors.torch import load_file
17
  dtype = torch.bfloat16
18
+ from huggingface_hub import snapshot_download
19
+ print(snapshot_download(repo_id="nyanko7/flux-dev-de-distill"))
20
  device = "cuda" if torch.cuda.is_available() else "cpu"
21
  # ---------------- Encoders ----------------
22
 
 
630
 
631
  with EmptyInitWrapper():
632
  model = Flux().to(dtype=torch.bfloat16, device="cuda")
633
+
634
  sd = load_file("./consolidated_s6700.safetensors")
635
  sd = {k.replace("model.", ""): v for k, v in sd.items()}
636
  result = model.load_state_dict(sd)