Merge pull request #262 from modelscope/sd3.5

Sd3.5
This commit is contained in:
Zhongjie Duan
2024-11-11 18:47:49 +08:00
committed by GitHub
7 changed files with 185 additions and 522 deletions

View File

@@ -0,0 +1,19 @@
from diffsynth import ModelManager, SD3ImagePipeline
import torch
model_manager = ModelManager(torch_dtype=torch.bfloat16, device="cuda", model_id_list=["StableDiffusion3.5-large"])
pipe = SD3ImagePipeline.from_model_manager(model_manager)
prompt = "A capybara holding a sign that reads Hello World"
negative_prompt = ""
image = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
cfg_scale=3.5,
num_inference_steps=28, width=1024, height=1024,
seed=0
)
image.save("image_1024.jpg")