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 PvPvE genre
prompts = {
"pvpve_battle_scene": (
"A high-stakes PvPvE battle scene in a vibrant digital painting. The image features a chaotic and dynamic battlefield where players are engaged in combat with both other players and fierce environment-based enemies. "
"In the foreground, a team of diverse characters, each with unique armor and weapons, fights against powerful AI-controlled monsters or hostile creatures. "
"In the background, rival players can be seen competing for control over strategic points or resources, adding a layer of tension and competition. "
"The environment is a mix of rugged terrain and advanced technology, showcasing a post-apocalyptic or futuristic setting with detailed textures and vivid colors. "
"Explosions, magical effects, and environmental hazards add to the chaos, creating an intense and immersive atmosphere. The overall composition emphasizes the thrill of battling on multiple fronts."
)
}
# 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/cr9ecude878c73e4a13g-2/8a4217298bb866592cb9af3d9fd537b2_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 PvPvE genre prompts = { "pvpve_battle_scene": ( "A high-stakes PvPvE battle scene in a vibrant digital painting. The image features a chaotic and dynamic battlefield where players are engaged in combat with both other players and fierce environment-based enemies. " "In the foreground, a team of diverse characters, each with unique armor and weapons, fights against powerful AI-controlled monsters or hostile creatures. " "In the background, rival players can be seen competing for control over strategic points or resources, adding a layer of tension and competition. " "The environment is a mix of rugged terrain and advanced technology, showcasing a post-apocalyptic or futuristic setting with detailed textures and vivid colors. " "Explosions, magical effects, and environmental hazards add to the chaos, creating an intense and immersive atmosphere. The overall composition emphasizes the thrill of battling on multiple fronts." ) } # 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()
Generation Data
履歴
プロンプト
プロンプトをコピー
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 PvPvE genre
prompts = {
"pvpve_battle_scene": (
"A high-stakes PvPvE battle scene in a vibrant digital painting
.
The image features a chaotic and dynamic battlefield where players are engaged in combat with both other players and fierce environment-based enemies
.
"
"In the foreground
,
a team of diverse characters
,
each with unique armor and weapons
,
fights against powerful AI-controlled monsters or hostile creatures
.
"
"In the background
,
rival players can be seen competing for control over strategic points or resources
,
adding a layer of tension and competition
.
"
"The environment is a mix of rugged terrain and advanced technology
,
showcasing a post-apocalyptic or futuristic setting with detailed textures and vivid colors
.
"
"Explosions
,
magical effects
,
and environmental hazards add to the chaos
,
creating an intense and immersive atmosphere
.
The overall composition emphasizes the thrill of battling on multiple fronts
.
"
)
}
# 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()
情報
Checkpoint & LoRA

Checkpoint
SeaArt Infinity
#SeaArt Infinity
コメント:0件
0
0
0