imomayiz commited on
Commit
d163799
1 Parent(s): 10f2c31

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -1
README.md CHANGED
@@ -4,4 +4,56 @@ datasets:
4
  library_name: diffusers
5
  tags:
6
  - art
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  library_name: diffusers
5
  tags:
6
  - art
7
+ ---
8
+
9
+ # SDXL LoRA DreamBooth - imomayiz/moroccan_sdxl_lora
10
+
11
+ <Gallery />
12
+
13
+ ## Model description
14
+
15
+ ### These are LoRA weights of sdxl-base-1.0 finetuned on modern moroccan cities images.
16
+
17
+ The weights were trained using [DreamBooth](https://dreambooth.github.io/).
18
+
19
+ VAE used for training: madebyollin/sdxl-vae-fp16-fix.
20
+
21
+ ## Trigger words
22
+
23
+ You should use "moroccan city" to trigger the image generation.
24
+
25
+ ## Download model
26
+
27
+ Weights for this model are available [here](imomayiz/moroccan_sdxl_lora/tree/main).
28
+
29
+ ## Dataset
30
+
31
+ The training images can be found [here](https://huggingface.co/datasets/imomayiz/morocco-img/tree/main/data/cities).
32
+
33
+ ## How to use the model
34
+ ````
35
+ import torch
36
+ from diffusers import DiffusionPipeline, AutoencoderKL
37
+
38
+ repo_id = "imomayiz/moroccan_sdxl_lora"
39
+
40
+ # load lora weights and pipeline
41
+ vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
42
+ pipe = DiffusionPipeline.from_pretrained(
43
+ "stabilityai/stable-diffusion-xl-base-1.0",
44
+ vae=vae,
45
+ torch_dtype=torch.float16,
46
+ variant="fp16",
47
+ use_safetensors=True
48
+ )
49
+ pipe.load_lora_weights(repo_id)
50
+ _ = pipe.to("cuda")
51
+
52
+
53
+ prompt = "a photo of a modern moroccan city"
54
+
55
+ # generate the image
56
+ image = pipe(prompt=prompt, num_inference_steps=20).images[0]
57
+ image
58
+
59
+ ````