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 Drama and Isekai genres with Bitcoin, Whale, and Shark
prompts = {
"drama_isekai_bitcoin_whale_shark": (
"In a dramatic isekai world, a young protagonist finds themselves in a fantastical realm where Bitcoin plays a crucial role in society. "
"The scene captures the protagonist standing on a cliff, gazing at a majestic, otherworldly ocean where a colossal, benevolent whale with a Bitcoin symbol glowing on its back swims gracefully. "
"The whale represents hope and power, while a sleek, mysterious shark with a Bitcoin logo on its fin lurks in the shadows of the ocean, hinting at hidden dangers. "
"The protagonist, dressed in adventure-ready attire, looks contemplative and determined, reflecting the inner struggle and growth typical of a dramatic isekai journey. "
"The background features a breathtaking, magical landscape with floating islands, enchanted forests, and a shimmering, star-studded sky, evoking the fantasy and wonder of the new world."
)
}
# 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/cr9eh5le878c73c9ucng-2/7ddad60e4fa8c0a347f2a056694c4ac3_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 Drama and Isekai genres with Bitcoin, Whale, and Shark prompts = { "drama_isekai_bitcoin_whale_shark": ( "In a dramatic isekai world, a young protagonist finds themselves in a fantastical realm where Bitcoin plays a crucial role in society. " "The scene captures the protagonist standing on a cliff, gazing at a majestic, otherworldly ocean where a colossal, benevolent whale with a Bitcoin symbol glowing on its back swims gracefully. " "The whale represents hope and power, while a sleek, mysterious shark with a Bitcoin logo on its fin lurks in the shadows of the ocean, hinting at hidden dangers. " "The protagonist, dressed in adventure-ready attire, looks contemplative and determined, reflecting the inner struggle and growth typical of a dramatic isekai journey. " "The background features a breathtaking, magical landscape with floating islands, enchanted forests, and a shimmering, star-studded sky, evoking the fantasy and wonder of the new world." ) } # 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 prompt for Drama and Isekai genres with Bitcoin
,
Whale
,
and Shark
prompts = {
"drama_isekai_bitcoin_whale_shark": (
"In a dramatic isekai world
,
a young protagonist finds themselves in a fantastical realm where Bitcoin plays a crucial role in society
.
"
"The scene captures the protagonist standing on a cliff
,
gazing at a majestic
,
otherworldly ocean where a colossal
,
benevolent whale with a Bitcoin symbol glowing on its back swims gracefully
.
"
"The whale represents hope and power
,
while a sleek
,
mysterious shark with a Bitcoin logo on its fin lurks in the shadows of the ocean
,
hinting at hidden dangers
.
"
"The protagonist
,
dressed in adventure-ready attire
,
looks contemplative and determined
,
reflecting the inner struggle and growth typical of a dramatic isekai journey
.
"
"The background features a breathtaking
,
magical landscape with floating islands
,
enchanted forests
,
and a shimmering
,
star-studded sky
,
evoking the fantasy and wonder of the new world
.
"
)
}
# 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