Yjiggfghhjnjj commited on
Commit
ec1fa2d
1 Parent(s): d6bdfdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -1
app.py CHANGED
@@ -7,6 +7,24 @@ import spaces
7
 
8
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ### SDXL Turbo ####
11
  pipe_turbo = StableDiffusionXLPipeline.from_pretrained("stabilityai/sdxl-turbo",
12
  vae=vae,
@@ -64,6 +82,10 @@ def run_comparison(prompt, progress=gr.Progress(track_tqdm=True)):
64
  yield image_turbo, image_lightning, None
65
  image_hyper=pipe_hyper(prompt=prompt, num_inference_steps=1, guidance_scale=0, timesteps=[800]).images[0]
66
  yield image_turbo, image_lightning, image_hyper
 
 
 
 
67
 
68
  examples = ["A dignified beaver wearing glasses, a vest, and colorful neck tie.",
69
  "The spirit of a tamagotchi wandering in the city of Barcelona",
@@ -89,7 +111,13 @@ with gr.Blocks() as demo:
89
  with gr.Column():
90
  image_hyper = gr.Image(label="Hyper SDXL")
91
  gr.Markdown("## [Hyper SDXL](https://huggingface.co/ByteDance/Hyper-SD)")
92
- image_outputs = [image_turbo, image_lightning, image_hyper]
 
 
 
 
 
 
93
  gr.on(
94
  triggers=[prompt.submit, run.click],
95
  fn=run_comparison,
 
7
 
8
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
9
 
10
+ ### RealVisXL V3 ###
11
+ RealVisXLv3_pipe = DiffusionPipeline.from_pretrained(
12
+ "SG161222/RealVisXL_V3.0",
13
+ torch_dtype=torch.float16,
14
+ use_safetensors=True,
15
+ add_watermarker=False,
16
+ variant="fp16"
17
+ )
18
+ RealVisXLv3_pipe.to("cuda")
19
+ ### RealVisXL V4 ###
20
+ RealVisXLv4_pipe = DiffusionPipeline.from_pretrained(
21
+ "SG161222/RealVisXL_V4.0",
22
+ torch_dtype=torch.float16,
23
+ use_safetensors=True,
24
+ add_watermarker=False,
25
+ variant="fp16"
26
+ )
27
+ RealVisXLv4_pipe.to("cuda")
28
  ### SDXL Turbo ####
29
  pipe_turbo = StableDiffusionXLPipeline.from_pretrained("stabilityai/sdxl-turbo",
30
  vae=vae,
 
82
  yield image_turbo, image_lightning, None
83
  image_hyper=pipe_hyper(prompt=prompt, num_inference_steps=1, guidance_scale=0, timesteps=[800]).images[0]
84
  yield image_turbo, image_lightning, image_hyper
85
+ image_turbo=RealVisXLv3_pipe(prompt=prompt, num_inference_steps=8, guidance_scale=0).images[0]
86
+ yield image_turbo, None, None
87
+ image_lightning=RealVisXLv4_pipe(prompt=prompt, num_inference_steps=8, guidance_scale=0).images[0]
88
+ yield image_turbo, image_lightning, None
89
 
90
  examples = ["A dignified beaver wearing glasses, a vest, and colorful neck tie.",
91
  "The spirit of a tamagotchi wandering in the city of Barcelona",
 
111
  with gr.Column():
112
  image_hyper = gr.Image(label="Hyper SDXL")
113
  gr.Markdown("## [Hyper SDXL](https://huggingface.co/ByteDance/Hyper-SD)")
114
+ with gr.Column():
115
+ image_r3 = gr.Image(label="RealVisXL V3")
116
+ gr.Markdown("## [RealVisXL V3](https://huggingface.co)")
117
+ with gr.Column():
118
+ image_r4 = gr.Image(label="RealVisXL V4")
119
+ gr.Markdown("## [RealVisXL V3](https://huggingface.co)")
120
+ image_outputs = [image_turbo, image_lightning, image_hyper, image_r3, image_4]
121
  gr.on(
122
  triggers=[prompt.submit, run.click],
123
  fn=run_comparison,