Got this error
Hi @1803nimish ,
Thanks for reaching out and highlighting this issue. You've encountered a very common point of confusion when working with different model formats on Hugging Face.
The error Entry Not Found for url: .../model_index.json
is happening because this repository provides the model as single-file checkpoints (like .safetensors
), which are ready for direct use in UIs or for specific loading methods. The error appears when you try to load it with a method like DiffusionPipeline.from_pretrained("Tenos-ai/Tenos")
, which expects a different format (a collection of folders for the unet, vae, etc., and a model_index.json
file to map them).
You don't need to build a model_index.json
file. The correct way to load this model using the diffusers
library is to load it directly from the single file.
Here is the correct code snippet to do that:
from diffusers import FluxPipeline
import torch
model_path = "https://huggingface.co/Tenos-ai/Tenos/blob/main/Tenos_V1-25_FP16.safetensors"
pipeline = FluxPipeline.from_single_file(
model_path,
torch_dtype=torch.bfloat16,
use_safetensors=True
)
pipeline.to("cuda")
prompt = "A beautiful photo of a fantasy landscape, 8k, detailed"
image = pipeline(prompt=prompt).images[0]
image.save("flux_fantasy_landscape.png")
This method will load the entire model correctly from the single .safetensors
file.
Let us know if you have any other questions!
Best,
The Tenos-ai Team