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 open-world action-RPG prompt
prompts = {
"open_world_action_rpg_scene": (
"A dynamic and immersive scene from an open-world action RPG, where a powerful, majestic whale character, adorned with a glowing Bitcoin chain, "
"glides through a vast, open oceanic world. The environment is rich with detail, featuring towering underwater ruins, vibrant coral reefs, and schools of fish. "
"The whale, a legendary creature in the game, is a key quest figure, and it is depicted as both a guide and a formidable ally. "
"Nearby, the protagonist, a skilled and agile warrior in customized, ocean-themed armor, swims with purpose, equipped with a trident and various gear for underwater exploration. "
"The protagonist is ready for action, eyes fixed on a distant objective, while the whale emits a soft, ethereal glow, highlighting its importance. "
"The open world is teeming with life, from bioluminescent creatures to hidden treasures scattered across the seabed, inviting players to explore every nook and cranny. "
"The overall scene is a blend of action, exploration, and the thrill of discovery, capturing the essence of an open-world RPG where players forge their own path through a richly detailed environment."
)
}
# 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/cr9e2fde878c73c84r5g-1/c419eaf5846fb78934c26bda57f23b68_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 open-world action-RPG prompt prompts = { "open_world_action_rpg_scene": ( "A dynamic and immersive scene from an open-world action RPG, where a powerful, majestic whale character, adorned with a glowing Bitcoin chain, " "glides through a vast, open oceanic world. The environment is rich with detail, featuring towering underwater ruins, vibrant coral reefs, and schools of fish. " "The whale, a legendary creature in the game, is a key quest figure, and it is depicted as both a guide and a formidable ally. " "Nearby, the protagonist, a skilled and agile warrior in customized, ocean-themed armor, swims with purpose, equipped with a trident and various gear for underwater exploration. " "The protagonist is ready for action, eyes fixed on a distant objective, while the whale emits a soft, ethereal glow, highlighting its importance. " "The open world is teeming with life, from bioluminescent creatures to hidden treasures scattered across the seabed, inviting players to explore every nook and cranny. " "The overall scene is a blend of action, exploration, and the thrill of discovery, capturing the essence of an open-world RPG where players forge their own path through a richly detailed environment." ) } # 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 open-world action-RPG prompt
prompts = {
"open_world_action_rpg_scene": (
"A dynamic and immersive scene from an open-world action RPG
,
where a powerful
,
majestic whale character
,
adorned with a glowing Bitcoin chain
,
"
"glides through a vast
,
open oceanic world
.
The environment is rich with detail
,
featuring towering underwater ruins
,
vibrant coral reefs
,
and schools of fish
.
"
"The whale
,
a legendary creature in the game
,
is a key quest figure
,
and it is depicted as both a guide and a formidable ally
.
"
"Nearby
,
the protagonist
,
a skilled and agile warrior in customized
,
ocean-themed armor
,
swims with purpose
,
equipped with a trident and various gear for underwater exploration
.
"
"The protagonist is ready for action
,
eyes fixed on a distant objective
,
while the whale emits a soft
,
ethereal glow
,
highlighting its importance
.
"
"The open world is teeming with life
,
from bioluminescent creatures to hidden treasures scattered across the seabed
,
inviting players to explore every nook and cranny
.
"
"The overall scene is a blend of action
,
exploration
,
and the thrill of discovery
,
capturing the essence of an open-world RPG where players forge their own path through a richly detailed environment
.
"
)
}
# 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
1
0