Instructions to use 43ntropy/NEvo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use 43ntropy/NEvo with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("43ntropy/NEvo", 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
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| from typing import Any | |
| class TextToImageGenerator(ABC): | |
| def generate(self, prompts: list[str], *, generator: Any | None = None, **kwargs) -> list[Any]: | |
| ... | |
| class ImageToVideoGenerator(ABC): | |
| def generate(self, image: Any, prompt: str, *, generator: Any | None = None, **kwargs) -> Any: | |
| ... | |
| def generate_batch(self, images: list[Any], prompts: list[str], *, generators: list[Any] | None = None, **kwargs) -> list[Any]: | |
| generators = generators or [None] * len(images) | |
| return [ | |
| self.generate(image, prompt, generator=gen, **kwargs) | |
| for image, prompt, gen in zip(images, prompts, generators) | |
| ] | |