ameerazam08 commited on
Commit
9916843
β€’
1 Parent(s): 7d47252

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -14,7 +14,7 @@ from diffusers import AutoPipelineForText2Image, DPMSolverMultistepScheduler
14
  from huggingface_hub import hf_hub_download
15
 
16
  DESCRIPTION = """
17
- # Res-Adapter
18
  **Demo by [ameer azam] - [Twitter](https://twitter.com/Ameerazam18) - [GitHub](https://github.com/AMEERAZAM08)) - [Hugging Face](https://huggingface.co/ameerazam08)**
19
  This is a demo of https://huggingface.co/jiaxiangc/res-adapter LORAs by ByteDance
20
  """
@@ -29,9 +29,10 @@ ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
29
 
30
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
31
  if torch.cuda.is_available():
32
- pipe = AutoPipelineForText2Image.from_pretrained('Lykon/dreamshaper-xl-1-0', torch_dtype=torch.float16)
 
33
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++")
34
- pipe = pipe.to("cuda")
35
 
36
 
37
  pipe.load_lora_weights(
@@ -167,14 +168,14 @@ with gr.Blocks(css="footer{display:none !important}", theme=theme) as demo:
167
  minimum=256,
168
  maximum=MAX_IMAGE_SIZE,
169
  step=32,
170
- value=1024,
171
  )
172
  height = gr.Slider(
173
  label="Height",
174
  minimum=256,
175
  maximum=MAX_IMAGE_SIZE,
176
  step=32,
177
- value=1024,
178
  )
179
  with gr.Row():
180
  guidance_scale_base = gr.Slider(
 
14
  from huggingface_hub import hf_hub_download
15
 
16
  DESCRIPTION = """
17
+ # Res-Adapter :Domain Consistent Resolution Adapter for Diffusion Models
18
  **Demo by [ameer azam] - [Twitter](https://twitter.com/Ameerazam18) - [GitHub](https://github.com/AMEERAZAM08)) - [Hugging Face](https://huggingface.co/ameerazam08)**
19
  This is a demo of https://huggingface.co/jiaxiangc/res-adapter LORAs by ByteDance
20
  """
 
29
 
30
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
31
  if torch.cuda.is_available():
32
+ #Lykon/dreamshaper-xl-1-0
33
+ pipe = AutoPipelineForText2Image.from_pretrained('stabilityai/stable-diffusion-xl-base-1.0',)# torch_dtype=torch.float16, variant="safetensors")
34
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++")
35
+ pipe = pipe.to(device)
36
 
37
 
38
  pipe.load_lora_weights(
 
168
  minimum=256,
169
  maximum=MAX_IMAGE_SIZE,
170
  step=32,
171
+ value=512,
172
  )
173
  height = gr.Slider(
174
  label="Height",
175
  minimum=256,
176
  maximum=MAX_IMAGE_SIZE,
177
  step=32,
178
+ value=512,
179
  )
180
  with gr.Row():
181
  guidance_scale_base = gr.Slider(