support sd3.5

This commit is contained in:
Artiprocher
2024-11-06 19:57:01 +08:00
parent 344cbd3286
commit 39ddb7c3e3
5 changed files with 175 additions and 514 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")