Unconditional Image Generation
Diffusers
Safetensors
English
lightningdit
image-generation
class-conditional
imagenet
flow-matching
Instructions to use BiliSakura/LightningDiT-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BiliSakura/LightningDiT-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("BiliSakura/LightningDiT-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update LightningDit-XL-1-256/pipeline.py
Browse files
LightningDit-XL-1-256/pipeline.py
CHANGED
|
@@ -339,7 +339,6 @@ class LightningDiTPipeline(DiffusionPipeline):
|
|
| 339 |
|
| 340 |
image = self._decode_latents(latents)
|
| 341 |
if self.vae is not None:
|
| 342 |
-
image = (image / 2 + 0.5).clamp(0, 1)
|
| 343 |
image = self.image_processor.postprocess(image, output_type=output_type)
|
| 344 |
|
| 345 |
self.maybe_free_model_hooks()
|
|
|
|
| 339 |
|
| 340 |
image = self._decode_latents(latents)
|
| 341 |
if self.vae is not None:
|
|
|
|
| 342 |
image = self.image_processor.postprocess(image, output_type=output_type)
|
| 343 |
|
| 344 |
self.maybe_free_model_hooks()
|