ameerazam08 commited on
Commit
24ce25c
β€’
1 Parent(s): 927b744

negative prompt added

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -42,12 +42,6 @@ base = "stabilityai/stable-diffusion-xl-base-1.0"
42
  repo = "ByteDance/SDXL-Lightning"
43
  ckpt = "sdxl_lightning_4step_unet.safetensors" # Use the correct ckpt for your step setting!
44
 
45
- # unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
46
- # unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device="cuda"))
47
- # pipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float16, variant="fp16")
48
- # pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
49
- # pipe = pipe.to(device)
50
-
51
 
52
  # Load model.
53
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to(device)
@@ -168,13 +162,13 @@ with gr.Blocks(css="footer{display:none !important}", theme=theme) as demo:
168
  # result = gr.Gallery(label="Left is Base and Right is Lora"),
169
  with gr.Accordion("Advanced options", open=False):
170
  with gr.Row():
171
- use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=False)
172
  use_prompt_2 = gr.Checkbox(label="Use prompt 2", value=False)
173
  use_negative_prompt_2 = gr.Checkbox(label="Use negative prompt 2", value=False)
174
  negative_prompt = gr.Text(
175
  label="Negative prompt",
176
  max_lines=1,
177
- placeholder="Enter a negative prompt",
178
  visible=False,
179
  )
180
  prompt_2 = gr.Text(
 
42
  repo = "ByteDance/SDXL-Lightning"
43
  ckpt = "sdxl_lightning_4step_unet.safetensors" # Use the correct ckpt for your step setting!
44
 
 
 
 
 
 
 
45
 
46
  # Load model.
47
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to(device)
 
162
  # result = gr.Gallery(label="Left is Base and Right is Lora"),
163
  with gr.Accordion("Advanced options", open=False):
164
  with gr.Row():
165
+ use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=True)
166
  use_prompt_2 = gr.Checkbox(label="Use prompt 2", value=False)
167
  use_negative_prompt_2 = gr.Checkbox(label="Use negative prompt 2", value=False)
168
  negative_prompt = gr.Text(
169
  label="Negative prompt",
170
  max_lines=1,
171
+ placeholder="blur, cartoon, bad, face, painting",
172
  visible=False,
173
  )
174
  prompt_2 = gr.Text(