johny12353q's picture
feat: default poses and photos, intro, image countm synchonous requests
38dd8ce
class Style:
def __init__(
self,
style_name,
prompt,
negative_prompt,
num_steps=30,
identity_strength_ratio=0.8,
adapter_strength_ratio=0.6,
pose_strength_ratio=0.6,
canny_strength_ratio=0.4,
depth_strength_ratio=0.4,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose", "canny", "depth"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
):
self.style_name = style_name
self.prompt = prompt
self.negative_prompt = negative_prompt
self.num_steps = num_steps
self.identity_strength_ratio = identity_strength_ratio
self.adapter_strength_ratio = adapter_strength_ratio
self.pose_strength_ratio = pose_strength_ratio
self.canny_strength_ratio = canny_strength_ratio
self.depth_strength_ratio = depth_strength_ratio
self.guidance_strength_ratio = guidance_strength_ratio
self.generations_repeat_count = generations_repeat_count
self.controlnet_selection = controlnet_selection
self.scheduler = scheduler
self.enable_lcm = enable_lcm
self.enhance_face_region = enhance_face_region
predefined_styles = {
"Jungle": Style(
style_name="Jungle",
prompt="Leader amazon fighter with armour. Post-apocalyptic. One with the nature. Gathering herbs and hunting animals. Loyal pack of wolves and jungle in the background. Morning sunrise light. Epic digital art style, (detailed) (intricate) (8k) (HDR) (cinematic lighting) (sharp focus)",
negative_prompt="out of focus, deformed, deformed eyes, deformed face, deformed legs and toes, lowres, low resolution, closed eyes, glow, nude",
num_steps=30,
identity_strength_ratio=0.6,
adapter_strength_ratio=0.6,
pose_strength_ratio=0.4,
canny_strength_ratio=0.4,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose", "canny", "depth"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
"Surfer": Style(
style_name="Surfer",
prompt="Surfer on a beach with palm trees in the background. Sunset over water lighting. Vintage neo-soul art style feeling. Polaroid photo. (detailed) (intricate) (8k) (HDR) (cinematic lighting) (sharp focus)",
negative_prompt="out of focus, deformed, deformed eyes, deformed face, deformed legs and toes, lowres, low resolution, closed eyes, glow, nude",
num_steps=30,
identity_strength_ratio=0.6,
adapter_strength_ratio=0.6,
pose_strength_ratio=0.4,
canny_strength_ratio=0.4,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose", "canny", "depth"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
"Japanese Samurai": Style(
style_name="Japanese Samurai",
prompt="Japanese samurai fighter with face tattoo, long hair, pale skin. Sakura blooming trees in the background. Sunrise light. Epic digital art style. (detailed) (intricate) (8k) (HDR) (soft lighting) (sharp focus)",
negative_prompt="(lowres, low quality), blur, out of focus, deformed, deformed eyes, deformed face, deformed legs and toes, orange, smile, woman, girl",
num_steps=30,
identity_strength_ratio=1.1,
adapter_strength_ratio=0.7,
pose_strength_ratio=0.4,
canny_strength_ratio=0.35,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose", "canny", "depth"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
"Cyberpunk": Style(
style_name="Cyberpunk",
prompt="Cyberpunk art style, characterized by futuristic urban landscapes, depicted at night, neon lights, illuminating rain-soaked streets, combines high-tech elements with a gritty, dystopian atmosphere, showcasing advanced technology, cybernetic enhancements, and sprawling cityscapes overshadowed by corporate skyscrapers. The color palette leans heavily on dark tones contrasted with vibrant blues, pinks, and greens, creating a sense of depth and complexity within the urban decay. (detailed) (intricate) (8k) (HDR) (cinematic lighting) (sharp focus)",
negative_prompt="deformed face, deformed eyes, lowres, low resolution, closed eyes, nude",
num_steps=30,
identity_strength_ratio=0.7,
adapter_strength_ratio=0.6,
pose_strength_ratio=0.4,
canny_strength_ratio=0.4,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose", "canny", "depth"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
"Sculpture": Style(
style_name="Sculpture",
prompt="Ancient Greek god of abundance, elegantly posed with a cornucopia overflowing with fruits, grains, and coins. The sculpture is envisioned in exquisite marble, with meticulous attention to the textures of the robes, hair, and abundance symbols. The background is simple, focusing on the figure's serene expression and the wealth it symbolizes, capturing the essence of ancient Greek artistry. (detailed) (intricate) (8k) (HDR) (cinematic lighting) (sharp focus)",
negative_prompt="deformed face, deformed eyes, lowres, low resolution, closed eyes, nude",
num_steps=30,
identity_strength_ratio=0.7,
adapter_strength_ratio=0.6,
pose_strength_ratio=0.4,
canny_strength_ratio=0.4,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose", "canny", "depth"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
"Graffiti": Style(
style_name="Graffiti",
prompt="Design an avatar that captures the essence of graffiti art, marked by its vibrant color scheme and bold, stylized lettering that jumps off the wall with dynamic energy. The composition should be lively and expressive, incorporating elements of urban culture and street art aesthetics, such as spray paint drips and stencil art. Emphasize a sense of movement and spontaneity, showcasing the raw, impactful visual language characteristic of graffiti.",
negative_prompt="deformed face, deformed eyes, lowres, low resolution, closed eyes, nude, photorealistic",
num_steps=30,
identity_strength_ratio=0.6,
adapter_strength_ratio=0.4,
pose_strength_ratio=0.2,
canny_strength_ratio=0.4,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
"Pop Art": Style(
style_name="Pop-Art",
prompt="Create painting that captures the essence of pop art, focusing on the figure of a charismatic singer from the rock 'n' roll era. The central figure should be portrayed with exaggerated, dynamic facial features and a stylized hairdo indicative of the time. Employ a palette of saturated primary colors—bold reds, blues, and yellows—with sharp contrasts and flat, unmodulated areas of color. Include elements such as vinyl records and musical notes to frame the subject, reinforcing the theme of the golden age of rock music. The background should be vibrant, using starbursts or rays emanating from behind the figure, symbolizing the electrifying impact of the music. Integrate pop culture elements like polka dots or small symbolic motifs related to the era, ensuring that the overall composition is balanced yet striking, with a clear, graphic quality.",
negative_prompt="deformed face, deformed eyes, lowres, low resolution, closed eyes, nude",
num_steps=30,
identity_strength_ratio=0.6,
adapter_strength_ratio=0.4,
pose_strength_ratio=0.2,
canny_strength_ratio=0.4,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
"Oil portrait": Style(
style_name="Oil portrait",
prompt="Envision an oil painting depicting an elderly scholar from the 17th century, with a focus on the rich textural interplay between light and shadow, emulating Rembrandt's mastery of chiaroscuro. The scholar, captured waist-up and angled slightly to the left, gazes thoughtfully at the viewer, his eyes deep and reflective. His face, detailed with fine, expressive brushwork, should convey a sense of wisdom and experience, with subtle pinks and warm flesh tones emerging from a primarily subdued palette. His hair and clothing, executed with looser, more impressionistic strokes, fade into the darker, brown-tinged background, lending an air of intimacy and immediacy to the work. The canvas's texture should reveal the layers of paint, capturing the very act of creation. Use a fine thread canvas with a red-brown ground, overlaid with a thin gray, to imbue the painting with a sense of depth and history. The subject's hands, clasped or holding a quill or book, emerge from the shadowy folds of his attire, symbolizing his scholarly pursuits. Highlight the play of light across the form to accentuate the three-dimensionality and gravitas of the figure. Add a personal signature and date to the corner, imitating Rembrandt's own practice of marking his works with his presence.",
negative_prompt="deformed face, deformed eyes, lowres, low resolution, closed eyes, nude",
num_steps=30,
identity_strength_ratio=0.6,
adapter_strength_ratio=0.4,
pose_strength_ratio=0.3,
canny_strength_ratio=0.3,
depth_strength_ratio=0.2,
guidance_strength_ratio=5,
generations_repeat_count=1,
controlnet_selection=["pose", "canny", "depth"],
scheduler="EulerDiscreteScheduler",
enable_lcm=False,
enhance_face_region=True,
),
}