mrestrepo commited on
Commit
688007d
·
1 Parent(s): d48fbdf

Test image2image

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -3,8 +3,7 @@ import gradio as gr
3
  import numpy as np
4
  import random
5
  import os
6
- # from diffusers import AutoPipelineForText2Image
7
- from diffusers import FluxPipeline
8
  import torch
9
  from huggingface_hub import snapshot_download
10
 
@@ -13,7 +12,7 @@ SPACE_PASSWORD = 'KR_4dmin'
13
 
14
  snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
15
 
16
- pipeline = FluxPipeline.from_pretrained(
17
  'black-forest-labs/FLUX.1-schnell', torch_dtype=torch.bfloat16).to('cuda')
18
  pipeline.load_lora_weights('Roomie/xavyy', weight_name='xavyy.safetensors')
19
 
@@ -33,7 +32,7 @@ def infer(prompt, refer_image, height, width):
33
  # num_inference_steps=num_inference_steps,
34
  width=width,
35
  height=height,
36
- init_image=refer_image
37
  # generator=generator
38
  ).images[0]
39
 
 
3
  import numpy as np
4
  import random
5
  import os
6
+ from diffusers import FluxImg2ImgPipeline
 
7
  import torch
8
  from huggingface_hub import snapshot_download
9
 
 
12
 
13
  snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
14
 
15
+ pipeline = FluxImg2ImgPipeline.from_pretrained(
16
  'black-forest-labs/FLUX.1-schnell', torch_dtype=torch.bfloat16).to('cuda')
17
  pipeline.load_lora_weights('Roomie/xavyy', weight_name='xavyy.safetensors')
18
 
 
32
  # num_inference_steps=num_inference_steps,
33
  width=width,
34
  height=height,
35
+ image=refer_image
36
  # generator=generator
37
  ).images[0]
38