Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,6 @@ local_repo_path = snapshot_download(repo_id=repo_id, repo_type="model")
|
|
98 |
local_folder = os.path.join(local_repo_path, subfolder)
|
99 |
local_folder2 = os.path.join(local_repo_path, subfolder2) # Path to the ip_adapter dir
|
100 |
ip_ckpt = os.path.join(local_folder2, "ip-adapter_sdxl_vit-h.bin") # Correct path
|
101 |
-
ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
|
102 |
|
103 |
#sampling_schedule = AysSchedules["StableDiffusionXLTimesteps"]
|
104 |
upscaler = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device("cuda:0"))
|
@@ -284,6 +283,7 @@ def generate_30(
|
|
284 |
#gc.collect()
|
285 |
global models
|
286 |
pipe = models
|
|
|
287 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
288 |
generator = torch.Generator(device='cuda').manual_seed(seed)
|
289 |
if latent_file: # Check if a latent file is provided
|
@@ -339,6 +339,7 @@ def generate_60(
|
|
339 |
#gc.collect()
|
340 |
global models
|
341 |
pipe = models
|
|
|
342 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
343 |
generator = torch.Generator(device='cuda').manual_seed(seed)
|
344 |
if latent_file: # Check if a latent file is provided
|
@@ -394,6 +395,7 @@ def generate_90(
|
|
394 |
#gc.collect()
|
395 |
global models
|
396 |
pipe = models
|
|
|
397 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
398 |
generator = torch.Generator(device='cuda').manual_seed(seed)
|
399 |
if latent_file: # Check if a latent file is provided
|
|
|
98 |
local_folder = os.path.join(local_repo_path, subfolder)
|
99 |
local_folder2 = os.path.join(local_repo_path, subfolder2) # Path to the ip_adapter dir
|
100 |
ip_ckpt = os.path.join(local_folder2, "ip-adapter_sdxl_vit-h.bin") # Correct path
|
|
|
101 |
|
102 |
#sampling_schedule = AysSchedules["StableDiffusionXLTimesteps"]
|
103 |
upscaler = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device("cuda:0"))
|
|
|
283 |
#gc.collect()
|
284 |
global models
|
285 |
pipe = models
|
286 |
+
ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
|
287 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
288 |
generator = torch.Generator(device='cuda').manual_seed(seed)
|
289 |
if latent_file: # Check if a latent file is provided
|
|
|
339 |
#gc.collect()
|
340 |
global models
|
341 |
pipe = models
|
342 |
+
ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
|
343 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
344 |
generator = torch.Generator(device='cuda').manual_seed(seed)
|
345 |
if latent_file: # Check if a latent file is provided
|
|
|
395 |
#gc.collect()
|
396 |
global models
|
397 |
pipe = models
|
398 |
+
ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
|
399 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
400 |
generator = torch.Generator(device='cuda').manual_seed(seed)
|
401 |
if latent_file: # Check if a latent file is provided
|