daKhosa commited on
Commit ·
2482b4f
1
Parent(s): e4a7392
Expand prompt quick list, always randomize seed
Browse files- Add more lighting/mood presets to the quick prompt list.
- Seed field is now display-only; every generation picks a fresh random
seed regardless of whatever was in the box, instead of only randomizing
when the field held a negative number.
387 unmodified lines38838939039139239317 unmodified lines41141241341441541625 unmodified lines442443444445446447448387 unmodified linesif not prompt or not prompt.strip():raise gr.Error("Enter a prompt.")engine = get_engine()return engine.relight(image,17 unmodified lines["portrait, cinematic lighting"],["product photo, soft studio lighting"],["character art, dramatic light and shadow"],]25 unmodified lineswith gr.Row():samples = gr.Slider(label="Images", minimum=1, maximum=4, value=1, step=1)seed = gr.Number(label="Seed", value=12345, precision=0)with gr.Row():width = gr.Slider(label="Width", minimum=256, maximum=1024, value=512, step=64)387 unmodified lines38838939039139239339439539639739839917 unmodified lines41741841942042142242342442542642742842943043143243343443525 unmodified lines461462463464465466467387 unmodified linesif not prompt or not prompt.strip():raise gr.Error("Enter a prompt.")# Random seed always on: every generation gets a fresh seed regardless of# whatever is in the Seed field (which is display-only -- see its# `interactive=False` below).del seedseed = random.randint(0, 2**31 - 1)engine = get_engine()return engine.relight(image,17 unmodified lines["portrait, cinematic lighting"],["product photo, soft studio lighting"],["character art, dramatic light and shadow"],["golden hour, warm glow"],["sunset over sea, warm reflections"],["warm atmosphere, at home, bedroom"],["natural lighting, soft daylight"],["shadow from window, venetian blinds"],["neon light, city, Wong Kar-wai, warm"],["sci-fi RGB glowing, cyberpunk"],["magic lit, fantasy glow"],["candlelight, cozy, intimate"],["blue hour, moody, cinematic"],["firelight, campfire glow"],["studio softbox, fashion editorial"],["harsh midday sun, high contrast"],]25 unmodified lineswith gr.Row():samples = gr.Slider(label="Images", minimum=1, maximum=4, value=1, step=1)seed = gr.Number(label="Seed (randomized every run)", value=12345, precision=0, interactive=False)with gr.Row():width = gr.Slider(label="Width", minimum=256, maximum=1024, value=512, step=64)
app.py+20-1