From stable_diffusion import StableDiffusionPipeline import torch from PIL impor
![from stable_diffusion import StableDiffusionPipeline
import torch
from PIL import Image
# Load the Stable Diffusion model
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-4")
pipe = pipe.to("cuda") # Use GPU if available
# Define the detailed visual novel prompt
prompts = {
"visual_novel_scene": (
"A beautiful and emotionally charged scene in a visual novel, set in a serene, cherry blossom-filled park at sunset. "
"Two characters stand facing each other, a young woman with flowing, long hair and a shy smile, and a young man who looks "
"nervous but determined. The cherry blossoms are gently falling around them, creating a soft pink carpet on the ground. "
"The warm, golden sunlight filters through the trees, casting a soft glow on the characters, enhancing the romantic atmosphere. "
"The background shows a peaceful lake with a small wooden bridge, reflecting the warm colors of the sunset. "
"The scene is filled with subtle, delicate details, such as the blush on the woman’s cheeks and the gentle breeze "
"playing with their hair. The overall mood is tender and full of unspoken emotions, capturing the essence of a pivotal moment in their relationship."
)
}
# Generate the image for the prompt
for name, prompt in prompts.items():
# Generate the image using the prompt
image = pipe(prompt).images[0]
# Save the generated image
filename = f"{name.lower().replace(' ', '_')}.png"
image.save(filename)
print(f"Saved image: {filename}")
# Optionally, show the generated image
image.show()](https://image.cdn2.seaart.me/2024-08-31/cr9e5f5e878c73e3a870-2/e27fc6ed0d2925708322facb1925bbda_high.webp)
Generation Data
Records
Prompts
Copy
from stable_diffusion import StableDiffusionPipeline
import torch
from PIL import Image
# Load the Stable Diffusion model
pipe = StableDiffusionPipeline
.
from_pretrained("stable-diffusion-v1-4")
pipe = pipe
.
to("cuda") # Use GPU if available
# Define the detailed visual novel prompt
prompts = {
"visual_novel_scene": (
"A beautiful and emotionally charged scene in a visual novel
,
set in a serene
,
cherry blossom-filled park at sunset
.
"
"Two characters stand facing each other
,
a young woman with flowing
,
long hair and a shy smile
,
and a young man who looks "
"nervous but determined
.
The cherry blossoms are gently falling around them
,
creating a soft pink carpet on the ground
.
"
"The warm
,
golden sunlight filters through the trees
,
casting a soft glow on the characters
,
enhancing the romantic atmosphere
.
"
"The background shows a peaceful lake with a small wooden bridge
,
reflecting the warm colors of the sunset
.
"
"The scene is filled with subtle
,
delicate details
,
such as the blush on the woman’s cheeks and the gentle breeze "
"playing with their hair
.
The overall mood is tender and full of unspoken emotions
,
capturing the essence of a pivotal moment in their relationship
.
"
)
}
# Generate the image for the prompt
for name
,
prompt in prompts
.
items():
# Generate the image using the prompt
image = pipe(prompt)
.
images[0]
# Save the generated image
filename = f"{name
.
lower()
.
replace(' '
,
'_')}
.
png"
image
.
save(filename)
print(f"Saved image: {filename}")
# Optionally
,
show the generated image
image
.
show()
INFO
Checkpoint & LoRA

Checkpoint
SeaArt Infinity
#Anime
#SeaArt Infinity
0 comment
0
0
0