gokaygokay commited on
Commit
09fd5ec
1 Parent(s): 7cc3c34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -22,7 +22,7 @@ pipe.fuse_lora()
22
  MAX_SEED = 2**32-1
23
 
24
  @spaces.GPU(duration=75)
25
- def generate_image(prompt, steps, seed, cfg_scale, width, height, lora_scale):
26
  generator = torch.Generator(device="cuda").manual_seed(seed)
27
 
28
  image = pipe(
@@ -62,6 +62,14 @@ custom_css = """
62
 
63
  title = """<h1 align="center">FLUX Creativity LoRA</h1>
64
  """
 
 
 
 
 
 
 
 
65
 
66
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="gray"), css=custom_css) as app:
67
  gr.HTML(title)
@@ -90,4 +98,12 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="gray"), c
90
  generate_button.click(fn=run_lora, inputs=inputs, outputs=outputs)
91
  prompt.submit(fn=run_lora, inputs=inputs, outputs=outputs)
92
 
 
 
 
 
 
 
 
 
93
  app.launch(debug=True)
 
22
  MAX_SEED = 2**32-1
23
 
24
  @spaces.GPU(duration=75)
25
+ def generate_image(prompt, steps=28, seed=None, cfg_scale=3.5, width=1024, height=1024, lora_scale=1.00):
26
  generator = torch.Generator(device="cuda").manual_seed(seed)
27
 
28
  image = pipe(
 
62
 
63
  title = """<h1 align="center">FLUX Creativity LoRA</h1>
64
  """
65
+ examples = [
66
+ "anime, cartoon, Hyper-detailed, endearing anime girl, bathed in a vibrant, colorful psychedelic glow, wearing dazzling, holographic Liquid Metal outfit, in a cozy tatami studio",
67
+ "extraterrestrial visage, close-up, highly intricate, ultra-detailed, full high definition",
68
+ "a full body photo shot of a beautiful and breathtaking image of a ((Man) ) wearing a fully clothed casual witchy witch clothes with intricate details in the style of a reapers cloak, he is holding a long curved double edged ((scythe) ). This full body image is a one of a kind unique highly detailed with 8k sharp focus quality masterpiece, hyper detailed, extremely detailed",
69
+ "schizophrenia attacks,go haywire, go crazy, hyper detailed, extremely detailed",
70
+ "extremely realistic, hyperrealism, a serene oasis in the desert harbors a hidden wonder. A white picket fence, weathered to a soft, warm beige, borders a lush expanse of emerald-green foliage. Amidst this verdant haven, a solitary figure stands, silhouetted against the brilliant blue sky. The cameraFixedSize to an eye-level shot, placing the subject at the center of the composition. Soft focus envelops the background, subtly blurring the contours of the desert landscape and the intricate stone wall. Natural lighting pours in from the east, casting a warm, golden glow across the scene._TYPICAL HOT-DOG-Shaped Shadow_Pencils protruding from igneous rock formations, further softening the illumination. Additional lighting comes from ornate baroque wall sconces, suspended from the eaves of a rustic gazebo, casting gentle, upward-pointing shadows. A slight orange tint infuses the air, evoking an atmosphere of peaceful contemplation. <+ GRAIN.Type:452565≥ The film stock appears to be Kodak Portra 160, with subtle, wispy grain patterns. Color grading leans toward a warm, muted palette, with accents of soft green and sandy beige. Artifacts scattered throughout, such as teeny-tiny light leaks and a hint of film stock texture, add a tactile, 35mm feel to the image. The result is a captivating, idyllic scene, promising a sense of tranquility and seclusion within the cinematic world.",
71
+ "A lone figure, Jesse, stands amidst the labyrinthine passageways of a weathered, industrial setting on the rings of Saturn. Her attire, reminiscent of a model shoot, is a fusion of avant-garde and futuristic elements, with metallic accents and flowing silhouettes. Her porcelain-doll complexion, offset by emerald-green eyes, is illuminated by the harsh daylight filtering through the rusted gantries. A constellation of freckles adorns her cheeks, like stardust sprinkled across her skin. Her raven-black hair, styled in a sleek, asymmetrical bob, seems to defy gravity as it drapes across her shoulders. A small, crimson gemstone adorns her earlobe, pulsating with an otherworldly energy. The concrete ground, cracked and worn, provides a stark backdrop for Jesse's statuesque figure. Overgrown vegetation, with leaves like tiny, iridescent crystals, spills across the terrain, as if attempting to reclaim this desolate landscape. The rusted, Cyclopean walls, covered in moss and lichen, loom above, casting long, ominous shadows. A single, fluttering piece of tattered fabric, crimson and silver, waves like a banner in the gentle breeze, drawing the eye to Jesse as she stands, poised, at the epicenter of the dance party. The camera, mounted on a Nikon D850, captures every detail with sharp focus, as if Imogen Cunningham's own lens had immortalized this vision. The Nikkor 50mm f-1.8 lens renders each texture, from Jesse's intricate outfit to the weathered architecture, with hyperdetailed clarity. The shot is imbued with a sense of nostalgia, as if this fleeting moment might be the last glimpse of a bygone era. The cinematic atmosphere, echoed in the style of Stanley Kubrick, is tempered by the soft, pulsing glow of luminescent orbs hovering above, casting an ethereal glow across this extraterrestrial promenade. The frame is bathed in a warm, daylight hue, punctuated by bursts of intense, cosmic light, as if the dance party itself is a riposte to the desolate, decaying environment. Film grain and color grading lend an eerie, otherworldly quality to the scene, as if this is a glimpse into a parallel universe. As Jesse's eyes flutter to life, it seems as though she might vanish into the swirling vortex of colors and textures, leaving behind only the echoes of an interdimensional symphony."
72
+ ]
73
 
74
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="gray"), css=custom_css) as app:
75
  gr.HTML(title)
 
98
  generate_button.click(fn=run_lora, inputs=inputs, outputs=outputs)
99
  prompt.submit(fn=run_lora, inputs=inputs, outputs=outputs)
100
 
101
+ gr.Examples(
102
+ examples=examples,
103
+ inputs=[prompt],
104
+ outputs=[result, seed],
105
+ fn=run_lora,
106
+ cache_examples=True
107
+ )
108
+
109
  app.launch(debug=True)