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 Action and Sci-Fi genres with Bitcoin, Whale, and Shark
prompts = {
"action_sci_fi_bitcoin_whale_shark": (
"In a high-octane, futuristic world, a team of action heroes battles in an epic showdown against a giant, technologically enhanced whale. "
"The whale, outfitted with advanced gadgets and a glowing Bitcoin emblem embedded in its skin, exudes both power and sophistication. "
"Its enormous size and digital enhancements make it a formidable opponent in the sci-fi landscape. "
"Meanwhile, a sleek, high-tech shark with cybernetic features and a Bitcoin logo on its fin lurks in the shadows, ready to pounce. "
"The heroes, armed with futuristic weapons and gadgets, engage in a dramatic fight scene, with explosions and dynamic lighting intensifying the action. "
"The background features a sprawling, neon-lit cityscape with flying vehicles and towering skyscrapers, creating a vibrant and immersive sci-fi 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/cr9egqle878c7388uff0-1/17ca0dbcb58d8fbc2613c54565ab7649_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 Action and Sci-Fi genres with Bitcoin, Whale, and Shark prompts = { "action_sci_fi_bitcoin_whale_shark": ( "In a high-octane, futuristic world, a team of action heroes battles in an epic showdown against a giant, technologically enhanced whale. " "The whale, outfitted with advanced gadgets and a glowing Bitcoin emblem embedded in its skin, exudes both power and sophistication. " "Its enormous size and digital enhancements make it a formidable opponent in the sci-fi landscape. " "Meanwhile, a sleek, high-tech shark with cybernetic features and a Bitcoin logo on its fin lurks in the shadows, ready to pounce. " "The heroes, armed with futuristic weapons and gadgets, engage in a dramatic fight scene, with explosions and dynamic lighting intensifying the action. " "The background features a sprawling, neon-lit cityscape with flying vehicles and towering skyscrapers, creating a vibrant and immersive sci-fi 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()
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 Action and Sci-Fi genres with Bitcoin
,
Whale
,
and Shark
prompts = {
"action_sci_fi_bitcoin_whale_shark": (
"In a high-octane
,
futuristic world
,
a team of action heroes battles in an epic showdown against a giant
,
technologically enhanced whale
.
"
"The whale
,
outfitted with advanced gadgets and a glowing Bitcoin emblem embedded in its skin
,
exudes both power and sophistication
.
"
"Its enormous size and digital enhancements make it a formidable opponent in the sci-fi landscape
.
"
"Meanwhile
,
a sleek
,
high-tech shark with cybernetic features and a Bitcoin logo on its fin lurks in the shadows
,
ready to pounce
.
"
"The heroes
,
armed with futuristic weapons and gadgets
,
engage in a dramatic fight scene
,
with explosions and dynamic lighting intensifying the action
.
"
"The background features a sprawling
,
neon-lit cityscape with flying vehicles and towering skyscrapers
,
creating a vibrant and immersive sci-fi 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