XiangdaLi commited on
Commit
a2ecb3d
·
1 Parent(s): aeb21cd

Add Pokemon Stable Diffusion v1.5 model card

Browse files
Files changed (1) hide show
  1. README.md +211 -0
README.md ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Pokemon Stable Diffusion v1.5
2
+
3
+ A fine-tuned version of Stable Diffusion v1.5 specifically trained to generate high-quality Pokémon images in various artistic styles.
4
+
5
+ ## Model Details
6
+
7
+ - **Base Model**: [Stable Diffusion v1.5](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5)
8
+ - **Developed by**: RekklesAI
9
+ - **Model Type**: Latent Diffusion Model for Text-to-Image generation
10
+ - **Language(s)**: English
11
+ - **License**: [CreativeML OpenRAIL-M](https://huggingface.co/spaces/CompVis/stable-diffusion-license)
12
+ - **Training Data**: [reach-vb/pokemon-blip-captions](https://huggingface.co/datasets/reach-vb/pokemon-blip-captions)
13
+ - **Training Steps**: 15,000 steps at resolution 512x512
14
+ - **Model Architecture**: Same as Stable Diffusion v1.5 (UNet with cross-attention layers)
15
+ - **Diffusers Version**: 0.33.0.dev0
16
+ - **Scheduler**: PNDMScheduler
17
+ - **Safety Checker**: StableDiffusionSafetyChecker (can be disabled during inference)
18
+
19
+ ## Model Description
20
+
21
+ This model is a fine-tuned version of Stable Diffusion v1.5, specifically trained to generate high-quality Pokémon images. It can produce Pokémon in various artistic styles, from photorealistic renders to cartoon styles, cyberpunk aesthetics to watercolor art.
22
+
23
+ The model was fine-tuned for 15,000 steps on the [reach-vb/pokemon-blip-captions](https://huggingface.co/datasets/reach-vb/pokemon-blip-captions) dataset, allowing it to learn the distinctive features and characteristics of different Pokémon species while maintaining the generative capabilities of the base model.
24
+
25
+ ### Training Details
26
+
27
+ The model was trained using the following configuration:
28
+ ```bash
29
+ accelerate launch train_text_to_image.py \
30
+ --pretrained_model_name_or_path="stable-diffusion-v1-5/stable-diffusion-v1-5" \
31
+ --dataset_name="reach-vb/pokemon-blip-captions" \
32
+ --caption_column="text" \
33
+ --image_column="image" \
34
+ --resolution=512 \
35
+ --random_flip \
36
+ --train_batch_size=1 \
37
+ --gradient_accumulation_steps=4 \
38
+ --max_train_steps=15000 \
39
+ --learning_rate=1e-05 \
40
+ --max_grad_norm=1 \
41
+ --lr_scheduler="constant" \
42
+ --lr_warmup_steps=0 \
43
+ --output_dir="sd-pokemon-model" \
44
+ --report_to tensorboard
45
+ ```
46
+
47
+ Key training parameters:
48
+ - Learning rate: 1e-5
49
+ - Optimizer: AdamW (default)
50
+ - LR scheduler: Constant (no decay)
51
+ - Batch size: 1 with gradient accumulation steps of 4
52
+ - Resolution: 512x512
53
+ - Data augmentation: Random horizontal flip
54
+
55
+ ## Sample Images
56
+
57
+ Below are sample images generated with this model:
58
+
59
+ ### Epic Photorealistic Style
60
+
61
+ ![Epic Charizard](sample_images/epic_charizard.png)
62
+ *Prompt: A majestic Charizard with iridescent scales soaring through a dramatic sunset sky, casting long shadows over an ancient volcanic landscape. Intricate details of ember particles floating around its powerful wings, reflecting the golden-crimson light. Hyper-realistic texturing, volumetric lighting, cinematic composition with rule of thirds, depth of field focusing on its determined expression, 8K resolution, photorealistic rendering with ray-traced shadows, award-winning digital art, trending on ArtStation.*
63
+
64
+ ![Epic Rayquaza](sample_images/epic_rayquaza.png)
65
+ *Prompt: A majestic Rayquaza with iridescent scales soaring through a dramatic sunset sky, casting long shadows over an ancient cloud kingdom landscape. Intricate details of cosmic energy particles flowing along its serpentine body, reflecting the golden-crimson light. Hyper-realistic texturing, volumetric lighting, cinematic composition with rule of thirds, depth of field focusing on its ancient and wise expression, 8K resolution, photorealistic rendering with ray-traced shadows, award-winning digital art, trending on ArtStation.*
66
+
67
+ ### Cyberpunk Style
68
+
69
+ ![Cyberpunk Mewtwo](sample_images/cyberpunk_mewtwo.png)
70
+ *Prompt: A cybernetic Mewtwo floating in a neon-drenched futuristic cityscape at night. Bioluminescent purple energy coursing through transparent tubes connected to its body. Holographic interfaces surrounding it, reflecting on wet asphalt streets. Cyberpunk aesthetic with glowing technological implants, sharp contrasts between shadows and vibrant neon lights. Blade Runner inspired atmosphere, digital distortion effects, lens flares, and electric particle effects. Ultramodern sci-fi concept art with intricate mechanical details.*
71
+
72
+ ### Gothic Style
73
+
74
+ ![Gothic Gengar](sample_images/gothic_gengar.png)
75
+ *Prompt: A haunting Gengar lurking in a decrepit Victorian mansion. High contrast black and white photography style with dramatic chiaroscuro lighting. Gothic architecture with ornate details fading into deep shadows. Film noir aesthetic with grainy texture and vignette edges. Eerie atmosphere enhanced by fog tendrils and moonlight streaming through broken stained glass windows. Reminiscent of classic horror cinema, with stark silhouettes and ominous negative space. Timeless monochromatic art with haunting emotional depth.*
76
+
77
+ ### Watercolor Art Style
78
+
79
+ ![Watercolor Gardevoir](sample_images/watercolor_gardevoir.png)
80
+ *Prompt: A serene Gardevoir in an enchanted forest glade, surrounded by luminescent butterflies and delicate wildflowers. Soft watercolor style with gentle pastel hues, flowing brushstrokes creating an ethereal atmosphere. Dappled sunlight filtering through the canopy, creating a dreamy bokeh effect. Impressionistic details, emotional color palette with teal and lavender accents, artistic composition inspired by Studio Ghibli, whimsical fantasy illustration.*
81
+
82
+ ### Kawaii/Chibi Style
83
+
84
+ ![Kawaii Eevee](sample_images/kawaii_eevee.png)
85
+ *Prompt: An adorable chibi-style Eevee and its evolutions having a tea party in a candy-colored meadow. Kawaii anime style with exaggerated expressions and oversized eyes. Pastel rainbow palette with soft shading and cute decorative elements like hearts and stars. Playful composition with rounded shapes and simplified forms. Cheerful atmosphere with cartoon sparkles and emotion symbols. Inspired by children's animation, with clean outlines and flat color blocks. Whimsical and heartwarming illustration style perfect for merchandise.*
86
+
87
+ ![Grass Pokemon Tea](sample_images/grass_pokemon_tea.png)
88
+ *Prompt: A delightful tea party hosted by Bulbasaur, Chikorita, and Rowlet in a blooming flower garden. Cute storybook illustration style with soft rounded shapes. Tiny teacups and miniature pastries served on lily pad tables. Pastel green and pink color scheme with dainty flower patterns. Chibi proportions with oversized heads and stubby limbs. Cheerful expressions with sparkling eyes and happy smiles. Whimsical details like butterfly waiters and ladybug guests. Heartwarming scene rendered in a children's picture book style with gentle outlines and soft textures.*
89
+
90
+ ## Usage
91
+
92
+ You can use this model with the Diffusers library:
93
+
94
+ ```python
95
+ import torch
96
+ from diffusers import StableDiffusionPipeline
97
+
98
+ # Load the model
99
+ model_path = "path/to/PokemonStable-v1-5" # Replace with actual path
100
+ pipe = StableDiffusionPipeline.from_pretrained(
101
+ model_path,
102
+ torch_dtype=torch.float16,
103
+ safety_checker=None # Set to None to disable safety checker
104
+ )
105
+
106
+ # Move to GPU if available
107
+ if torch.cuda.is_available():
108
+ pipe = pipe.to("cuda")
109
+
110
+ # Generate image
111
+ prompt = "A cute Pikachu playing in a grassy field, high resolution, detailed"
112
+ image = pipe(
113
+ prompt=prompt,
114
+ num_inference_steps=50,
115
+ guidance_scale=7.5
116
+ ).images[0]
117
+
118
+ # Save image
119
+ image.save("generated_pokemon.png")
120
+ ```
121
+
122
+ ### Advanced Usage with Custom Scheduler
123
+
124
+ You can also customize the scheduler for different generation qualities:
125
+
126
+ ```python
127
+ from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
128
+ import torch
129
+
130
+ model_path = "path/to/PokemonStable-v1-5" # Replace with actual path
131
+
132
+ # Load model
133
+ pipe = StableDiffusionPipeline.from_pretrained(
134
+ model_path,
135
+ torch_dtype=torch.float16,
136
+ safety_checker=None
137
+ )
138
+
139
+ # Replace scheduler for faster inference
140
+ pipe.scheduler = DPMSolverMultistepScheduler.from_config(
141
+ pipe.scheduler.config,
142
+ algorithm_type="dpmsolver++",
143
+ solver_order=2
144
+ )
145
+
146
+ # Move to GPU
147
+ pipe = pipe.to("cuda")
148
+
149
+ # Generate with fewer steps
150
+ prompt = "A majestic Charizard in battle stance, fire breathing, detailed scales, epic lighting"
151
+ image = pipe(
152
+ prompt=prompt,
153
+ num_inference_steps=25, # Fewer steps needed with DPM-Solver++
154
+ guidance_scale=7.5
155
+ ).images[0]
156
+
157
+ image.save("charizard_dpm_solver.png")
158
+ ```
159
+
160
+ ## Prompt Engineering Tips
161
+
162
+ For optimal results, consider the following prompt engineering techniques:
163
+
164
+ 1. **Specify Pokémon Names**: Include specific Pokémon names like "Pikachu", "Bulbasaur", "Charizard", etc.
165
+ 2. **Add Scene Descriptions**: Describe the environment, such as "in a forest", "in battle", "sleeping", etc.
166
+ 3. **Include Style Descriptors**: Add style terms like "high resolution", "detailed", "cartoon style", etc.
167
+ 4. **Emotional Context**: Include emotional states like "happy", "angry", "cute", etc.
168
+ 5. **Artistic Techniques**: Specify art styles like "watercolor", "oil painting", "digital art", etc.
169
+ 6. **Lighting and Atmosphere**: Describe lighting conditions like "sunset", "moonlight", "studio lighting", etc.
170
+ 7. **Composition Guidelines**: Add terms like "rule of thirds", "dynamic pose", "close-up shot", etc.
171
+
172
+ ## Limitations
173
+
174
+ - The model may occasionally generate Pokémon with anatomical inaccuracies
175
+ - Text rendering within images may be illegible or distorted
176
+ - Complex compositions with multiple Pokémon may not always position them correctly
177
+ - The model performs best with English prompts
178
+ - As with all Stable Diffusion models, it inherits certain biases and limitations from the base model
179
+ - The safety checker may occasionally filter legitimate content; it can be disabled but use with caution
180
+
181
+ ## Ethical Considerations
182
+
183
+ This model is intended for creative and artistic purposes only. Users should:
184
+
185
+ - Respect the intellectual property rights of The Pokémon Company and Nintendo
186
+ - Avoid generating harmful, offensive, or inappropriate content
187
+ - Not use generated images for commercial purposes without proper licensing
188
+ - Be transparent about AI-generated content when sharing
189
+
190
+ ## License
191
+
192
+ This model is based on Stable Diffusion v1.5 and follows the [CreativeML OpenRAIL-M](https://huggingface.co/spaces/CompVis/stable-diffusion-license) license of the original model.
193
+
194
+ ## Acknowledgements
195
+
196
+ Thanks to all artists and creators who have contributed to the Pokémon franchise, and to Stability AI for developing the Stable Diffusion model. Special thanks to the creators of the [reach-vb/pokemon-blip-captions](https://huggingface.co/datasets/reach-vb/pokemon-blip-captions) dataset used for training this model.
197
+
198
+ ## Citation
199
+
200
+ If you use this model in your research, please cite:
201
+
202
+ ```bibtex
203
+ @InProceedings{Rombach_2022_CVPR,
204
+ author = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn},
205
+ title = {High-Resolution Image Synthesis With Latent Diffusion Models},
206
+ booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
207
+ month = {June},
208
+ year = {2022},
209
+ pages = {10684-10695}
210
+ }
211
+ ```