huggingface / huggingface/diffusers

Where should I obtain the lora-sdxl-dreambooth-id in Inference

Aperta
#10,223 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug stale
Lingua principale
Python
Stelle
34.5k
Fork
7.3k
Merge medio
3g 3h
PR unite (30g)
91

Descrizione

### Describe the bug

I tried to upload the download link from the README file generated during training, but an error indicated it was incorrect. Where should I obtain the lora-id for Inference?

### Reproduction

README.md:
---
base_model: /data/ziqiang/czc/diffusers/examples/dreambooth/model
library_name: diffusers
license: openrail++
instance_prompt: a photo of sks dog
widget: []
tags:
- text-to-image
- text-to-image
- diffusers-training
- diffusers
- lora
- template:sd-lora
- stable-diffusion-xl
- stable-diffusion-xl-diffusers
---

# SDXL LoRA DreamBooth - daniu111/output

## Model description

These are daniu111/output LoRA adaption weights for /data/ziqiang/czc/diffusers/examples/dreambooth/model.

The weights were trained using [DreamBooth](https://dreambooth.github.io/).

LoRA for the text encoder was enabled: False.

Special VAE used for training: /data/ziqiang/czc/diffusers/examples/dreambooth/model/vae.

## Trigger words

You should use a photo of sks dog to trigger the image generation.

## Download model

Weights for this model are available in Safetensors format.

[Download](daniu111/output/tree/main) them in the Files & versions tab.

## Intended uses & limitations

#### How to use

```python
# TODO: add an example code snippet for running this diffusion pipeline
```

#### Limitations and bias

[TODO: provide examples of latent issues and potential remediations]

## Training details

[TODO: describe the data used to train the model]

Inference:
from huggingface_hub.repocard import RepoCard
from diffusers import DiffusionPipeline
import torch

lora_model_id = <"lora-sdxl-dreambooth-id">
card = RepoCard.load(lora_model_id)
base_model_id = card.data.to_dict()["base_model"]

pipe = DiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
pipe.load_lora_weights(lora_model_id)
image = pipe("A picture of a sks dog in a bucket", num_inference_steps=25).images[0]
image.save("sks_dog.png")

"The lora-dreambooth-sdxl-id seems to need to be uploaded, but I don't know where to obtain this ID."

### Logs

_No response_

### System Info

- 🤗 Diffusers version: 0.32.0.dev0
- Platform: Linux-5.4.0-198-generic-x86_64-with-glibc2.31
- Running on Google Colab?: No
- Python version: 3.12.4
- PyTorch version (GPU?): 2.4.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Huggingface_hub version: 0.26.2
- Transformers version: 4.46.3
- Accelerate version: 1.1.1
- PEFT version: 0.7.0
- Bitsandbytes version: not installed
- Safetensors version: 0.4.5
- xFormers version: 0.0.27.post2
- Accelerator: NVIDIA RTX A6000, 49140 MiB
NVIDIA RTX A6000, 49140 MiB
NVIDIA RTX A6000, 49140 MiB
- Using GPU in script?:
- Using distributed or parallel set-up in script?:

### Who can help?

@hlky

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

The issue names README.md and an inference snippet using RepoCard.load, DiffusionPipeline.from_pretrained, and pipe.load_lora_weights; start by tracing how the training output is published and how the model identifier is expected to be supplied. Done means the README or relevant inference documentation clearly identifies the required model ID and gives a reproducible path from training output to inference.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, pytorch
Ambito
documentation, machine-learning
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.