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 interactive movie scene prompt
prompts = {
"interactive_film_scene": (
"A cinematic and emotionally charged digital painting depicting a pivotal scene from an interactive film. "
"The scene is set in a dimly lit room with dramatic lighting, casting long shadows and creating a tense atmosphere. "
"In the center, two characters are engaged in a crucial conversation. One character, with a worried expression, is standing with clenched fists, "
"while the other, calm and composed, is sitting at a desk with an open dossier of documents. "
"The room is filled with details: a large, ornate desk with scattered papers, a flickering desk lamp, and a window showing a rainy night outside. "
"The background features rich textures and elements that add to the narrative tension, such as framed photographs and personal items. "
"The overall tone of the scene is dramatic and immersive, capturing the essence of decision-making and emotional depth characteristic of interactive films."
)
}
# 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/cr9eakde878c73c95d90-1/7d2aa44cf34ee49fe124f88f5817a29f_high.webp)
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 detailed interactive movie scene prompt
prompts = {
"interactive_film_scene": (
"A cinematic and emotionally charged digital painting depicting a pivotal scene from an interactive film
.
"
"The scene is set in a dimly lit room with dramatic lighting
,
casting long shadows and creating a tense atmosphere
.
"
"In the center
,
two characters are engaged in a crucial conversation
.
One character
,
with a worried expression
,
is standing with clenched fists
,
"
"while the other
,
calm and composed
,
is sitting at a desk with an open dossier of documents
.
"
"The room is filled with details: a large
,
ornate desk with scattered papers
,
a flickering desk lamp
,
and a window showing a rainy night outside
.
"
"The background features rich textures and elements that add to the narrative tension
,
such as framed photographs and personal items
.
"
"The overall tone of the scene is dramatic and immersive
,
capturing the essence of decision-making and emotional depth characteristic of interactive films
.
"
)
}
# 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