Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ device = "cuda"
|
|
| 25 |
script_directory = os.path.dirname(os.path.realpath(__file__))
|
| 26 |
|
| 27 |
# download ConsistentID checkpoint to cache
|
| 28 |
-
base_model_path = "SG161222/
|
| 29 |
consistentID_path = hf_hub_download(repo_id="JackAILab/ConsistentID", filename="ConsistentID_SDXL-v1.bin", repo_type="model")
|
| 30 |
|
| 31 |
### Load base model
|
|
@@ -82,8 +82,7 @@ def process(selected_template_images,costum_image,prompt
|
|
| 82 |
if model_selected_tab==0:
|
| 83 |
select_images = load_image(Image.open(selected_template_images))
|
| 84 |
else:
|
| 85 |
-
|
| 86 |
-
select_images = load_image(costum_image)
|
| 87 |
|
| 88 |
if prompt_selected_tab==0:
|
| 89 |
prompt = prompt_selected
|
|
@@ -144,7 +143,7 @@ def process(selected_template_images,costum_image,prompt
|
|
| 144 |
width=width,
|
| 145 |
height=height,
|
| 146 |
input_id_images=select_images,
|
| 147 |
-
input_image_path=selected_template_images,
|
| 148 |
negative_prompt=negative_prompt,
|
| 149 |
num_images_per_prompt=1,
|
| 150 |
num_inference_steps=num_steps,
|
|
|
|
| 25 |
script_directory = os.path.dirname(os.path.realpath(__file__))
|
| 26 |
|
| 27 |
# download ConsistentID checkpoint to cache
|
| 28 |
+
base_model_path = "SG161222/RealVisXL_V3.0"
|
| 29 |
consistentID_path = hf_hub_download(repo_id="JackAILab/ConsistentID", filename="ConsistentID_SDXL-v1.bin", repo_type="model")
|
| 30 |
|
| 31 |
### Load base model
|
|
|
|
| 82 |
if model_selected_tab==0:
|
| 83 |
select_images = load_image(Image.open(selected_template_images))
|
| 84 |
else:
|
| 85 |
+
select_images = load_image(Image.fromarray(costum_image))
|
|
|
|
| 86 |
|
| 87 |
if prompt_selected_tab==0:
|
| 88 |
prompt = prompt_selected
|
|
|
|
| 143 |
width=width,
|
| 144 |
height=height,
|
| 145 |
input_id_images=select_images,
|
| 146 |
+
input_image_path=selected_template_images, ### path maybe not right, do not use
|
| 147 |
negative_prompt=negative_prompt,
|
| 148 |
num_images_per_prompt=1,
|
| 149 |
num_inference_steps=num_steps,
|