Instructions to use schrum2/MarioDiffusion-MLM-regular0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use schrum2/MarioDiffusion-MLM-regular0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("schrum2/MarioDiffusion-MLM-regular0", 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 encoder from elsewhere
Browse files
text_diffusion_pipeline.py
CHANGED
|
@@ -5,13 +5,13 @@ import os
|
|
| 5 |
from diffusers import DDPMPipeline, UNet2DConditionModel, DDPMScheduler
|
| 6 |
import json
|
| 7 |
# Running the main at the end of this requires messing with this import
|
| 8 |
-
from text_model import TransformerModel
|
| 9 |
import torch
|
| 10 |
import torch.nn.functional as F
|
| 11 |
from transformers import AutoTokenizer, AutoModel
|
| 12 |
import common_settings as common_settings
|
| 13 |
import sentence_transformers_helper as st_helper
|
| 14 |
-
import text_model as text_model
|
| 15 |
from general_training_helper import get_scene_from_embeddings
|
| 16 |
|
| 17 |
class PipelineOutput(NamedTuple):
|
|
|
|
| 5 |
from diffusers import DDPMPipeline, UNet2DConditionModel, DDPMScheduler
|
| 6 |
import json
|
| 7 |
# Running the main at the end of this requires messing with this import
|
| 8 |
+
from text_encoder.text_model import TransformerModel
|
| 9 |
import torch
|
| 10 |
import torch.nn.functional as F
|
| 11 |
from transformers import AutoTokenizer, AutoModel
|
| 12 |
import common_settings as common_settings
|
| 13 |
import sentence_transformers_helper as st_helper
|
| 14 |
+
import text_encoder.text_model as text_model
|
| 15 |
from general_training_helper import get_scene_from_embeddings
|
| 16 |
|
| 17 |
class PipelineOutput(NamedTuple):
|