🚀 適用於Stable Diffusion的《華爾街日報》頭像插畫風格模型
本項目是一個微調後的Stable Diffusion模型,它能模仿《華爾街日報》(WSJ)為作者和主題創作獨特肖像的風格。你只需使用 wsj hedcut of <subject> 這樣的提示詞,就能生成具有該報頭像插畫風格的圖像。此外,該模型還能在DreamBooth環境中使用,用於訓練特定人臉或其他主題,以生成定製化的獨特頭像插畫。
🚀 快速開始
安裝依賴庫
代碼示例
from diffusers import StableDiffusionPipeline
import torch
model_id = "dmillar/wsj-hedcut-v1"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "wsj hedcut of a woman"
image = pipe(prompt).images[0]
image.save("./woman_hedcut.png")
💻 使用示例
基礎用法
上述代碼展示了基礎的使用方法,通過指定模型ID加載模型,設置提示詞,然後生成圖像並保存。
高級用法
在生成圖像時,可以調整一些參數來獲得不同的效果,例如示例圖片中的參數設置。以下是一個示例:
from diffusers import StableDiffusionPipeline
import torch
model_id = "dmillar/wsj-hedcut-v1"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "wsj hedcut of audrey hepburn, portrait, detailed, sharp, black and white, pleasing, white background"
steps = 20
sampler = "Euler a"
cfg_scale = 7
seed = 231828633
generator = torch.Generator(device="cuda").manual_seed(seed)
image = pipe(prompt, num_inference_steps=steps, generator=generator, guidance_scale=cfg_scale).images[0]
image.save("./audrey_hepburn_hedcut.png")
📚 詳細文檔
示例圖片
以下是使用該模型生成的一些示例圖片及其對應的提示詞和參數:
提示詞: "wsj hedcut of audrey hepburn, portrait, detailed, sharp, black and white, pleasing, white background",步數: 20,採樣器: "Euler a",CFG scale: 7,隨機種子: 231828633
提示詞: "wsj hedcut of the Kylian Mbappe, male, portrait, detailed, sharp, black and white, pleasing, white background",步數: 20,採樣器: "Euler a",CFG scale: 7,隨機種子: 1863052262
提示詞: "wsj hedcut of tom hanks, portrait, detailed, sharp, black and white, pleasing, white background",步數: 20,採樣器: Euler a,CFG scale: 7,隨機種子: 224907260

注意事項
⚠️ 重要提示
如果你使用此模型,請盡力標明訓練圖像的主要藝術家Noli Novak,並遵守許可證要求的其他披露和限制。
📄 許可證
本模型使用的許可證為creativeml-openrail-m。
屬性 |
詳情 |
模型類型 |
微調後的Stable Diffusion模型 |
訓練數據 |
未提及 |