amos1088 commited on
Commit
3430435
·
1 Parent(s): a2b1998

test gradio

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,13 +16,13 @@ login(token=token)
16
 
17
 
18
  pipeline = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16).to("cuda")
19
- pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter-plus-face_sdxl_vit-h.safetensors")
20
 
21
 
22
 
23
  @spaces.GPU
24
  def generate_image(prompt, reference_image, controlnet_conditioning_scale):
25
- style_images = [load_image(f.name).resize((640,640)) for f in reference_image]
26
 
27
  pipeline.set_ip_adapter_scale(controlnet_conditioning_scale)
28
 
 
16
 
17
 
18
  pipeline = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16).to("cuda")
19
+ pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter-plus_sdxl_vit-h.safetensors")
20
 
21
 
22
 
23
  @spaces.GPU
24
  def generate_image(prompt, reference_image, controlnet_conditioning_scale):
25
+ style_images = [load_image(f.name) for f in reference_image]
26
 
27
  pipeline.set_ip_adapter_scale(controlnet_conditioning_scale)
28