Text-to-Image
Diffusion Single File
English
stable-diffusion

Run this model with HF Jobs

Run stabilityai/stable-diffusion-3-medium on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/stabilityai/stable-diffusion-3-medium. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/stabilityai/stable-diffusion-3-medium on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

try fine tune lora, but disappoint.............

#132
by liudashu - opened

i follow this link: https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sd3.py

the raw scripts show me some error like 'local variable ... tokenizer_one .....'
then i deleted some line around 1344-1348, then it works, but but but too too too slow. need about 12 hours to train 500 epoches, my gpu is rtx-4090

anybody has better works?

[error by raw scripts]
tokens_one = tokenize_prompt(tokenizer_one, args.instance_prompt)
^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'tokenizer_one' where it is not associated with a value

[deleted scripts]
# Clear the memory here
if not train_dataset.custom_instance_prompts:
# del tokenizers, text_encoders
# # Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection
# del tokenizer_one, tokenizer_two, tokenizer_three
# del text_encoder_one, text_encoder_two, text_encoder_three
gc.collect()
if torch.cuda.is_available():
torch.cuda.empty_cache()

the same issue

Sign up or log in to comment