Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
OFT 
posted an update 22 days ago
Post
397
[Update 2024-12-20]
Topic Closed, a big thank you to John6666 for helping me out!

[Original post]
Who can help?
I got a safetensor file and want to make a working txt2img diffuser on HF. You may explain or even link me to the right tutorial (I dont think it is inside the diffusers turorial?). Thank you ❤️
deleted
This comment has been hidden
·

Thank you for your fast reply @apontemy , I think I might need to rephrase my question a bit.

I got a safetensor file on my PC but I wish to upload it onto the HF model hub (website). About 2 years ago I made a model (OFT/MODEL_SD15_RockRaiderRuby_v01) , I totally forgot how I did it. I remember there was a google collab file involved (with a HF writting token) but it kinda worked half and I had to manually upload certain files to the HF website with the upload button to make it work.

So I am kinda trying to achieve a copy of the model structure on HF but with a different safetensor file.

Do you mean a single safetensors file?
If it's a complete all-in-one safetensors file, it can often be read using from_single_file().
If you only have a transformer, this method cannot be used. You will need to import individual classes, load the transformer, and load the rest of the files from somewhere else.
https://huggingface.co/docs/diffusers/main/api/loaders/single_file
https://github.com/huggingface/diffusers/issues/9165#issue-2462431761

·

Thank you for your fast reply @John6666 , I think I might need to rephrase my question a bit.

I have like a safetensor file on my PC and I want to achieve this: "https://huggingface.co/John6666/mala-anime-mix-nsfw-pony-xl-v3-sdxl/tree/main" (for example). So the result should be a HF model page that can be used by others (by API etc) just like your model.

I did something similar in the past (it was 2 years ago) but I totally forgot how I did it. I remember using a HF writting token and a google collab file (but it worked half and had to upload certain files manually).
I think it was training something with dreambooth, getting a clk file and uploading those, but it is too long ago to clearly remember.

In this post