Open DhavalTaunk08 opened 1 month ago
You cannot pass URLs to from_single_file
. Could you try the following instead?
from diffusers import FluxTransformer2DModel
from huggingface_hub import hf_hub_download
safetensors_file = hf_hub_download("Kijai/flux-fp8", filename="flux1-dev-fp8-e4m3fn.safetensors")
print(safetensors_file)
transformer = FluxTransformer2DModel.from_single_file(safetensors_file, subfolder="transformer")
print(transformer.config)
Edit: My bad, you can pass URLs to from_single_file
, I got confused with something else. I think you just have to pass subfolder="transformer"
when initializing to make your snippet work. This is because we try to fetch the init config from the original Flux-Dev repository (as Kijai/flux-fp8 is based on Flux-Dev).
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Describe the bug
Unable to use flux fp8 model from
Kijai/flux-fp8
while having transformer_flux.py file in local. I have modified the scripts to remove any import error. I put some print statements in single_model_file.py to check why it is not loading the model.Reproduction
The below code works fine.
single_model_file.py
I am getting the below output:
But while using the class from my local code:
It is giving me following error:
Any leads would be appreciated.
Logs
No response
System Info
Who can help?
@DN6 @sayakpaul