Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -741,7 +741,7 @@ def get_image(image) -> torch.Tensor | None:
|
|
741 |
from huggingface_hub import hf_hub_download
|
742 |
from safetensors.torch import load_file
|
743 |
|
744 |
-
sd = load_file(hf_hub_download(repo_id="lllyasviel/flux1-dev-bnb-nf4", filename="flux1-dev-bnb-nf4.safetensors"))
|
745 |
sd = {k.replace("model.diffusion_model.", ""): v for k, v in sd.items() if "model.diffusion_model" in k}
|
746 |
model = Flux().to(dtype=torch.bfloat16, device="cuda")
|
747 |
result = model.load_state_dict(sd)
|
|
|
741 |
from huggingface_hub import hf_hub_download
|
742 |
from safetensors.torch import load_file
|
743 |
|
744 |
+
sd = load_file(hf_hub_download(repo_id="lllyasviel/flux1-dev-bnb-nf4", filename="flux1-dev-bnb-nf4-v2.safetensors"))
|
745 |
sd = {k.replace("model.diffusion_model.", ""): v for k, v in sd.items() if "model.diffusion_model" in k}
|
746 |
model = Flux().to(dtype=torch.bfloat16, device="cuda")
|
747 |
result = model.load_state_dict(sd)
|