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
change where to look for pipeline
Browse files
models/pipeline_loader.py
CHANGED
|
@@ -29,14 +29,14 @@ def get_pipeline(model_path):
|
|
| 29 |
# Use the local pipeline file for custom_pipeline
|
| 30 |
pipe = DiffusionPipeline.from_pretrained(
|
| 31 |
model_path,
|
| 32 |
-
custom_pipeline=
|
| 33 |
trust_remote_code=True,
|
| 34 |
)
|
| 35 |
else:
|
| 36 |
# Fallback: try unconditional
|
| 37 |
pipe = DiffusionPipeline.from_pretrained(
|
| 38 |
model_path,
|
| 39 |
-
custom_pipeline=
|
| 40 |
trust_remote_code=True,
|
| 41 |
)
|
| 42 |
|
|
|
|
| 29 |
# Use the local pipeline file for custom_pipeline
|
| 30 |
pipe = DiffusionPipeline.from_pretrained(
|
| 31 |
model_path,
|
| 32 |
+
custom_pipeline=model_path,
|
| 33 |
trust_remote_code=True,
|
| 34 |
)
|
| 35 |
else:
|
| 36 |
# Fallback: try unconditional
|
| 37 |
pipe = DiffusionPipeline.from_pretrained(
|
| 38 |
model_path,
|
| 39 |
+
custom_pipeline=model_path,
|
| 40 |
trust_remote_code=True,
|
| 41 |
)
|
| 42 |
|