svjack commited on
Commit
70d036c
1 Parent(s): 0bfb7e1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -0
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: diffusers
3
+ ---
4
+
5
+ ## Generate Genshin Impact LandScape style image by lora tuned on stable-diffusion-xl
6
+
7
+ ### Init
8
+
9
+ ```python
10
+ import torch
11
+ from diffusers import (
12
+ StableDiffusionXLPipeline,
13
+ AutoencoderKL,
14
+ )
15
+
16
+ vae = AutoencoderKL.from_pretrained(
17
+ "madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16, use_safetensors=True
18
+ )
19
+
20
+ model_path = "stabilityai/stable-diffusion-xl-base-1.0"
21
+ pipe = StableDiffusionXLPipeline.from_pretrained(
22
+ model_path, torch_dtype=torch.float16, vae=vae
23
+ )
24
+ pipe.to("cuda")
25
+ pipe.load_lora_weights("svjack/Genshin-Impact-LandScape-lora-sd-xl-rk4")
26
+ ```
27
+
28
+ ### Generate Genshin Mondstadt LandScape Image
29
+ ```python
30
+ prompt = "European, green coniferous tree, yellow coniferous tree, rock, creek, sunny day, pastel tones, 3D"
31
+ image = pipe(prompt=prompt,
32
+ num_inference_steps=50, guidance_scale=5.0,
33
+ cross_attention_kwargs={"scale": 0.7}
34
+ ).images[0]
35
+ image
36
+ ```
37
+
38
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/mYqjyVryMY6WZvDTrEFuN.png)
39
+
40
+ ### Generate Genshin Mondstadt LandScape Clear Image
41
+ ```python
42
+ prompt = "European, green coniferous tree, yellow coniferous tree, rock, creek, sunny day, pastel tones, 3D"
43
+ image = pipe(prompt=prompt,
44
+ negative_prompt = "blurred, uneven, messy, foggy",
45
+ num_inference_steps=50, guidance_scale=5.0,
46
+ cross_attention_kwargs={"scale": 0.7}
47
+ ).images[0]
48
+ image
49
+ ```
50
+
51
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/0SwXIjMix6ynurnpepj09.png)
52
+
53
+
54
+ ### Generate Genshin Liyue LandScape Image
55
+ ```python
56
+ prompt = "Chinese, yellow deciduous wood, orange deciduous wood, rock, sunny day, pastel tones, 3D"
57
+ image = pipe(prompt=prompt,
58
+ num_inference_steps=50, guidance_scale=5.0,
59
+ cross_attention_kwargs={"scale": 0.7}
60
+ ).images[0]
61
+ image
62
+ ```
63
+
64
+
65
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/mZNb7Mww21nT21odVb73D.png)
66
+
67
+ ### Generate Genshin Liyue LandScape Clear Image
68
+ ```python
69
+ prompt = "Chinese, yellow deciduous wood, orange deciduous wood, rock, sunny day, bright, 3D"
70
+ image = pipe(prompt=prompt,
71
+ num_inference_steps=50, guidance_scale=5.0,
72
+ cross_attention_kwargs={"scale": 0.7}
73
+ ).images[0]
74
+ image
75
+ ```
76
+
77
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/QiXKTmYu3XILSFTH9qID7.png)
78
+