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 third-person action game-style prompt
prompts = {
"cooking_for_bitcoin_whale_action_game": (
"A dynamic, third-person action game scene where a powerful, muscular whale, adorned with a glowing Bitcoin chain, is the central character. "
"The whale is engaged in an intense standoff in a futuristic, dystopian kitchen that doubles as a high-tech battle arena. "
"A beautiful woman in tactical gear, with a sleek and agile build, is preparing to serve the whale food, but her posture and expression indicate "
"she's ready to spring into action at any moment. Her eyes are locked on the whale, who is smirking confidently, seemingly unaware of the impending danger. "
"Behind the whale, the environment is filled with destructible objects, flickering lights, and a sense of tension, as if a battle is about to break out. "
"The camera angle is over-the-shoulder, focusing on the woman as she moves stealthily, ready to either serve or strike, depending on the player's choice. "
"The scene is packed with action elements, including explosions, debris, and other characters who are either allies or enemies, adding to the chaos and intensity. "
"The overall atmosphere is gritty and suspenseful, capturing the high stakes and adrenaline-pumping action typical of a third-person shooter."
)
}
# 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/cr9e1j5e878c73e2prv0-2/2de7816e9fd58071392b297df9c92864_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 detailed third-person action game-style prompt prompts = { "cooking_for_bitcoin_whale_action_game": ( "A dynamic, third-person action game scene where a powerful, muscular whale, adorned with a glowing Bitcoin chain, is the central character. " "The whale is engaged in an intense standoff in a futuristic, dystopian kitchen that doubles as a high-tech battle arena. " "A beautiful woman in tactical gear, with a sleek and agile build, is preparing to serve the whale food, but her posture and expression indicate " "she's ready to spring into action at any moment. Her eyes are locked on the whale, who is smirking confidently, seemingly unaware of the impending danger. " "Behind the whale, the environment is filled with destructible objects, flickering lights, and a sense of tension, as if a battle is about to break out. " "The camera angle is over-the-shoulder, focusing on the woman as she moves stealthily, ready to either serve or strike, depending on the player's choice. " "The scene is packed with action elements, including explosions, debris, and other characters who are either allies or enemies, adding to the chaos and intensity. " "The overall atmosphere is gritty and suspenseful, capturing the high stakes and adrenaline-pumping action typical of a third-person shooter." ) } # 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()
提示詞
復製
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 third-person action game-style prompt
prompts = {
"cooking_for_bitcoin_whale_action_game": (
"A dynamic
,
third-person action game scene where a powerful
,
muscular whale
,
adorned with a glowing Bitcoin chain
,
is the central character
.
"
"The whale is engaged in an intense standoff in a futuristic
,
dystopian kitchen that doubles as a high-tech battle arena
.
"
"A beautiful woman in tactical gear
,
with a sleek and agile build
,
is preparing to serve the whale food
,
but her posture and expression indicate "
"she's ready to spring into action at any moment
.
Her eyes are locked on the whale
,
who is smirking confidently
,
seemingly unaware of the impending danger
.
"
"Behind the whale
,
the environment is filled with destructible objects
,
flickering lights
,
and a sense of tension
,
as if a battle is about to break out
.
"
"The camera angle is over-the-shoulder
,
focusing on the woman as she moves stealthily
,
ready to either serve or strike
,
depending on the player's choice
.
"
"The scene is packed with action elements
,
including explosions
,
debris
,
and other characters who are either allies or enemies
,
adding to the chaos and intensity
.
"
"The overall atmosphere is gritty and suspenseful
,
capturing the high stakes and adrenaline-pumping action typical of a third-person shooter
.
"
)
}
# 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()
信息
模型 & 風格

模型
SeaArt Infinity
#SeaArt Infinity
共 0 條評論
0
0
0