devingulliver commited on
Commit
e5ffc85
·
verified ·
1 Parent(s): d96a5b1

Switch base model to CommonCanvas

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -10,9 +10,10 @@ from diffusers.models import AutoencoderKL
10
  import gradio as gr
11
 
12
  # load SDXL pipeline
13
- vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
14
- unet = UNet2DConditionModel.from_pretrained("mhdang/dpo-sdxl-text2image-v1", subfolder="unet", torch_dtype=torch.float16)
15
- pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", unet=unet, vae=vae, torch_dtype=torch.float16)
 
16
  pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
17
  pipe = pipe.to("cuda")
18
 
@@ -145,7 +146,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="green",secondary_hue="green", f
145
  det_in = gr.Image(interactive=True, sources=["upload","clipboard"], show_label=False)
146
  det_btn.click(fn=manager, inputs=det_in, outputs=det_out)
147
  with gr.Row():
148
- gr.HTML('<center><h1>&nbsp;</h1>Acknowledgements: Dendrokronos uses <a href="https://huggingface.co/mhdang/dpo-sdxl-text2image-v1">SDXL DPO 1.0</a> for the underlying image generation and <a href="https://arxiv.org/abs/2305.20030">an algorithm by UMD researchers</a> for the watermark technology.<br />Dendrokronos is a project by Devin Gulliver.</center>')
149
 
150
  app.queue()
151
  app.launch(show_api=False)
 
10
  import gradio as gr
11
 
12
  # load SDXL pipeline
13
+ #vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
14
+ #unet = UNet2DConditionModel.from_pretrained("mhdang/dpo-sdxl-text2image-v1", subfolder="unet", torch_dtype=torch.float16)
15
+ #pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", unet=unet, vae=vae, torch_dtype=torch.float16)
16
+ pipe = DiffusionPipeline.from_pretrained("common-canvas/CommonCanvas-XL-NC", torch_dtype=torch.float16)
17
  pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
18
  pipe = pipe.to("cuda")
19
 
 
146
  det_in = gr.Image(interactive=True, sources=["upload","clipboard"], show_label=False)
147
  det_btn.click(fn=manager, inputs=det_in, outputs=det_out)
148
  with gr.Row():
149
+ gr.HTML('<center><h1>&nbsp;</h1>Acknowledgements: Dendrokronos uses <a href="https://huggingface.co/common-canvas/CommonCanvas-XL-NC">CommonCanvas</a> for the underlying image generation and <a href="https://arxiv.org/abs/2305.20030">an algorithm by UMD researchers</a> for the watermark technology.<br />Dendrokronos is a project by Devin Gulliver.</center>')
150
 
151
  app.queue()
152
  app.launch(show_api=False)