"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "32290d87f6e1550cf251e318b9543dd1fdf54fd2"
Commit ca1de4ea authored by luopl's avatar luopl
Browse files

Upload New File

parent 417c6691
from diffusers import AutoPipelineForText2Image
import torch
from src.linfusion import LinFusion
from src.tools import seed_everything
sd_repo = "runwayml/stable-diffusion-v1-5"
pipeline = AutoPipelineForText2Image.from_pretrained(
sd_repo, torch_dtype=torch.float16, variant="fp16"
).to(torch.device("cuda"))
linfusion = LinFusion.construct_for(pipeline, pretrained_model_name_or_path="Yuanshi/LinFusion-1-5")
seed_everything(123)
image = pipeline(
"An astronaut floating in space. Beautiful view of the stars and the universe in the background."
).images[0]
image.save("astronaut_space-1-5.png")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment