Sudhanshu619 commited on
Commit
aad3eb8
Β·
verified Β·
1 Parent(s): aed3c5c

Improve model card: metadata, gallery, usage, settings

Browse files
Files changed (1) hide show
  1. README.md +158 -39
README.md CHANGED
@@ -1,70 +1,189 @@
1
  ---
2
  license: creativeml-openrail-m
3
- base_model: Lykon/dreamshaper-8
 
4
  library_name: diffusers
5
  pipeline_tag: text-to-image
 
 
 
 
 
6
  tags:
7
  - text-to-image
 
8
  - stable-diffusion
9
  - stable-diffusion-1.5
 
10
  - lcm
 
 
 
 
 
 
 
 
11
  - diffusers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
- # DrushyaGen Fast v1
15
 
16
- **Imagine. Generate. Create.** A fast text-to-image model that makes a 512Γ—512 image
17
- in **4–8 steps**, so it is usable even on a CPU.
 
 
 
 
 
18
 
19
- It is [Lykon/dreamshaper-8](https://huggingface.co/Lykon/dreamshaper-8) with the
20
- [LCM-LoRA](https://huggingface.co/latent-consistency/lcm-lora-sdv1-5) fused in,
21
- and the LCM scheduler set as default. Made for the
22
- [DrushyaGen AI app](https://github.com/Sudhanshu619/-DriyaGenAI-text-to-image).
23
-
24
- ## Samples
25
- | Image | Prompt |
26
  |---|---|
27
- | ![sample 1](samples/sample_1.png) | a majestic palace on a lake at sunset, cinematic lighting, highly detailed |
28
- | ![sample 2](samples/sample_2.png) | a cute golden retriever puppy in a green garden, professional photography |
29
- | ![sample 3](samples/sample_3.png) | a futuristic neon city at night in the rain, cyberpunk |
30
- | ![sample 4](samples/sample_4.png) | a colorful macaw parrot on a branch, wildlife photography |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
- ## Usage
33
  ```python
34
  import torch
35
  from diffusers import StableDiffusionPipeline
36
 
37
- device = "cuda" if torch.cuda.is_available() else "cpu"
38
  dtype = torch.float16 if device == "cuda" else torch.float32
39
- pipe = StableDiffusionPipeline.from_pretrained("Sudhanshu619/DriyaGenAI-text-to-image", torch_dtype=dtype).to(device)
40
 
41
- image = pipe("a majestic palace on a lake at sunset",
42
- num_inference_steps=4, guidance_scale=1.5).images[0]
 
 
 
 
 
 
 
43
  image.save("drushyagen.png")
44
  ```
45
 
46
- ### Recommended settings
47
- | Setting | Value |
48
- |---|---|
49
- | Steps | 4–8 |
50
- | Guidance scale | 1.0–2.0 (higher values burn the image) |
51
- | Size | 512 Γ— 512 |
52
- | Negative prompt | little effect at low guidance; usually not needed |
 
 
 
 
 
 
 
 
 
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  ## How it was made
56
- - Base: `Lykon/dreamshaper-8` (Stable Diffusion 1.5 architecture)
57
- - Fused: `latent-consistency/lcm-lora-sdv1-5` at scale 1.0
58
- - Scheduler: `LCMScheduler`
59
- - Weights stored in fp16 safetensors
60
- - The standard Stable Diffusion NSFW safety checker is included and on by default.
61
 
62
- ## Limitations
63
- - 512Γ—512 only gives good results; other sizes degrade quickly.
64
- - Weak at legible text, hands, and complex scenes with many objects.
65
- - Inherits the biases of Stable Diffusion 1.5 and its training data (LAION).
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  ## License
68
- CreativeML OpenRAIL-M, inherited from Stable Diffusion 1.5. You must follow its
69
- [use restrictions](https://huggingface.co/spaces/CompVis/stable-diffusion-license)
70
- and pass them on to anyone you share the model or its outputs with.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: creativeml-openrail-m
3
+ language:
4
+ - en
5
  library_name: diffusers
6
  pipeline_tag: text-to-image
7
+ base_model:
8
+ - Lykon/dreamshaper-8
9
+ - latent-consistency/lcm-lora-sdv1-5
10
+ base_model_relation: merge
11
+ thumbnail: samples/sample_2.png
12
  tags:
13
  - text-to-image
14
+ - image-generation
15
  - stable-diffusion
16
  - stable-diffusion-1.5
17
+ - stable-diffusion-diffusers
18
  - lcm
19
+ - lcm-lora
20
+ - latent-consistency-model
21
+ - fast-inference
22
+ - few-step
23
+ - cpu
24
+ - dreamshaper
25
+ - photorealistic
26
+ - art
27
  - diffusers
28
+ - safetensors
29
+ widget:
30
+ - text: a majestic palace on a lake at sunset, cinematic lighting, highly detailed
31
+ output:
32
+ url: samples/sample_1.png
33
+ - text: a cute golden retriever puppy in a green garden, professional photography
34
+ output:
35
+ url: samples/sample_2.png
36
+ - text: a futuristic neon city at night in the rain, cyberpunk
37
+ output:
38
+ url: samples/sample_3.png
39
+ - text: a colorful macaw parrot on a branch, wildlife photography
40
+ output:
41
+ url: samples/sample_4.png
42
  ---
43
 
44
+ # DrushyaGen Fast v1: 4-Step Text-to-Image Model (Stable Diffusion 1.5 + LCM)
45
 
46
+ **Imagine. Generate. Create.** DrushyaGen Fast v1 is a **fast text-to-image model** that turns
47
+ a text prompt into a 512Γ—512 image in **just 4–8 denoising steps** instead of the usual 25–50.
48
+ It is built on [DreamShaper 8](https://huggingface.co/Lykon/dreamshaper-8), one of the most
49
+ popular Stable Diffusion 1.5 models, with the
50
+ [LCM-LoRA](https://huggingface.co/latent-consistency/lcm-lora-sdv1-5) (Latent Consistency Model)
51
+ **fused directly into the weights**. No LoRA loading, no scheduler setup: load it with πŸ€— Diffusers
52
+ and generate. It is light enough to run on a **CPU, a laptop, or a free Colab GPU**.
53
 
54
+ | | |
 
 
 
 
 
 
55
  |---|---|
56
+ | **Steps per image** | 4–8 (vs. 25–50 for standard SD 1.5) |
57
+ | **Resolution** | 512 Γ— 512 |
58
+ | **Weights** | fp16 safetensors, ~2.7 GB total |
59
+ | **Runs on** | NVIDIA GPU, Apple Silicon (MPS), or CPU |
60
+ | **Safety checker** | Included and enabled by default |
61
+ | **License** | CreativeML OpenRAIL-M |
62
+
63
+ ## Sample images
64
+
65
+ All generated with **4 steps**, guidance scale 1.5, 512Γ—512, no negative prompt, no post-processing.
66
+
67
+ | | |
68
+ |:---:|:---:|
69
+ | ![Palace on a lake at sunset, generated by DrushyaGen Fast v1](samples/sample_1.png) | ![Golden retriever puppy in a garden, generated by DrushyaGen Fast v1](samples/sample_2.png) |
70
+ | *a majestic palace on a lake at sunset, cinematic lighting, highly detailed* | *a cute golden retriever puppy in a green garden, professional photography* |
71
+ | ![Neon cyberpunk city at night in the rain, generated by DrushyaGen Fast v1](samples/sample_3.png) | ![Colorful macaw parrot on a branch, generated by DrushyaGen Fast v1](samples/sample_4.png) |
72
+ | *a futuristic neon city at night in the rain, cyberpunk* | *a colorful macaw parrot on a branch, wildlife photography* |
73
+
74
+ ## Quick start
75
+
76
+ ```bash
77
+ pip install diffusers transformers accelerate safetensors torch
78
+ ```
79
 
 
80
  ```python
81
  import torch
82
  from diffusers import StableDiffusionPipeline
83
 
84
+ device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
85
  dtype = torch.float16 if device == "cuda" else torch.float32
 
86
 
87
+ pipe = StableDiffusionPipeline.from_pretrained(
88
+ "Sudhanshu619/DriyaGenAI-text-to-image", torch_dtype=dtype
89
+ ).to(device)
90
+
91
+ image = pipe(
92
+ "a majestic palace on a lake at sunset, cinematic lighting, highly detailed",
93
+ num_inference_steps=4,
94
+ guidance_scale=1.5,
95
+ ).images[0]
96
  image.save("drushyagen.png")
97
  ```
98
 
99
+ The LCM scheduler is already the default, so the settings above are all you need.
100
+
101
+ ### Reproducible results
102
+ ```python
103
+ generator = torch.Generator(device).manual_seed(42)
104
+ image = pipe("a colorful macaw parrot on a branch", num_inference_steps=4,
105
+ guidance_scale=1.5, generator=generator).images[0]
106
+ ```
107
+
108
+ ### Several images at once
109
+ ```python
110
+ images = pipe(["a red vintage car on a mountain road", "a cozy cabin in snowy woods"],
111
+ num_inference_steps=4, guidance_scale=1.5).images
112
+ ```
113
+
114
+ ## Recommended settings
115
 
116
+ | Setting | Recommended | Notes |
117
+ |---|---|---|
118
+ | `num_inference_steps` | **4** (fast) to **8** (more detail) | More than 8 rarely helps |
119
+ | `guidance_scale` | **1.0–2.0** | Values above ~2 over-saturate ("burn") the image |
120
+ | Size | **512 Γ— 512** | Other sizes lose quality quickly |
121
+ | Negative prompt | Usually not needed | Has little effect at low guidance |
122
+ | Scheduler | `LCMScheduler` (default) | Other schedulers need 20+ steps and will not look right |
123
+
124
+ ## Prompting tips
125
+
126
+ - **Describe the subject, then the style and light:** `a lighthouse on a cliff, stormy sea, oil painting, dramatic lighting`
127
+ - **Photo keywords work well** (DreamShaper is strong at photorealism): `professional photography`, `85mm`, `natural light`, `bokeh`
128
+ - **Art styles work too:** `watercolor`, `anime style`, `fantasy concept art`, `Indian miniature painting`, `cyberpunk`
129
+ - Keep prompts **clear and non-contradictory**; the text encoder reads at most 77 tokens.
130
+
131
+ ## Why DrushyaGen Fast v1?
132
+
133
+ - **Fast:** 4 steps instead of 25–50, roughly 6–10Γ— fewer UNet passes than standard SD 1.5.
134
+ - **Simple:** one `from_pretrained` call. The LCM-LoRA is pre-merged and the scheduler is pre-set.
135
+ - **Low hardware needs:** SD 1.5 architecture, fp16 weights. In our test, a 4-step image took
136
+ about 2 minutes on a laptop CPU with no GPU.
137
+ - **Good-looking by default:** DreamShaper 8 base, which is known for strong photorealistic and
138
+ artistic results.
139
+ - **Safe by default:** the standard Stable Diffusion NSFW safety checker is included.
140
+
141
+ ## Use cases
142
+
143
+ Concept art and mood boards, blog and social media images, game and storyboard ideas,
144
+ rapid prototyping of image ideas, teaching and demos of diffusion models, and apps that
145
+ need image generation on modest hardware.
146
 
147
  ## How it was made
 
 
 
 
 
148
 
149
+ 1. Base model: [`Lykon/dreamshaper-8`](https://huggingface.co/Lykon/dreamshaper-8) (Stable Diffusion 1.5 architecture).
150
+ 2. LoRA: [`latent-consistency/lcm-lora-sdv1-5`](https://huggingface.co/latent-consistency/lcm-lora-sdv1-5) merged into the UNet at scale 1.0 (fused in fp32 for accuracy).
151
+ 3. Scheduler: `LCMScheduler` saved as the default.
152
+ 4. Weights saved as fp16 safetensors in the standard πŸ€— Diffusers layout.
153
+ 5. NSFW safety checker: [`CompVis/stable-diffusion-safety-checker`](https://huggingface.co/CompVis/stable-diffusion-safety-checker).
154
+
155
+ No additional training was done. This is a merge of the models above, packaged for easy, fast use.
156
+ The build script is open source: [GitHub, DrushyaGen AI](https://github.com/Sudhanshu619/-DriyaGenAI-text-to-image).
157
+
158
+ ## Limitations and bias
159
+
160
+ - Best at **512Γ—512**; larger or non-square sizes may show repeated objects or distortion.
161
+ - Like all SD 1.5 models, it is **weak at legible text, hands, and scenes with many objects**.
162
+ - Few-step generation trades some fine detail for speed compared with 30+ step sampling.
163
+ - Inherits the biases of Stable Diffusion 1.5 and its LAION training data. Outputs may
164
+ reflect social and cultural stereotypes. Review images before publishing them.
165
+ - Not intended for generating images of real people without consent, or for misinformation.
166
 
167
  ## License
168
+
169
+ [CreativeML OpenRAIL-M](https://huggingface.co/spaces/CompVis/stable-diffusion-license), inherited from
170
+ Stable Diffusion 1.5 and DreamShaper 8. You may use the model and its outputs commercially, but you must
171
+ follow the license's use restrictions and pass them on to anyone you share the model with.
172
+
173
+ ## Credits
174
+
175
+ - [Stable Diffusion 1.5](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5) by CompVis, Stability AI and Runway
176
+ - [DreamShaper 8](https://huggingface.co/Lykon/dreamshaper-8) by Lykon
177
+ - [LCM-LoRA](https://huggingface.co/latent-consistency/lcm-lora-sdv1-5) by the Latent Consistency Models team ([paper](https://arxiv.org/abs/2311.05556))
178
+ - [πŸ€— Diffusers](https://github.com/huggingface/diffusers) by Hugging Face
179
+
180
+ ## Citation
181
+
182
+ ```bibtex
183
+ @misc{drushyagen-fast-v1,
184
+ title = {DrushyaGen Fast v1: a 4-step text-to-image model},
185
+ author = {Sudhanshu},
186
+ year = {2026},
187
+ url = {https://huggingface.co/Sudhanshu619/DriyaGenAI-text-to-image}
188
+ }
189
+ ```