Alexander Bagus commited on
Commit
d0d21df
·
1 Parent(s): 6cacae3
Files changed (2) hide show
  1. app.py +21 -19
  2. static/data.json +1 -1
app.py CHANGED
@@ -67,8 +67,8 @@ def inference(
67
  image = pipe(
68
  prompt= prompt,
69
  negative_prompt = negative_prompt,
70
- height=1024,
71
- width=1024,
72
  generator=generator,
73
  guidance_scale=guidance_scale,
74
  num_inference_steps=num_inference_steps,
@@ -108,7 +108,7 @@ with gr.Blocks() as demo:
108
  placeholder="Enter your prompt",
109
  # container=False,
110
  )
111
- is_polish_prompt = gr.Checkbox(label="Polish prompt", value=True)
112
  run_button = gr.Button("Generate", variant="primary")
113
  with gr.Accordion("Advanced Settings", open=False):
114
 
@@ -142,26 +142,28 @@ with gr.Blocks() as demo:
142
  step=32,
143
  value=1024,
144
  )
145
- guidance_scale = gr.Slider(
146
- label="Guidance scale",
147
- minimum=0.0,
148
- maximum=10.0,
149
- step=0.1,
150
- value=1.0,
151
- )
 
 
 
 
 
 
 
 
152
 
153
- seed = gr.Slider(
154
- label="Seed",
155
- minimum=0,
156
- maximum=MAX_SEED,
157
- step=1,
158
- value=42,
159
- )
160
- randomize_seed = gr.Checkbox(label="Randomize seed", value=False)
161
 
162
  with gr.Column():
163
  output_image = gr.Image(label="Generated image", show_label=False)
164
- polished_prompt = gr.Textbox(label="Polished prompt",lines=2, interactive=False)
165
 
166
 
167
  gr.Examples(examples=examples, inputs=[prompt])
 
67
  image = pipe(
68
  prompt= prompt,
69
  negative_prompt = negative_prompt,
70
+ width=width,
71
+ height=height,
72
  generator=generator,
73
  guidance_scale=guidance_scale,
74
  num_inference_steps=num_inference_steps,
 
108
  placeholder="Enter your prompt",
109
  # container=False,
110
  )
111
+ is_polish_prompt = gr.Checkbox(label="Polish prompt", value=False)
112
  run_button = gr.Button("Generate", variant="primary")
113
  with gr.Accordion("Advanced Settings", open=False):
114
 
 
142
  step=32,
143
  value=1024,
144
  )
145
+ with gr.Row():
146
+ seed = gr.Slider(
147
+ label="Seed",
148
+ minimum=0,
149
+ maximum=MAX_SEED,
150
+ step=1,
151
+ value=42,
152
+ )
153
+ guidance_scale = gr.Slider(
154
+ label="Guidance scale",
155
+ minimum=0.0,
156
+ maximum=10.0,
157
+ step=0.1,
158
+ value=1.0,
159
+ )
160
 
161
+
162
+ randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
 
 
 
 
 
 
163
 
164
  with gr.Column():
165
  output_image = gr.Image(label="Generated image", show_label=False)
166
+ polished_prompt = gr.Textbox(label="Final prompt",lines=2, interactive=False)
167
 
168
 
169
  gr.Examples(examples=examples, inputs=[prompt])
