ford442 commited on
Commit
a916014
·
verified ·
1 Parent(s): 4060e8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -79,6 +79,8 @@ pipe = StableDiffusion3Pipeline.from_pretrained(
79
  #pipe.to(device=device, dtype=torch.bfloat16)
80
  pipe.to(device)
81
 
 
 
82
  upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device('cpu'))
83
 
84
  MAX_SEED = np.iinfo(np.int32).max
@@ -112,6 +114,7 @@ def infer_30(
112
  num_inference_steps=num_inference_steps,
113
  width=width,
114
  height=height,
 
115
  generator=generator,
116
  max_sequence_length=512
117
  ).images[0]
 
79
  #pipe.to(device=device, dtype=torch.bfloat16)
80
  pipe.to(device)
81
 
82
+ pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/UltraReal.safetensors", adapter_name="real")
83
+
84
  upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device('cpu'))
85
 
86
  MAX_SEED = np.iinfo(np.int32).max
 
114
  num_inference_steps=num_inference_steps,
115
  width=width,
116
  height=height,
117
+ cross_attention_kwargs={"scale": 0.75},
118
  generator=generator,
119
  max_sequence_length=512
120
  ).images[0]