Staticaliza commited on
Commit
268543e
·
verified ·
1 Parent(s): 9955db2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,10 +27,10 @@ DEFAULT_WIDTH = 1024
27
 
28
  REPO = "sd-community/sdxl-flash"
29
 
30
- vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse-original").half().to(DEVICE)
31
  controlnet = ControlNetModel.from_pretrained("MakiPan/controlnet-encoded-hands-130k", torch_dtype=torch.float16)
32
 
33
- model = StableDiffusionXLPipeline.from_pretrained(REPO, vae=vae, controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
34
  model.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
35
  model.set_adapters(["base"], adapter_weights=[0.7])
36
  model.to(DEVICE)
@@ -73,7 +73,7 @@ def generate(input=DEFAULT_INPUT, negative_input=DEFAULT_NEGATIVE_INPUT, height=
73
  "guidance_scale": guidance,
74
  "num_images_per_prompt": number,
75
  "controlnet_conditioning_scale": 1,
76
- "cross_attention_kwargs": {"scale": 1},
77
  "generator": torch.Generator().manual_seed(seed),
78
  "use_resolution_binning": True,
79
  "output_type":"pil",
 
27
 
28
  REPO = "sd-community/sdxl-flash"
29
 
30
+ #vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse-original").half().to(DEVICE), vae=vae
31
  controlnet = ControlNetModel.from_pretrained("MakiPan/controlnet-encoded-hands-130k", torch_dtype=torch.float16)
32
 
33
+ model = StableDiffusionXLPipeline.from_pretrained(REPO, controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
34
  model.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
35
  model.set_adapters(["base"], adapter_weights=[0.7])
36
  model.to(DEVICE)
 
73
  "guidance_scale": guidance,
74
  "num_images_per_prompt": number,
75
  "controlnet_conditioning_scale": 1,
76
+ "cross_attention_kwargs": {"scale": 0.1},
77
  "generator": torch.Generator().manual_seed(seed),
78
  "use_resolution_binning": True,
79
  "output_type":"pil",