File size: 1,464 Bytes
a175f66
87d61dc
a175f66
 
 
 
 
87d61dc
d163799
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fab116e
d163799
 
 
835bbaf
d163799
 
 
 
 
 
cc4f13b
d163799
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a85da32
d163799
 
87d61dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
base_model: stabilityai/stable-diffusion-xl-base-1.0
datasets:
- imomayiz/morocco-img
library_name: diffusers
tags:
- art
pipeline_tag: text-to-image
---

# SDXL LoRA DreamBooth - imomayiz/moroccan_sdxl_lora

<Gallery />

## Model description

### These are LoRA weights of sdxl-base-1.0 finetuned on modern moroccan cities images.

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

VAE used for training: madebyollin/sdxl-vae-fp16-fix.

## Trigger words

You should use "modern moroccan city" to trigger the image generation.

## Download model

Weights for this model are available [here](https://huggingface.co/imomayiz/moroccan_sdxl_lora/tree/main).

## Dataset

The training images can be found [here](https://huggingface.co/datasets/imomayiz/morocco-img/tree/main/data/cities).

## How to use the model
```python
import torch
from diffusers import DiffusionPipeline, AutoencoderKL

repo_id = "imomayiz/moroccan_sdxl_lora"

# load lora weights and pipeline
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
pipe = DiffusionPipeline.from_pretrained(
    "stabilityai/stable-diffusion-xl-base-1.0",
    vae=vae,
    torch_dtype=torch.float16,
    variant="fp16",
    use_safetensors=True
)
pipe.load_lora_weights(repo_id)
_ = pipe.to("cuda")


prompt = "a photo of a modern moroccan city" 

# generate the image
image = pipe(prompt=prompt, num_inference_steps=30).images[0]
image

```