Instructions to use NoMoreCopyrightOrg/flux-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use NoMoreCopyrightOrg/flux-dev with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("NoMoreCopyrightOrg/flux-dev", 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
- Local Apps
- Draw Things
- DiffusionBee
Upload handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -32,7 +32,7 @@ class EndpointHandler:
|
|
| 32 |
self.pipeline.transformer.fuse_qkv_projections()
|
| 33 |
self.pipeline.vae.fuse_qkv_projections()
|
| 34 |
if IS_COMPILE: self.pipeline = compile_pipeline(self.pipeline)
|
| 35 |
-
self.pipeline.to(
|
| 36 |
|
| 37 |
@torch.inference_mode()
|
| 38 |
def __call__(self, data: Dict[str, Any]) -> Image.Image:
|
|
|
|
| 32 |
self.pipeline.transformer.fuse_qkv_projections()
|
| 33 |
self.pipeline.vae.fuse_qkv_projections()
|
| 34 |
if IS_COMPILE: self.pipeline = compile_pipeline(self.pipeline)
|
| 35 |
+
self.pipeline.to("cuda")
|
| 36 |
|
| 37 |
@torch.inference_mode()
|
| 38 |
def __call__(self, data: Dict[str, Any]) -> Image.Image:
|