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 prompt for the provocative whale scene
prompts = {
"provocative_whale_scene": (
"A humorous digital painting featuring a giant, self-absorbed whale with a mirror around its neck, striking a pose of extreme confidence. "
"The whale is being adored by Mera, the Aqua Woman from Aquaman, who is playfully and provocatively positioned on top of the whale, showing her admiration. "
"Mera is elegantly dressed, with a mischievous expression as she interacts with the whale in an exaggerated, playful manner. "
"In the background, Aquaman looks on in a state of shock and disbelief, his muscles tensed in confusion. "
"The underwater scene is colorful and vibrant, with whimsical and exaggerated features highlighting the humorous and provocative nature of the situation."
)
}
# Generate the image for each 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-30/cr9383te878c73etlqe0-2/b26680df70699da3a0d4ead87c0ee2c7_high.webp)

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 prompt for the provocative whale scene prompts = { "provocative_whale_scene": ( "A humorous digital painting featuring a giant, self-absorbed whale with a mirror around its neck, striking a pose of extreme confidence. " "The whale is being adored by Mera, the Aqua Woman from Aquaman, who is playfully and provocatively positioned on top of the whale, showing her admiration. " "Mera is elegantly dressed, with a mischievous expression as she interacts with the whale in an exaggerated, playful manner. " "In the background, Aquaman looks on in a state of shock and disbelief, his muscles tensed in confusion. " "The underwater scene is colorful and vibrant, with whimsical and exaggerated features highlighting the humorous and provocative nature of the situation." ) } # Generate the image for each 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()
프롬프트
Copy prompts
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 prompt for the provocative whale scene
prompts = {
"provocative_whale_scene": (
"A humorous digital painting featuring a giant
,
self-absorbed whale with a mirror around its neck
,
striking a pose of extreme confidence
.
"
"The whale is being adored by Mera
,
the Aqua Woman from Aquaman
,
who is playfully and provocatively positioned on top of the whale
,
showing her admiration
.
"
"Mera is elegantly dressed
,
with a mischievous expression as she interacts with the whale in an exaggerated
,
playful manner
.
"
"In the background
,
Aquaman looks on in a state of shock and disbelief
,
his muscles tensed in confusion
.
"
"The underwater scene is colorful and vibrant
,
with whimsical and exaggerated features highlighting the humorous and provocative nature of the situation
.
"
)
}
# Generate the image for each 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()
정보
Checkpoint & LoRA

Checkpoint
SeaArt Infinity
#SeaArt Infinity
0개의 댓글
0
0
0