Skip to content

Implementation of MVDream using huggingface's diffusers

Notifications You must be signed in to change notification settings

lizhiqi49/mvdream-diffusers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mvdream-diffusers

Implementation of MVDream using huggingface's diffusers.

The model checkpoint of version sd-v2.1 can be found at this huggingface page.

Usage

import torch
from mvdream.utils import get_camera
from mvdream.pipeline_mvdream import MVDreamPipeline

pipe = MVDreamPipeline.from_pretrained(
    "lzq49/mvdream-sd21-diffusers", torch_dtype=torch.float16, trust_remote_code=True
)
pipe.to("cuda")

c2ws = get_camera(4, 0, 0).cuda()

with torch.cuda.amp.autocast(dtype=torch.float16):
    images = pipe(
        prompt=["a cute teddy bear"],   # batch size = 1
        c2ws=c2ws.unsqueeze(0),         # batch size = 1
        height=256,
        width=256,
        output_type="np"
    ).images

About

Implementation of MVDream using huggingface's diffusers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages