Muhammadreza commited on
Commit
cedc7df
1 Parent(s): 01f9dd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -46
app.py CHANGED
@@ -15,7 +15,7 @@ controlnet = ControlNetModel.from_pretrained(
15
 
16
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
17
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
18
- "stabilityai/stable-diffusion-xl-base-1.0",
19
  controlnet=controlnet,
20
  vae=vae,
21
  torch_dtype=torch.float16,
@@ -50,7 +50,7 @@ with block:
50
  gr.Markdown("## ControlNet SDXL Canny")
51
  gr.HTML('''
52
  <p style="margin-bottom: 10px; font-size: 94%">
53
- This is a demo for ControlNet SDXL, which is a neural network structure to control Stable Diffusion XL model by adding extra condition such as canny edge detection.
54
  </p>
55
  ''')
56
  gr.HTML("<p>You can duplicate this Space to run it privately without a queue and load additional checkpoints. : <a style='display:inline-block' href='https://huggingface.co/spaces/RamAnanth1/controlnet-sdxl-canny?duplicate=true'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14' alt='Duplicate Space'></a> </p>")
@@ -65,48 +65,5 @@ with block:
65
  result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery").style(grid_cols=2, height='auto')
66
  ips = [input_image, prompt]
67
  run_button.click(fn=process, inputs=ips, outputs=[result_gallery])
68
- # examples_list = [
69
- # # [
70
- # # "bird.png",
71
- # # "bird",
72
- # # "Canny Edge Map"
73
-
74
- # # ],
75
-
76
- # # [
77
- # # "turtle.png",
78
- # # "turtle",
79
- # # "Scribble",
80
- # # "best quality, extremely detailed",
81
- # # 'longbody, lowres, bad anatomy, bad hands, missing fingers, pubic hair,extra digit, fewer digits, cropped, worst quality, low quality',
82
- # # 1,
83
- # # 512,
84
- # # 20,
85
- # # 9.0,
86
- # # 123490213,
87
- # # 0.0,
88
- # # 100,
89
- # # 200
90
-
91
- # # ],
92
- # [
93
- # "pose1.png",
94
- # "Chef in the Kitchen",
95
- # "Pose",
96
- # # "best quality, extremely detailed",
97
- # # 'longbody, lowres, bad anatomy, bad hands, missing fingers, pubic hair,extra digit, fewer digits, cropped, worst quality, low quality',
98
- # # 1,
99
- # # 512,
100
- # # 20,
101
- # # 9.0,
102
- # # 123490213,
103
- # # 0.0,
104
- # # 100,
105
- # # 200
106
-
107
- # ]
108
- # ]
109
- # examples = gr.Examples(examples=examples_list,inputs = [input_image, prompt], outputs = [result_gallery], cache_examples = True, fn = process)
110
- gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=RamAnanth1.ControlNet)")
111
 
112
- block.launch(debug = True)
 
15
 
16
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
17
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
18
+ "mann-e/Mann-E_Dreams",
19
  controlnet=controlnet,
20
  vae=vae,
21
  torch_dtype=torch.float16,
 
50
  gr.Markdown("## ControlNet SDXL Canny")
51
  gr.HTML('''
52
  <p style="margin-bottom: 10px; font-size: 94%">
53
+ This is a demo for ControlNet Mann-E Dreams (SDXL based), which is a neural network structure to control Stable Diffusion XL model by adding extra condition such as canny edge detection.
54
  </p>
55
  ''')
56
  gr.HTML("<p>You can duplicate this Space to run it privately without a queue and load additional checkpoints. : <a style='display:inline-block' href='https://huggingface.co/spaces/RamAnanth1/controlnet-sdxl-canny?duplicate=true'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14' alt='Duplicate Space'></a> </p>")
 
65
  result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery").style(grid_cols=2, height='auto')
66
  ips = [input_image, prompt]
67
  run_button.click(fn=process, inputs=ips, outputs=[result_gallery])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
+ block.launch(debug = True, show_error=True)