HelloSun commited on
Commit
1884209
1 Parent(s): 48c5907

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -6,8 +6,8 @@ from diffusers import DiffusionPipeline
6
 
7
 
8
  #model_id = "echarlaix/sdxl-turbo-openvino-int8"
9
- model_id = "echarlaix/LCM_Dreamshaper_v7-openvino"
10
- #model_id = "OpenVINO/LCM_Dreamshaper_v7-int8-ov"
11
 
12
  #safety_checker = StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker")
13
 
@@ -23,11 +23,11 @@ pipeline.compile()
23
  #TypeError: LatentConsistencyPipelineMixin.__call__() got an unexpected keyword argument 'negative_prompt'
24
  #negative_prompt="easynegative,bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs, nsfw, nude, censored, "
25
 
26
- def infer(prompt, negative_prompt):
27
 
28
  image = pipeline(
29
  prompt = prompt,
30
- negative_prompt = negative_prompt,
31
  # guidance_scale = guidance_scale,
32
  #num_inference_steps = num_inference_steps,
33
  width = width,
@@ -97,7 +97,7 @@ with gr.Blocks(css=css) as demo:
97
 
98
  run_button.click(
99
  fn = infer,
100
- inputs = [prompt, negative_prompt],
101
  outputs = [result]
102
  )
103
 
 
6
 
7
 
8
  #model_id = "echarlaix/sdxl-turbo-openvino-int8"
9
+ #model_id = "echarlaix/LCM_Dreamshaper_v7-openvino"
10
+ model_id = "OpenVINO/LCM_Dreamshaper_v7-int8-ov"
11
 
12
  #safety_checker = StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker")
13
 
 
23
  #TypeError: LatentConsistencyPipelineMixin.__call__() got an unexpected keyword argument 'negative_prompt'
24
  #negative_prompt="easynegative,bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs, nsfw, nude, censored, "
25
 
26
+ def infer(prompt):
27
 
28
  image = pipeline(
29
  prompt = prompt,
30
+ #negative_prompt = negative_prompt,
31
  # guidance_scale = guidance_scale,
32
  #num_inference_steps = num_inference_steps,
33
  width = width,
 
97
 
98
  run_button.click(
99
  fn = infer,
100
+ inputs = [prompt],
101
  outputs = [result]
102
  )
103