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")
# Define the prompt for the rooftop bar scene
prompt = (
"In a stylish rooftop bar with a stunning city view, the go-go dancer and Bitcoin trader celebrate with a comically over-the-top party. The dancer, now in a glamorous yet playful evening dress with Bitcoin motifs, performs a humorous dance routine. The trader joins in with exaggerated dance moves, and they share a toast with drinks that have comical garnishes. The city lights provide a dazzling backdrop, and the lighting highlights the festive and cheeky mood of the evening."
)
# Configuration settings
clip_guidance_scale = 16 # Slightly lower to add a playful feel
hr_scale = 3.0 # Balanced resolution
hr_upscaler = "R-ESRGAN"
latent_shift = torch.randn(1, 4, 64, 64) * 0.03 # Slight variation for humor
cross_attention_strength = 1.5 # Focus on playful details
shallow_depth_of_field = True # Emphasize interaction
lighting_style = "bright and colorful" # Vibrant lighting effects
color_match_strength = 1.5 # Enhanced color matching
perlin_noise_scale = 0.03 # Subtle noise for texture
fractal_noise = False
# Generate the image
image = pipe(
prompt=prompt,
clip_guidance_scale=clip_guidance_scale,
hr_scale=hr_scale,
hr_upscaler=hr_upscaler,
latent_shift=latent_shift,
cross_attention_strength=cross_attention_strength,
shallow_depth_of_field=shallow_depth_of_field,
lighting_style=lighting_style,
color_match_strength=color_match_strength,
noise="perlin",
noise_scale=perlin_noise_scale,
fractal_noise=fractal_noise
).images[0]
# Save the generated image
image.save("rooftop_party.png")](https://image.cdn2.seaart.me/2024-08-26/cr6f19le878c73flajb0-2/e85721736b79d49d67b44ec49ac1f587_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")
# Define the prompt for the rooftop bar scene
prompt = (
"In a stylish rooftop bar with a stunning city view
,
the go-go dancer and Bitcoin trader celebrate with a comically over-the-top party
.
The dancer
,
now in a glamorous yet playful evening dress with Bitcoin motifs
,
performs a humorous dance routine
.
The trader joins in with exaggerated dance moves
,
and they share a toast with drinks that have comical garnishes
.
The city lights provide a dazzling backdrop
,
and the lighting highlights the festive and cheeky mood of the evening
.
"
)
# Configuration settings
clip_guidance_scale = 16 # Slightly lower to add a playful feel
hr_scale = 3
.
0 # Balanced resolution
hr_upscaler = "R-ESRGAN"
latent_shift = torch
.
randn(1
,
4
,
64
,
64) * 0
.
03 # Slight variation for humor
cross_attention_strength = 1
.
5 # Focus on playful details
shallow_depth_of_field = True # Emphasize interaction
lighting_style = "bright and colorful" # Vibrant lighting effects
color_match_strength = 1
.
5 # Enhanced color matching
perlin_noise_scale = 0
.
03 # Subtle noise for texture
fractal_noise = False
# Generate the image
image = pipe(
prompt=prompt
,
clip_guidance_scale=clip_guidance_scale
,
hr_scale=hr_scale
,
hr_upscaler=hr_upscaler
,
latent_shift=latent_shift
,
cross_attention_strength=cross_attention_strength
,
shallow_depth_of_field=shallow_depth_of_field
,
lighting_style=lighting_style
,
color_match_strength=color_match_strength
,
noise="perlin"
,
noise_scale=perlin_noise_scale
,
fractal_noise=fractal_noise
)
.
images[0]
# Save the generated image
image
.
save("rooftop_party
.
png")
信息
模型 & 風格

模型
SeaArt Infinity
#服飾
#SeaArt Infinity
共 0 條評論
0
9
0