Xenova HF Staff commited on
Commit
1fedb07
Β·
verified Β·
1 Parent(s): cdf4769

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -92
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  license: creativeml-openrail-m
3
  base_model: runwayml/stable-diffusion-v1-5
4
- library_name: transformers.js
5
  tags:
6
  - stable-diffusion
7
  - text-to-image
@@ -9,7 +9,6 @@ tags:
9
  - webgpu
10
  - browser-ai
11
  - onnx
12
- - transformers.js
13
  - zhare-ai
14
  - client-side
15
  - privacy-preserving
@@ -58,7 +57,6 @@ model-index:
58
 
59
  ![License](https://img.shields.io/badge/License-CreativeML_OpenRAIL--M-blue.svg)
60
  ![WebGPU](https://img.shields.io/badge/WebGPU-Ready-green)
61
- ![Transformers.js](https://img.shields.io/badge/Transformers.js-Compatible-orange)
62
  ![Privacy](https://img.shields.io/badge/Privacy-First-purple)
63
  ![Production](https://img.shields.io/badge/Production-Ready-brightgreen)
64
 
@@ -80,7 +78,6 @@ This is a browser-optimized implementation of Stable Diffusion v1.5, specificall
80
  - πŸ”’ **Privacy-First**: All processing happens locally, protecting user prompts and generated content
81
  - πŸ“± **Cross-Platform**: Compatible with desktop and mobile browsers
82
  - πŸ› οΈ **Production-Ready**: Optimized for real-world web applications
83
- - πŸš€ **Transformers.js Compatible**: Direct integration with Hugging Face Transformers.js
84
 
85
  ## πŸš€ Quick Start
86
 
@@ -92,57 +89,6 @@ git lfs install
92
  git clone https://huggingface.co/Zhare-AI/sd-1-5-webgpu
93
  ```
94
 
95
- ### Usage with Transformers.js
96
-
97
- ```javascript
98
- import { pipeline } from '@huggingface/transformers';
99
-
100
- // Initialize the pipeline
101
- const generator = await pipeline(
102
- 'text-to-image',
103
- 'Zhare-AI/sd-1-5-webgpu',
104
- {
105
- device: 'webgpu',
106
- dtype: 'fp16'
107
- }
108
- );
109
-
110
- // Generate an image
111
- const result = await generator(
112
- 'A majestic mountain landscape at sunrise, digital art',
113
- {
114
- num_inference_steps: 20,
115
- guidance_scale: 7.5,
116
- height: 512,
117
- width: 512
118
- }
119
- );
120
-
121
- // Display the result
122
- document.getElementById('output').src = result.images[0];
123
- ```
124
-
125
- ### Advanced Configuration
126
-
127
- ```javascript
128
- // Custom generation parameters
129
- const advancedOptions = {
130
- prompt: "A futuristic city with flying cars, neon lights, cyberpunk style",
131
- negative_prompt: "blurry, low quality, distorted, ugly, deformed",
132
- num_inference_steps: 25,
133
- guidance_scale: 8.0,
134
- height: 512,
135
- width: 512,
136
- seed: 12345, // For reproducible results
137
-
138
- // Memory optimization for lower-end devices
139
- enable_attention_slicing: true,
140
- enable_cpu_offload: false
141
- };
142
-
143
- const image = await generator(advancedOptions.prompt, advancedOptions);
144
- ```
145
-
146
  ## πŸ“Š Performance Specifications
147
 
148
  ### Model Architecture
@@ -190,43 +136,6 @@ const image = await generator(advancedOptions.prompt, advancedOptions);
190
 
191
  *All browsers support WebAssembly fallback for universal compatibility*
192
 
193
- ## βš™οΈ Configuration Options
194
-
195
- ### Generation Parameters
196
-
197
- ```javascript
198
- const generationConfig = {
199
- // Core settings
200
- num_inference_steps: 20, // 10-50 (quality vs speed trade-off)
201
- guidance_scale: 7.5, // 1.0-20.0 (prompt adherence)
202
- height: 512, // Must be multiple of 64
203
- width: 512, // Must be multiple of 64
204
-
205
- // Quality settings
206
- negative_prompt: "blurry, low quality, distorted",
207
- seed: undefined, // Random seed, or integer for reproducibility
208
-
209
- // Performance optimizations
210
- enable_attention_slicing: true, // Reduces VRAM usage
211
- enable_sequential_cpu_offload: false, // CPU fallback for components
212
- use_fp16: true // Half precision for speed/memory
213
- };
214
- ```
215
-
216
- ### Memory Optimization
217
-
218
- For devices with limited VRAM or older hardware:
219
-
220
- ```javascript
221
- const memoryOptimizedConfig = {
222
- num_inference_steps: 15, // Fewer steps = less memory
223
- guidance_scale: 7.0, // Slightly lower guidance
224
- enable_attention_slicing: true, // Essential for <6GB VRAM
225
- enable_sequential_cpu_offload: true, // Move components to CPU when needed
226
- use_safety_checker: false // Disable to save ~600MB
227
- };
228
- ```
229
-
230
  ## πŸ“ Model Details
231
 
232
  ### Training Information
 
1
  ---
2
  license: creativeml-openrail-m
3
  base_model: runwayml/stable-diffusion-v1-5
4
+ library_name: onnx
5
  tags:
6
  - stable-diffusion
7
  - text-to-image
 
9
  - webgpu
10
  - browser-ai
11
  - onnx
 
12
  - zhare-ai
13
  - client-side
14
  - privacy-preserving
 
57
 
58
  ![License](https://img.shields.io/badge/License-CreativeML_OpenRAIL--M-blue.svg)
59
  ![WebGPU](https://img.shields.io/badge/WebGPU-Ready-green)
 
60
  ![Privacy](https://img.shields.io/badge/Privacy-First-purple)
61
  ![Production](https://img.shields.io/badge/Production-Ready-brightgreen)
62
 
 
78
  - πŸ”’ **Privacy-First**: All processing happens locally, protecting user prompts and generated content
79
  - πŸ“± **Cross-Platform**: Compatible with desktop and mobile browsers
80
  - πŸ› οΈ **Production-Ready**: Optimized for real-world web applications
 
81
 
82
  ## πŸš€ Quick Start
83
 
 
89
  git clone https://huggingface.co/Zhare-AI/sd-1-5-webgpu
90
  ```
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  ## πŸ“Š Performance Specifications
93
 
94
  ### Model Architecture
 
136
 
137
  *All browsers support WebAssembly fallback for universal compatibility*
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  ## πŸ“ Model Details
140
 
141
  ### Training Information