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 fantasy shoujo prompt
prompts = {
"fantasy_shoujo_scene": (
"A magical and enchanting fantasy scene in a shoujo style. The setting is a whimsical, enchanted forest filled with glowing, ethereal lights and mystical creatures. "
"In the center, a young heroine with long, flowing hair and a sparkling, elaborate dress stands on a gently glowing path. Her expression is one of wonder and hope. "
"Beside her, a charming, mysterious prince with a flowing cape and a gentle smile offers her a glowing, magical artifact. The prince's eyes are filled with admiration and affection. "
"The background features an array of fantastical flora and fauna, including luminescent flowers, delicate fairies, and a shimmering waterfall. "
"The scene is bathed in soft, pastel colors with a dreamlike quality, capturing the romance and magical atmosphere typical of shoujo and fantasy genres. "
"The overall image conveys a sense of magic, romance, and wonder, inviting viewers into a beautifully illustrated world where dreams come true."
)
}
# 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/cr9e9fde878c73883gig-1/d819407c672862a5506aff5eb0235421_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 fantasy shoujo prompt
prompts = {
"fantasy_shoujo_scene": (
"A magical and enchanting fantasy scene in a shoujo style
.
The setting is a whimsical
,
enchanted forest filled with glowing
,
ethereal lights and mystical creatures
.
"
"In the center
,
a young heroine with long
,
flowing hair and a sparkling
,
elaborate dress stands on a gently glowing path
.
Her expression is one of wonder and hope
.
"
"Beside her
,
a charming
,
mysterious prince with a flowing cape and a gentle smile offers her a glowing
,
magical artifact
.
The prince's eyes are filled with admiration and affection
.
"
"The background features an array of fantastical flora and fauna
,
including luminescent flowers
,
delicate fairies
,
and a shimmering waterfall
.
"
"The scene is bathed in soft
,
pastel colors with a dreamlike quality
,
capturing the romance and magical atmosphere typical of shoujo and fantasy genres
.
"
"The overall image conveys a sense of magic
,
romance
,
and wonder
,
inviting viewers into a beautifully illustrated world where dreams come true
.
"
)
}
# 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
1
0