Spaces:
Running
on
Zero
Running
on
Zero
Update app.py (#3)
Browse files- Update app.py (2333d47c0f86ce3dd007624f982f6378f20f77f7)
- Update clip_slider_pipeline.py (53c6db545a065ecb5b3c71809264664da4055fce)
- app.py +2 -2
- clip_slider_pipeline.py +0 -3
app.py
CHANGED
@@ -69,8 +69,8 @@ def generate(prompt,
|
|
69 |
):
|
70 |
slider_x = [concept_2, concept_1]
|
71 |
# check if avg diff for directions need to be re-calculated
|
72 |
-
print("slider_x", slider_x)
|
73 |
-
print("x_concept_1", x_concept_1, "x_concept_2", x_concept_2)
|
74 |
if randomize_seed:
|
75 |
seed = random.randint(0, MAX_SEED)
|
76 |
|
|
|
69 |
):
|
70 |
slider_x = [concept_2, concept_1]
|
71 |
# check if avg diff for directions need to be re-calculated
|
72 |
+
#print("slider_x", slider_x)
|
73 |
+
#print("x_concept_1", x_concept_1, "x_concept_2", x_concept_2)
|
74 |
if randomize_seed:
|
75 |
seed = random.randint(0, MAX_SEED)
|
76 |
|
clip_slider_pipeline.py
CHANGED
@@ -412,7 +412,6 @@ class CLIPSliderFlux(CLIPSlider):
|
|
412 |
# if pooler token only [-4,4] work well
|
413 |
|
414 |
with torch.no_grad():
|
415 |
-
print("WTF 1.25")
|
416 |
text_inputs = self.pipe.tokenizer(
|
417 |
prompt,
|
418 |
padding="max_length",
|
@@ -454,11 +453,9 @@ class CLIPSliderFlux(CLIPSlider):
|
|
454 |
if avg_diff_2nd is not None:
|
455 |
pooled_prompt_embeds += avg_diff_2nd * scale_2nd
|
456 |
|
457 |
-
print("WTF 1.5")
|
458 |
torch.manual_seed(seed)
|
459 |
images = self.pipe(prompt_embeds=prompt_embeds, pooled_prompt_embeds=pooled_prompt_embeds,
|
460 |
**pipeline_kwargs).images
|
461 |
-
print("WTF 1.75")
|
462 |
|
463 |
return images[0]
|
464 |
|
|
|
412 |
# if pooler token only [-4,4] work well
|
413 |
|
414 |
with torch.no_grad():
|
|
|
415 |
text_inputs = self.pipe.tokenizer(
|
416 |
prompt,
|
417 |
padding="max_length",
|
|
|
453 |
if avg_diff_2nd is not None:
|
454 |
pooled_prompt_embeds += avg_diff_2nd * scale_2nd
|
455 |
|
|
|
456 |
torch.manual_seed(seed)
|
457 |
images = self.pipe(prompt_embeds=prompt_embeds, pooled_prompt_embeds=pooled_prompt_embeds,
|
458 |
**pipeline_kwargs).images
|
|
|
459 |
|
460 |
return images[0]
|
461 |
|