static/data.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "examples": [
3
  "A cinematic, macro-photography shot of a small fox composed entirely of translucent, faceted amber and cracked quartz. The fox is sitting on a mossy log in a dense, dark forest. Inside the fox's glass body, a soft, warm light pulses like a heartbeat, illuminating the surrounding area from within. The forest floor is covered in giant, bioluminescent teal mushrooms and floating neon spores. The lighting is moody and ethereal, creating a sharp contrast between the warm orange of the fox and the cool blues of the forest. Ultra-detailed textures, volumetric fog, 8k resolution, magical realism style.",
4
- "A dramatic, cinematic japanese-action scene in a edo era Kyoto city. A woman named Harley Quinn from the movie 'Birds of Prey' in colorful, punk-inspired comic-villain attire walks confidently while holding the arm of a serious-looking man named John Wick played by Keanu Reeves from the fantastic film John Wick 2 in a black suit, her t-shirt says 'Birds of Prey', the characters are capture in a postcard held by a hand in front of a beautiful realistic city at sunset and there is cursive writing that says 'Z-Image, Now on HuggingFace'",
5
  "The subject is Marvel's Wolverine, expressive portrait, blended bright,red inks, (super contrasty subject:1.3), (bold colors:1.2),red inks background, dramatic pose, intense expression, vibrant tones, high contrast, dynamic movement, ethereal swirls, abstract elements, fluid shapes, artistic composition, stark shadows, sharp highlights, smooth gradients, soft edges, imaginative visual, captivating mood, striking details, fine art photography, surreal ambiance, vibrant splashes, elegant lines, creative fusion, modern aesthetics, vivid saturation, unique perspective, soft focus, painterly feel, 50mm lens, f/1.8, artistic depth, contemporary style, avant-garde",
6
  "(dreamlike outdoor portrait photo:1.4), (ethereal:1.2), (water reflections:1.2), (natural light:1.2), high detail, soft focus, pastel colors, shallow depth of field, intimate, medium close-up, dynamic lighting, serene, contemplative, wet hair, bokeh, sun-dappled, glistening water droplets, 85mm lens, f/1.8, misty atmosphere, emotional, evocative, organic textures",
7
  "a photograph taken as a mirror selfie in indoor setting,on the morning, likely her hotel room with sky blue painted wall, The subject is a taylor swift ,She is holding a iphone with a hello kitty logo on the back in her right hand, positioned to take the selfie. and her left hand doing a peace sign 'V', Her face is partially visible, showing a smiling expression with slightly parted lips and biting her tongue, she is wearing a long sleeve white shirt, The overall setting suggests a casual, intimate moment captured in a private or semi-private space. The photograph emphasizes natural beauty and personal confidence, with a focus on the subject's upper body and facial features.",
 
1
  {
2
  "examples": [
3
  "A cinematic, macro-photography shot of a small fox composed entirely of translucent, faceted amber and cracked quartz. The fox is sitting on a mossy log in a dense, dark forest. Inside the fox's glass body, a soft, warm light pulses like a heartbeat, illuminating the surrounding area from within. The forest floor is covered in giant, bioluminescent teal mushrooms and floating neon spores. The lighting is moody and ethereal, creating a sharp contrast between the warm orange of the fox and the cool blues of the forest. Ultra-detailed textures, volumetric fog, 8k resolution, magical realism style.",
4
+ "A dramatic, cinematic japanese-action scene in a edo era Kyoto city. A woman named Harley Quinn from the movie 'Birds of Prey' in colorful, punk-inspired comic-villain attire walks confidently while holding the arm of a serious-looking man named John Wick played by Keanu Reeves from the fantastic film John Wick 2 in a black suit, her t-shirt says 'Birds of Prey', the characters are capture in a postcard held by a hand in front of a beautiful realistic city at sunset and there is cursive writing that says 'LongCat Image, Now on HuggingFace'",
5
  "The subject is Marvel's Wolverine, expressive portrait, blended bright,red inks, (super contrasty subject:1.3), (bold colors:1.2),red inks background, dramatic pose, intense expression, vibrant tones, high contrast, dynamic movement, ethereal swirls, abstract elements, fluid shapes, artistic composition, stark shadows, sharp highlights, smooth gradients, soft edges, imaginative visual, captivating mood, striking details, fine art photography, surreal ambiance, vibrant splashes, elegant lines, creative fusion, modern aesthetics, vivid saturation, unique perspective, soft focus, painterly feel, 50mm lens, f/1.8, artistic depth, contemporary style, avant-garde",
6
  "(dreamlike outdoor portrait photo:1.4), (ethereal:1.2), (water reflections:1.2), (natural light:1.2), high detail, soft focus, pastel colors, shallow depth of field, intimate, medium close-up, dynamic lighting, serene, contemplative, wet hair, bokeh, sun-dappled, glistening water droplets, 85mm lens, f/1.8, misty atmosphere, emotional, evocative, organic textures",
7
  "a photograph taken as a mirror selfie in indoor setting,on the morning, likely her hotel room with sky blue painted wall, The subject is a taylor swift ,She is holding a iphone with a hello kitty logo on the back in her right hand, positioned to take the selfie. and her left hand doing a peace sign 'V', Her face is partially visible, showing a smiling expression with slightly parted lips and biting her tongue, she is wearing a long sleeve white shirt, The overall setting suggests a casual, intimate moment captured in a private or semi-private space. The photograph emphasizes natural beauty and personal confidence, with a focus on the subject's upper body and facial features.",