File size: 699 Bytes
a8a63dd fbd4c7f 5d590ff a8a63dd 5d590ff f0e1e27 8747d5d a8a63dd 8747d5d fbd4c7f 8747d5d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import torch
import kiui
import numpy as np
import argparse
from mvdream.pipeline_mvdream import MVDreamPipeline
pipe = MVDreamPipeline.from_pretrained(
"./weights", # local weights
# "ashawkey/mvdream-sd2.1-diffusers",
torch_dtype=torch.float16
)
pipe = pipe.to("cuda")
parser = argparse.ArgumentParser(description="MVDream")
parser.add_argument("prompt", type=str, default="a cute owl 3d model")
args = parser.parse_args()
while True:
image = pipe(args.prompt)
grid = np.concatenate(
[
np.concatenate([image[0], image[2]], axis=0),
np.concatenate([image[1], image[3]], axis=0),
],
axis=1,
)
kiui.vis.plot_image(grid)
|