[WIP] Upload folder using huggingface_hub (multi-commit 5839dd1a76cbb5dd00935c75b58d9fd26bbdf2d45cdefa3852e2e1cb12e67946)

#4
by xchuan - opened
Files changed (4) hide show
  1. README.md +0 -26
  2. image1.jpg +0 -0
  3. image2.jpg +0 -0
  4. pytorch_lora_weights.safetensors +0 -3
README.md CHANGED
@@ -12,36 +12,10 @@ language:
12
  base_model:
13
  - stabilityai/stable-diffusion-2-1
14
  pipeline_tag: text-to-image
15
- library_name: diffusers
16
  ---
17
 
18
  # This LoRA is trained based on stabilityai/stable-diffusion-2-1.
19
 
20
- ## Inference
21
- ```python
22
- from diffusers import StableDiffusionPipeline, DDIMScheduler
23
- pretrained_model_name_or_path = "stabilityai/stable-diffusion-2-1"
24
- weight_dtype = torch.float16
25
- # 加载基础模型
26
- pipeline = StableDiffusionPipeline.from_pretrained(pretrained_model_name_or_path, torch_dtype=weight_dtype).to("cuda")
27
- pipeline.load_lora_weights("xchuan/lora-stable-diffusion-2-1-fupo")
28
- pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config)
29
- prompt = "A cartoon woman with pigtails, round face, colorful dress, and sunglasses"
30
-
31
- # 使用加载的 LoRA 模型进行推理
32
- image = pipeline(prompt).images[0]
33
-
34
- # 使用 matplotlib 显示生成的图像
35
- plt.imshow(image)
36
- plt.axis('off') # 隐藏坐标轴
37
- plt.show()
38
-
39
- ```
40
- <div>
41
- <img src="./image1.jpg" width="300" style="display: inline-block;"/>
42
- <img src="./image2.jpg" width="300" style="display: inline-block;"/>
43
- </div>
44
-
45
  ## Training code
46
 
47
  ```python
 
12
  base_model:
13
  - stabilityai/stable-diffusion-2-1
14
  pipeline_tag: text-to-image
 
15
  ---
16
 
17
  # This LoRA is trained based on stabilityai/stable-diffusion-2-1.
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  ## Training code
20
 
21
  ```python
image1.jpg DELETED
Binary file (280 kB)
 
image2.jpg DELETED
Binary file (247 kB)
 
pytorch_lora_weights.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0fb1a8ae8b5b00f693578e877da41fcfb577a4670de017fe582229549607699b
3
- size 13317544