Prgckwb's picture
:tada: change some process
9aa99b5
raw
history blame contribute delete
No virus
1.56 kB
import dataclasses
@dataclasses.dataclass
class Example:
prompt: str
model_id: str = "stabilityai/stable-diffusion-3-medium-diffusers"
negative_prompt: str = ''
width: int = 1024
height: int = 1024
guidance_scale: float = 7.5
num_inference_step: int = 28
num_images: int = 4
use_safety_checker: bool = True
use_model_offload: bool = False
seed: int = 8888
def to_list(self):
return [
self.prompt, self.model_id, self.negative_prompt,
self.width, self.height, self.guidance_scale,
self.num_inference_step, self.num_images, self.use_safety_checker, self.use_model_offload,
self.seed
]
EXAMPLES = [
Example(
prompt='A cat holding a sign that says Hello world'
).to_list(),
Example(
prompt='Beautiful pixel art of a Wizard with hovering text "Achivement unlocked: Diffusion models can spell now"'
).to_list(),
Example(
prompt='A corgi wearing sunglasses says "U-Net is OVER!!"'
).to_list(),
Example(
prompt='Cinematic photo of a smiling beautiful Japanese fashion model',
model_id='Beautiful Realistic Asians',
negative_prompt=(
"(worst_quality)++ (low quality)++ "
"(BadNegAnatomyV1-neg) (Deep Negative) (EasyNegative) (negative_hand-neg) "
"bradhands cartoon, cgi, render, illustration, painting, drawing"
),
width=640,
height=1024,
guidance_scale=5.0,
num_inference_step=50,
).to_list()
]