xueyao commited on
Commit
695fc35
·
1 Parent(s): 397f75d
Files changed (1) hide show
  1. README.md +96 -14
README.md CHANGED
@@ -1,18 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- license: creativeml-openrail-m
3
- base_model:
4
- - stabilityai/stable-diffusion-3.5-medium
5
- pipeline_tag: text-to-image
6
- tags:
7
- - turbo
8
- - sd3.5m
9
- - StableDiffusion3Pipeline
10
- - stable-diffusion
11
- language:
12
- - en
13
  ---
14
- "All that has passed is but a prologue; what you hold in your heart will one day echo back."
15
 
16
- 2024/12/16 update the ckpt of sd3.5m
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
- 2024/12/15 updated the lora of sd3.5m
 
 
 
 
 
 
 
 
 
1
+ # Stable Diffusion 3.5 Medium Turbo (SD3.5M Turbo)
2
+
3
+ ---
4
+
5
+ > **"All that has passed is but a prologue; what you hold in your heart will one day echo back."**
6
+
7
+
8
+
9
+ ---
10
+
11
+ ## Project Overview
12
+
13
+ Stable Diffusion 3.5 Medium Turbo (SD3.5M Turbo) is a high-performance text-to-image model distilled from StabilityAI's stable-diffusion-3.5-medium. This model emphasizes stability and efficiency, making it suitable for a wide range of art styles and creative expression scenarios.
14
+
15
+ ![ComfyUI_temp_psqad_00205_](https://github.com/user-attachments/assets/5d3313d6-6087-46f1-8add-5f322097c5be)
16
  ---
17
+
18
+
19
+
20
+ ## Model Features
21
+
22
+ - 🚀 **Turbo Performance**: Faster generation speeds, ideal for multitasking and high-demand scenarios.
23
+ - 🎨 **Versatile Styles**: Supports a wide range of styles, from photorealistic to abstract art.
24
+ - 🖼️ **High-Resolution Outputs**: Produces images with exceptional clarity and intricate details.
25
+ - ⚙️ **Easy to Extend**: Integrated with `LoRA` technology, making it easier for users to customize and experiment.
 
 
26
  ---
 
27
 
28
+ ## How to Use
29
+
30
+ 1. **Download the Model**
31
+ Download the latest versions of the model’s `ckpt` and `LoRA` files from the following links:
32
+ - [SD3.5M Checkpoint (Updated on 2024/12/16)](link_placeholder)
33
+ - [SD3.5M LoRA (Updated on 2024/12/15)](link_placeholder)
34
+
35
+ 2. **Environment Setup**
36
+ Ensure that your environment meets the following requirements:
37
+ - Python 3.8+
38
+ - PyTorch 2.0+
39
+ - Required libraries such as `diffusers` and `transformers`
40
+
41
+ 3. **Model Loading**
42
+ Load and use the model following the detailed instructions provided in the repository.
43
+
44
+ ---
45
+
46
+ ## Example Output
47
+
48
+
49
+ ```python
50
+ import torch
51
+ from diffusers import StableDiffusion3Pipeline
52
+
53
+ pipe = StableDiffusion3Pipeline.from_pretrained("tensorart/stable-diffusion-3.5-medium-turbo", torch_dtype=torch.float16,)
54
+
55
+ pipe = pipe.to("cuda")
56
+
57
+
58
+ image = pipe(
59
+ "A beautiful bald girl with silver and white futuristic metal face jewelry, her full body made of intricately carved liquid glass in the style of Tadashi, the complexity master of cyberpunk, in the style of James Jean and Peter Mohrbacher. This concept design is trending on Artstation, with sharp focus, studio-quality photography, and highly detailed, intricate details.",
60
+ num_inference_steps=8,
61
+ guidance_scale=1.5,
62
+ height=1024,
63
+ width=768
64
+ ).images[0]
65
+
66
+ image.save("./output_sd3.5m_turbo/test4-2.webp")
67
+ ```
68
+
69
+ Using lora:
70
+
71
+ ```python
72
+ import torch
73
+ from diffusers import StableDiffusion3Pipeline
74
+ import numpy as np
75
+ from safetensors.torch import load_file
76
+
77
+ pipe = StableDiffusion3Pipeline.from_pretrained("tensorart/stable-diffusion-3.5-medium-turbo",
78
+ torch_dtype=torch.float16,)
79
+ # scheduler=PCMFMDeterministicScheduler(1000, 3.0, 50))
80
+ pipe = pipe.to("cuda")
81
+
82
+ lora_weights_dir = 'tensorart/stable-diffusion-3.5-medium-turbo/lora_sd3.5m_turbo_8steps.safetensors'
83
+ pcm_lora_weight = load_file(lora_weights_dir)
84
+
85
+ alpha = 1.0
86
+ pcm_lora_weight = {
87
+ key: value * np.sqrt(alpha) for key, value in pcm_lora_weight.items()
88
+ }
89
+ pipe.load_lora_weights(lora_weights_dir)
90
+ pipe = pipe.to("cuda")
91
 
92
+ image = pipe(
93
+ "A beautiful bald girl with silver and white futuristic metal face jewelry, her full body made of intricately carved liquid glass in the style of Tadashi, the complexity master of cyberpunk, in the style of James Jean and Peter Mohrbacher. This concept design is trending on Artstation, with sharp focus, studio-quality photography, and highly detailed, intricate details.",
94
+ num_inference_steps=8,
95
+ guidance_scale=1.5,
96
+ height=1024,
97
+ width=768
98
+ ).images[0]
99
+ image.save("./output_sd3.5m_turbo_lora/test1.webp")
100
+ ```