Spaces:
Running on Zero
Running on Zero
tight-inversion commited on
Commit ·
c8ff942
1
Parent(s): 4ad37aa
Tight Inversion SDXL demo
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +2 -0
- .gitignore +1 -0
- app.py +230 -0
- configs/run_configs/ddim/ddim_ipa_scale_0.4.yaml +23 -0
- example_images/animals/0.jpg +3 -0
- example_images/animals/1.jpg +3 -0
- example_images/animals/2.jpg +3 -0
- example_images/animals/3.jpg +3 -0
- example_images/animals/4.jpg +3 -0
- example_images/animals/5.jpg +3 -0
- example_images/animals/6.jpg +3 -0
- example_images/animals/7.jpg +3 -0
- example_images/animals/8.jpg +3 -0
- example_images/animals/9.jpg +3 -0
- example_images/editAR_images/.DS_Store +0 -0
- example_images/editAR_images/air_baloons.jpg +3 -0
- example_images/editAR_images/camera.jpg +3 -0
- example_images/editAR_images/cars_parking.jpg +3 -0
- example_images/editAR_images/cat.jpg +3 -0
- example_images/editAR_images/chief.jpg +3 -0
- example_images/editAR_images/dog_forest.jpg +3 -0
- example_images/editAR_images/mushroom.jpg +3 -0
- example_images/editAR_images/tea_cups.jpg +3 -0
- example_images/editAR_images/wooden_horse.jpg +3 -0
- example_images/garibis_images/0.jpg +3 -0
- example_images/garibis_images/1.jpg +3 -0
- example_images/garibis_images/2.jpg +3 -0
- example_images/garibis_images/3.jpg +3 -0
- example_images/garibis_images/4.jpg +3 -0
- example_images/garibis_images/5.jpg +3 -0
- example_images/magic_brush/262283-input.png +3 -0
- example_images/people/0.jpg +3 -0
- example_images/people/1.jpg +3 -0
- example_images/people/2.jpg +3 -0
- example_images/people/3.jpg +3 -0
- example_images/people/4.jpg +3 -0
- example_images/people/5.jpg +3 -0
- example_images/people/6.jpg +3 -0
- example_images/people/7.jpg +3 -0
- example_images/people/8.jpg +3 -0
- example_images/people/9.jpg +3 -0
- example_images/tests/closed_box.jpg +3 -0
- example_images/tests/diner.png +3 -0
- example_images/tests/diner_square.png +3 -0
- example_images/tests/dog.jpg +3 -0
- example_images/tests/dog_square.jpg +3 -0
- example_images/tests/dog_standing.jpg +3 -0
- example_images/tests/kitten.jpg +3 -0
- example_images/tests/lion.jpg +3 -0
- example_images/tests/monkey.jpg +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
**/__pycache__/
|
app.py
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import torch
|
| 3 |
+
import random
|
| 4 |
+
import numpy as np
|
| 5 |
+
from PIL import Image
|
| 6 |
+
from diffusers.utils import load_image
|
| 7 |
+
import yaml
|
| 8 |
+
|
| 9 |
+
# Import parts of your original code
|
| 10 |
+
from diffusers.utils.torch_utils import randn_tensor
|
| 11 |
+
from transformers import CLIPVisionModelWithProjection
|
| 12 |
+
|
| 13 |
+
# These functions are assumed to be available in your project:
|
| 14 |
+
from src.config import RunConfig
|
| 15 |
+
from src.enums import Model_Type, Scheduler_Type
|
| 16 |
+
from src.utils.enums_utils import get_pipes, is_stochastic, model_type_to_size
|
| 17 |
+
from src.utils.images_utils import crop_center_square_and_resize
|
| 18 |
+
|
| 19 |
+
# Use the same weight name as in your code
|
| 20 |
+
weight_name = "ip-adapter-plus_sdxl_vit-h.safetensors"
|
| 21 |
+
|
| 22 |
+
# A helper to create noise (duplicated from your code)
|
| 23 |
+
def create_noise_list(model_type, length, dtype, generator=None):
|
| 24 |
+
img_size = model_type_to_size(model_type)
|
| 25 |
+
VQAE_SCALE = 8
|
| 26 |
+
latents_size = (1, 4, img_size[0] // VQAE_SCALE, img_size[1] // VQAE_SCALE)
|
| 27 |
+
device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
|
| 28 |
+
return [randn_tensor(latents_size, dtype=dtype, device=device, generator=generator) for i in range(length)]
|
| 29 |
+
|
| 30 |
+
config_path = "configs/run_configs/ddim/ddim_ipa_scale_0.4.yaml"
|
| 31 |
+
with open(config_path, 'r') as file:
|
| 32 |
+
cfg = RunConfig.from_yaml(yaml.safe_load(file))
|
| 33 |
+
|
| 34 |
+
# Set device and seed
|
| 35 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 36 |
+
seed = cfg.seed if cfg.seed is not None else 42
|
| 37 |
+
torch.manual_seed(seed)
|
| 38 |
+
random.seed(seed)
|
| 39 |
+
np.random.seed(seed)
|
| 40 |
+
|
| 41 |
+
# Set torch dtype based on config
|
| 42 |
+
dtype = torch.float32 if cfg.use_float32 else torch.bfloat16
|
| 43 |
+
|
| 44 |
+
# Load image encoder if using IP-Adapter
|
| 45 |
+
image_encoder = None
|
| 46 |
+
if cfg.inference_use_ipa:
|
| 47 |
+
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
|
| 48 |
+
"h94/IP-Adapter",
|
| 49 |
+
subfolder="models/image_encoder",
|
| 50 |
+
torch_dtype=dtype,
|
| 51 |
+
).to(device)
|
| 52 |
+
|
| 53 |
+
# Get both inversion and inference (editing) pipelines.
|
| 54 |
+
pipe_inversion, pipe_inference = get_pipes(cfg, image_encoder=image_encoder, device=device)
|
| 55 |
+
# pipe_inversion.cfg = cfg
|
| 56 |
+
# pipe_inference.cfg = cfg
|
| 57 |
+
|
| 58 |
+
def edit_demo(source_image, source_prompt, edit_prompt, ipa_scale, guidance_scale, sharpening_factor, use_negative_prompt):
|
| 59 |
+
"""
|
| 60 |
+
Given a source image, a source prompt and an edit prompt, this function:
|
| 61 |
+
1. Preprocesses the image.
|
| 62 |
+
2. Uses the inversion pipeline (with the source prompt) to compute image latents
|
| 63 |
+
using an IPA scale set by the user.
|
| 64 |
+
3. Uses the editing pipeline (with the edit prompt) to generate the edited image
|
| 65 |
+
using the user-provided guidance scale (while inversion guidance scale is fixed to 1)
|
| 66 |
+
and applies a sharpening factor.
|
| 67 |
+
"""
|
| 68 |
+
if source_image is None:
|
| 69 |
+
return None
|
| 70 |
+
|
| 71 |
+
pipe_inversion, pipe_inference = get_pipes(cfg, image_encoder=image_encoder, device=device)
|
| 72 |
+
pipe_inversion.cfg = cfg
|
| 73 |
+
pipe_inference.cfg = cfg
|
| 74 |
+
|
| 75 |
+
# Preprocess the source image: convert to RGB and crop/resize
|
| 76 |
+
input_image = source_image.convert("RGB")
|
| 77 |
+
model_size = model_type_to_size(cfg.model_type) # e.g. (512, 512)
|
| 78 |
+
if input_image.size == (500, 500):
|
| 79 |
+
# add noise to the image (magicbrush)
|
| 80 |
+
input_image = input_image.resize(model_size)
|
| 81 |
+
# # Convert image to numpy array
|
| 82 |
+
image_array = np.array(input_image)
|
| 83 |
+
|
| 84 |
+
# Define Gaussian noise parameters
|
| 85 |
+
mean = 0
|
| 86 |
+
stddev = 17.5 # Standard deviation (adjust for more/less noise)
|
| 87 |
+
|
| 88 |
+
# Generate Gaussian noise
|
| 89 |
+
gaussian_noise = np.random.normal(mean, stddev, image_array.shape).astype(np.float32)
|
| 90 |
+
|
| 91 |
+
# Add noise to the image
|
| 92 |
+
noisy_image_array = np.clip(image_array + gaussian_noise, 0, 255).astype(np.uint8)
|
| 93 |
+
|
| 94 |
+
# Convert back to PIL Image
|
| 95 |
+
noisy_image = Image.fromarray(noisy_image_array)
|
| 96 |
+
input_image = noisy_image
|
| 97 |
+
else:
|
| 98 |
+
input_image = crop_center_square_and_resize(input_image, model_size)
|
| 99 |
+
|
| 100 |
+
# Prepare IP adapter arguments using the user-specified IPA scale
|
| 101 |
+
editing_ipa_args = {}
|
| 102 |
+
inversion_ipa_args = {}
|
| 103 |
+
reconstruction_ipa_args = {}
|
| 104 |
+
if cfg.inference_use_ipa or cfg.inversion_use_ipa:
|
| 105 |
+
# pipe_inversion.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name=weight_name)
|
| 106 |
+
pipe_inference.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name=weight_name)
|
| 107 |
+
pipe_inference.set_ip_adapter_scale(cfg.inference_ipa_scale)
|
| 108 |
+
print("Preparing image embeds...")
|
| 109 |
+
image_embeds = pipe_inference.prepare_ip_adapter_image_embeds(
|
| 110 |
+
ip_adapter_image=input_image,
|
| 111 |
+
ip_adapter_image_embeds=None,
|
| 112 |
+
device=device,
|
| 113 |
+
num_images_per_prompt=1,
|
| 114 |
+
do_classifier_free_guidance=True,
|
| 115 |
+
)
|
| 116 |
+
if cfg.use_image_embeds_for_null_prompt:
|
| 117 |
+
image_embeds = [torch.stack([image_embeds[0][1], image_embeds[0][1]])]
|
| 118 |
+
inference_image_embeds = image_embeds
|
| 119 |
+
inversion_image_embeds = image_embeds
|
| 120 |
+
reconstruction_image_embeds = image_embeds
|
| 121 |
+
if cfg.guidance_scale == 1.0 or cfg.guidance_scale == 0.0:
|
| 122 |
+
inference_image_embeds = [image_embeds[0][None, 1]]
|
| 123 |
+
if cfg.inversion_guidance_scale == 1.0 or cfg.inversion_guidance_scale == 0.0:
|
| 124 |
+
inversion_image_embeds = [image_embeds[0][None, 1]]
|
| 125 |
+
if cfg.reconstruction_guidance_scale == 1.0 or cfg.reconstruction_guidance_scale == 0.0:
|
| 126 |
+
reconstruction_image_embeds = [image_embeds[0][None, 1]]
|
| 127 |
+
if cfg.inference_use_ipa:
|
| 128 |
+
editing_ipa_args = {"ip_adapter_image_embeds": inference_image_embeds}
|
| 129 |
+
reconstruction_ipa_args = {"ip_adapter_image_embeds": reconstruction_image_embeds}
|
| 130 |
+
if cfg.inversion_use_ipa:
|
| 131 |
+
inversion_ipa_args = {"ip_adapter_image_embeds": inversion_image_embeds}
|
| 132 |
+
pipe_inference.unload_ip_adapter()
|
| 133 |
+
|
| 134 |
+
# Create a generator with the seed
|
| 135 |
+
generator = torch.Generator(device=device).manual_seed(seed)
|
| 136 |
+
if is_stochastic(cfg.scheduler_type):
|
| 137 |
+
noise = create_noise_list(cfg.model_type, cfg.num_inversion_steps, dtype, generator=generator)
|
| 138 |
+
pipe_inversion.scheduler.set_noise_list(noise)
|
| 139 |
+
pipe_inference.scheduler.set_noise_list(noise)
|
| 140 |
+
|
| 141 |
+
# --- Inversion Stage ---
|
| 142 |
+
# Use the source prompt to invert the image into latents.
|
| 143 |
+
print("Performing inversion...")
|
| 144 |
+
if cfg.inversion_use_ipa:
|
| 145 |
+
pipe_inversion.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name=weight_name)
|
| 146 |
+
pipe_inversion.set_ip_adapter_scale(ipa_scale) # user-specified IPA scale
|
| 147 |
+
inversion_result = pipe_inversion(
|
| 148 |
+
prompt=source_prompt if source_prompt != "" else None,
|
| 149 |
+
negative_prompt=cfg.negative_prompt,
|
| 150 |
+
num_inversion_steps=cfg.num_inversion_steps,
|
| 151 |
+
num_inference_steps=cfg.num_inversion_steps,
|
| 152 |
+
generator=generator,
|
| 153 |
+
image=input_image,
|
| 154 |
+
guidance_scale=1.0, # inversion guidance scale is fixed to 1
|
| 155 |
+
use_cfgpp=cfg.use_cfgpp_inversion,
|
| 156 |
+
strength=cfg.inversion_max_step,
|
| 157 |
+
denoising_start=1.0 - cfg.inversion_max_step,
|
| 158 |
+
num_gd_steps=cfg.num_gd_steps,
|
| 159 |
+
gd_step_size=cfg.gd_step_size,
|
| 160 |
+
optimization_start=cfg.optimization_start,
|
| 161 |
+
normalize=cfg.normalize,
|
| 162 |
+
**inversion_ipa_args
|
| 163 |
+
)
|
| 164 |
+
# The inversion result returns a tuple; we take the first latent.
|
| 165 |
+
inv_latent = inversion_result[0][0]
|
| 166 |
+
|
| 167 |
+
# --- Editing Stage ---
|
| 168 |
+
print("Performing editing...")
|
| 169 |
+
negative_prompt = cfg.negative_prompt if not use_negative_prompt else source_prompt
|
| 170 |
+
if cfg.inference_use_ipa:
|
| 171 |
+
pipe_inference.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name=weight_name)
|
| 172 |
+
pipe_inference.set_ip_adapter_scale(ipa_scale) # user-specified IPA scale
|
| 173 |
+
edited_image = pipe_inference(
|
| 174 |
+
image=inv_latent,
|
| 175 |
+
prompt=edit_prompt if edit_prompt != "" else None,
|
| 176 |
+
negative_prompt=negative_prompt if negative_prompt != "" else None,
|
| 177 |
+
denoising_start=1.0 - cfg.inversion_max_step,
|
| 178 |
+
strength=cfg.inversion_max_step,
|
| 179 |
+
num_inference_steps=cfg.num_inference_steps,
|
| 180 |
+
guidance_scale=guidance_scale, # use the user-specified editing guidance scale
|
| 181 |
+
guidance_rescale=cfg.guidance_rescale,
|
| 182 |
+
use_cfgpp=cfg.use_cfgpp_inference,
|
| 183 |
+
sharpening_factor=sharpening_factor,
|
| 184 |
+
**editing_ipa_args
|
| 185 |
+
).images[0]
|
| 186 |
+
|
| 187 |
+
pipe_inference.unload_ip_adapter()
|
| 188 |
+
pipe_inversion.unload_ip_adapter()
|
| 189 |
+
|
| 190 |
+
return edited_image
|
| 191 |
+
|
| 192 |
+
# Build Gradio Interface with additional inputs for IPA scale, guidance scale, and sharpening factor.
|
| 193 |
+
demo = gr.Interface(
|
| 194 |
+
fn=edit_demo,
|
| 195 |
+
inputs=[
|
| 196 |
+
gr.Image(type="pil", label="Source Image"),
|
| 197 |
+
gr.Textbox(lines=2, placeholder="Enter source prompt here", label="Source Prompt"),
|
| 198 |
+
gr.Textbox(lines=2, placeholder="Enter edit prompt here", label="Edit Prompt"),
|
| 199 |
+
gr.Slider(minimum=0.1, maximum=1.0, step=0.05, value=0.4, label="IPA Scale"),
|
| 200 |
+
gr.Slider(minimum=1.0, maximum=20.0, step=0.1, value=7.5, label="Guidance Scale for Editing"),
|
| 201 |
+
gr.Slider(minimum=1.0, maximum=3.0, step=0.1, value=1.5, label="Sharpening Factor"),
|
| 202 |
+
gr.Checkbox(label="Use negative prompt", value=False),
|
| 203 |
+
],
|
| 204 |
+
outputs=gr.Image(type="pil", label="Edited Image"),
|
| 205 |
+
title="Tight Inversion SDXL Demo",
|
| 206 |
+
description=(
|
| 207 |
+
"Upload an image, provide a source prompt (for inversion) and an edit prompt, "
|
| 208 |
+
"set the IPA scale (for both inversion and editing), the guidance scale for editing "
|
| 209 |
+
"(inversion guidance scale is fixed to 1), and the guidance scale sharpening factor (editing only), "
|
| 210 |
+
"then view the edited image. You can start with the provided examples."
|
| 211 |
+
),
|
| 212 |
+
examples=[
|
| 213 |
+
# Example template:
|
| 214 |
+
# ["path/to/example_image.jpg", "A sunny landscape", "A stormy night", 0.4, 7.5, 1.5],
|
| 215 |
+
# Add more examples here.
|
| 216 |
+
["example_images/animals/7.jpg", "A photo of a husky", "A photo of a cat", 0.4, 7.5, 1.0, False],
|
| 217 |
+
["example_images/tests/diner_square.png", "a photo of people dining in a diner", "a photo of robots dining in a diner", 0.4, 7.5, 1.0, True],
|
| 218 |
+
["example_images/tests/lion.jpg", "a lion in the field", "a lion made of lego in the field", 0.4, 7.5, 1.0, True],
|
| 219 |
+
["example_images/garibis_images/5.jpg", "metal elephant statues", "real living elephants", 0.3, 4.0, 1.0, True],
|
| 220 |
+
# ["example_images/tests/monkey.jpg", "a photo of a monkey sitting on a branch in the forest", "a photo of a beaver sitting on a branch in the forest", 0.7, 12, 1.5, False],
|
| 221 |
+
["example_images/editAR_images/dog_forest.jpg", "a dog running in the forest", "a forest with no one around", 0.4, 7.5, 1.0, False],
|
| 222 |
+
["example_images/animals/0.jpg", "A photo of a gazelle", "A photo of a gazelle wearing a red hat", 0.4, 7.5, 1.5, False],
|
| 223 |
+
# ["example_images/garibis_images/1.jpg", "white christmas tree", "christmas tree with red ornaments", 0.55, 7.5, 2.0, False],
|
| 224 |
+
["example_images/people/5.jpg", "a person", "a person with a large thick beard", 0.5, 7.5, 2.0, True],
|
| 225 |
+
["example_images/magic_brush/262283-input.png", "a lot of vases filled with lots of flowers", "a lot of vases filled with red roses", 0.4, 12, 1.4, True],
|
| 226 |
+
]
|
| 227 |
+
)
|
| 228 |
+
|
| 229 |
+
if __name__ == "__main__":
|
| 230 |
+
demo.launch()
|
configs/run_configs/ddim/ddim_ipa_scale_0.4.yaml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
method: ddim
|
| 2 |
+
model_type: SDXL
|
| 3 |
+
scheduler_type: DDIM
|
| 4 |
+
seed: 7865
|
| 5 |
+
negative_prompt: null
|
| 6 |
+
num_inference_steps: 50
|
| 7 |
+
num_inversion_steps: 50
|
| 8 |
+
inversion_max_step: 1.0
|
| 9 |
+
guidance_scale: 7.5
|
| 10 |
+
inversion_guidance_scale: 1.0
|
| 11 |
+
reconstruction_guidance_scale: 1.0
|
| 12 |
+
random_image_guidance_scale: 5.0
|
| 13 |
+
inference_use_ipa: true
|
| 14 |
+
inversion_use_ipa: true
|
| 15 |
+
inference_ipa_scale: 0.4
|
| 16 |
+
inversion_ipa_scale: 0.4
|
| 17 |
+
saturation_removal_ipa_scale: 0.4
|
| 18 |
+
num_gd_steps: 0
|
| 19 |
+
gd_step_size: 0.001
|
| 20 |
+
optimization_start: 0
|
| 21 |
+
normalize: false
|
| 22 |
+
random_inference_times: 0
|
| 23 |
+
remove_cfg_saturation: false
|
example_images/animals/0.jpg
ADDED
|
Git LFS Details
|
example_images/animals/1.jpg
ADDED
|
Git LFS Details
|
example_images/animals/2.jpg
ADDED
|
Git LFS Details
|
example_images/animals/3.jpg
ADDED
|
Git LFS Details
|
example_images/animals/4.jpg
ADDED
|
Git LFS Details
|
example_images/animals/5.jpg
ADDED
|
Git LFS Details
|
example_images/animals/6.jpg
ADDED
|
Git LFS Details
|
example_images/animals/7.jpg
ADDED
|
Git LFS Details
|
example_images/animals/8.jpg
ADDED
|
Git LFS Details
|
example_images/animals/9.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
example_images/editAR_images/air_baloons.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/camera.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/cars_parking.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/cat.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/chief.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/dog_forest.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/mushroom.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/tea_cups.jpg
ADDED
|
Git LFS Details
|
example_images/editAR_images/wooden_horse.jpg
ADDED
|
Git LFS Details
|
example_images/garibis_images/0.jpg
ADDED
|
Git LFS Details
|
example_images/garibis_images/1.jpg
ADDED
|
Git LFS Details
|
example_images/garibis_images/2.jpg
ADDED
|
Git LFS Details
|
example_images/garibis_images/3.jpg
ADDED
|
Git LFS Details
|
example_images/garibis_images/4.jpg
ADDED
|
Git LFS Details
|
example_images/garibis_images/5.jpg
ADDED
|
Git LFS Details
|
example_images/magic_brush/262283-input.png
ADDED
|
Git LFS Details
|
example_images/people/0.jpg
ADDED
|
Git LFS Details
|
example_images/people/1.jpg
ADDED
|
Git LFS Details
|
example_images/people/2.jpg
ADDED
|
Git LFS Details
|
example_images/people/3.jpg
ADDED
|
Git LFS Details
|
example_images/people/4.jpg
ADDED
|
Git LFS Details
|
example_images/people/5.jpg
ADDED
|
Git LFS Details
|
example_images/people/6.jpg
ADDED
|
Git LFS Details
|
example_images/people/7.jpg
ADDED
|
Git LFS Details
|
example_images/people/8.jpg
ADDED
|
Git LFS Details
|
example_images/people/9.jpg
ADDED
|
Git LFS Details
|
example_images/tests/closed_box.jpg
ADDED
|
Git LFS Details
|
example_images/tests/diner.png
ADDED
|
Git LFS Details
|
example_images/tests/diner_square.png
ADDED
|
Git LFS Details
|
example_images/tests/dog.jpg
ADDED
|
Git LFS Details
|
example_images/tests/dog_square.jpg
ADDED
|
Git LFS Details
|
example_images/tests/dog_standing.jpg
ADDED
|
Git LFS Details
|
example_images/tests/kitten.jpg
ADDED
|
Git LFS Details
|
example_images/tests/lion.jpg
ADDED
|
Git LFS Details
|
example_images/tests/monkey.jpg
ADDED
|
Git LFS Details
|