文件列表 diffusers_xl_canny_full.safetensors diffusers_xl_canny_mid.safetensors diffusers_xl_canny_small.safetensors diffusers_xl_depth_full.safetensors diffusers_xl_depth_mid.safetensors diffusers_xl_depth_small.safetensors diffusers_xl_canny_full.safetensors (2386.23M) 下载反馈...
float16, # 使用半精度 local_files_only=True, use_safetensors=True, variant='fp16', safety_checker=None, # safety_checker:用于检测NSFW内容 ).to("cuda") outs = pipe( prompt="", width=512, height=512, num_inference_steps=30, guidance_scale=7.5, negative_prompt="", num_images_per_pr...
action="store_true",help="If serializing the variables in FP16 precision.")# 添加 use_safetensors 参数,指示是否以 safetensors 格式序列化conversion_parser.add_argument("--use_safetensors", action="store_true",help="If serializing in the safetensors format.")# 添加 use_auth_token ...
pipe.load_lora_weights("CiroN2022/toy-face", weight_name="toy_face_sdxl.safetensors", adapter_name="toy") pipe.load_lora_weights("nerijs/pixel-art-xl", weight_name="pixel-art-xl.safetensors", adapter_name="pixel") # Combine them. pipe.set_adapters(["pixel", "toy"], adapter_we...
然后,我们使用load_lora_weights方法。这里,我们加载一个示例 LoRA:ostris/super-cereal-sdxl-lora,注意需要指定权重的文件名: pipeline.load_lora_weights("ostris/super-cereal-sdxl-lora",weight_name="cereal_box_sdxl_v1.safetensors")image=pipeline(prompt).images[0]image ...
原生支持加载safetensors格式模型,在线读取转换为paddle模型后,在ComfyUI中使用ppdiffusers的pipeline运行。 ## 已支持Node Stable Diffusion 1.5系列: - SD1.5模型加载转换 - SD1.5文生图 - SD1.5图生图 - SD1.5图像局部修改 Stable Diffusion XL系列: - SDXL模型加载转换 - SDXL文生图 - SDXL图生图 - SDXL...
from diffusers import AutoPipelineForImage2Image pipe = AutoPipelineForImage2Image.from_pretrained( 'stabilityai/stable-diffusion-2-1', torch_dtype=torch.float16, use_safetensors=True, ).to(device) image_path = 'images/abstract_art_2.jpg' init_image = Image.open(image_path).convert("RGB"...
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True ) pipe.to("cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt=prompt).images[0] ...
url = "https://huggingface.co/playgroundai/playground-v2.5-1024px-aesthetic/blob/main/playground-v2.5-1024px-aesthetic.safetensors" pipeline = StableDiffusionXLPipeline.from_single_file(url) pipeline.to(device="cuda", dtype=torch.float16) ...
{network_weight}") if model_util.is_safetensors(network_weight) and args.network_show_meta: from safetensors.torch import safe_open with safe_open(network_weight, framework="pt") as f: metadata = f.metadata() if metadata is not None: logger.info(f"metadata for: {network_weigh...