Instructions to use zeyuren2002/EvalMDE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use zeyuren2002/EvalMDE with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("zeyuren2002/EvalMDE", 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
| import numpy as np | |
| ROT_LIGHT_NUM_LIGHT = 30 | |
| ROT_LIGHT_NUM_LOOP = 3 | |
| def gen_rot_light__light_pos(num_light, num_loop): | |
| theta = np.linspace(0, np.pi, num_light) | |
| phi = np.linspace(0, 2 * np.pi * num_loop, num_light) | |
| x = np.sin(theta) * np.cos(phi) | |
| z = np.sin(theta) * np.sin(phi) | |
| y = np.cos(theta) | |
| return np.stack([x, y, z], axis=-1) | |