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 Mecha, Drama, and Action genres
prompts = {
"mecha_drama_action_scene": (
"A dramatic and action-packed digital painting set in a futuristic world featuring massive, powerful mecha robots engaged in intense combat. "
"The scene is set in a war-torn cityscape with towering skyscrapers and debris scattered across the battlefield. "
"In the foreground, a large, heavily armored mecha battles against a rival machine, with detailed mechanical components and glowing energy weapons. "
"The pilots inside the mecha are visible through cockpit windows, showing intense expressions and emotional strain, adding a dramatic touch to the battle. "
"Explosions and dramatic lighting highlight the chaos and destruction, while the background features a dramatic sky with dark clouds and flashes of lightning. "
"The overall composition emphasizes the epic scale of the mecha conflict, combining elements of high-stakes drama and explosive action."
)
}
# 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/cr9ede5e878c73e4bu5g-2/daa11aa0e1f4a502bb7b4b6ad3260e7d_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 Mecha, Drama, and Action genres prompts = { "mecha_drama_action_scene": ( "A dramatic and action-packed digital painting set in a futuristic world featuring massive, powerful mecha robots engaged in intense combat. " "The scene is set in a war-torn cityscape with towering skyscrapers and debris scattered across the battlefield. " "In the foreground, a large, heavily armored mecha battles against a rival machine, with detailed mechanical components and glowing energy weapons. " "The pilots inside the mecha are visible through cockpit windows, showing intense expressions and emotional strain, adding a dramatic touch to the battle. " "Explosions and dramatic lighting highlight the chaos and destruction, while the background features a dramatic sky with dark clouds and flashes of lightning. " "The overall composition emphasizes the epic scale of the mecha conflict, combining elements of high-stakes drama and explosive action." ) } # 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()
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 prompt for Mecha
,
Drama
,
and Action genres
prompts = {
"mecha_drama_action_scene": (
"A dramatic and action-packed digital painting set in a futuristic world featuring massive
,
powerful mecha robots engaged in intense combat
.
"
"The scene is set in a war-torn cityscape with towering skyscrapers and debris scattered across the battlefield
.
"
"In the foreground
,
a large
,
heavily armored mecha battles against a rival machine
,
with detailed mechanical components and glowing energy weapons
.
"
"The pilots inside the mecha are visible through cockpit windows
,
showing intense expressions and emotional strain
,
adding a dramatic touch to the battle
.
"
"Explosions and dramatic lighting highlight the chaos and destruction
,
while the background features a dramatic sky with dark clouds and flashes of lightning
.
"
"The overall composition emphasizes the epic scale of the mecha conflict
,
combining elements of high-stakes drama and explosive action
.
"
)
}
# 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
#Machinery
#SeaArt Infinity
0 comment
0
0
0