计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
genai-vision【效率与协作】Integrating Stable Diffusion for vision generation and Whisper for audio/multimodal tasks.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
%%{init: {"theme": "default", "flowchart": {"useMaxWidth": true}}}%%
graph TD
A[User Audio] --> B(Whisper)
B -->|Text Prompt| C[Stable Diffusion]
C --> D[Generated Image]
import torch
from diffusers import StableDiffusionPipeline
def generate_image(prompt: str, output_path: str):
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5",
torch_dtype=torch.float16
).to("cuda")
pipe.enable_xformers_memory_efficient_attention()
image = pipe(prompt, num_inference_steps=30).images[0]
image.save(output_path)