Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ class PlaceHolderCaptionProcessor:
|
|
142 |
|
143 |
def initialize_models(captioner_name):
|
144 |
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
|
145 |
-
pipeline = OneDiffusionPipeline.from_pretrained("/
|
146 |
if captioner_name == 'molmo':
|
147 |
captioner = MolmoCaptionProcessor()
|
148 |
elif captioner_name == 'llava':
|
@@ -753,7 +753,7 @@ def delete_all_images():
|
|
753 |
|
754 |
if __name__ == "__main__":
|
755 |
parser = argparse.ArgumentParser(description='Start the Gradio demo with specified captioner.')
|
756 |
-
parser.add_argument('--captioner', type=str, choices=['molmo', 'llava', 'disable'], default='
|
757 |
args = parser.parse_args()
|
758 |
|
759 |
# Initialize models with the specified captioner
|
|
|
142 |
|
143 |
def initialize_models(captioner_name):
|
144 |
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
|
145 |
+
pipeline = OneDiffusionPipeline.from_pretrained("lehduong/OneDiffusion").to(device=device, dtype=torch.bfloat16)
|
146 |
if captioner_name == 'molmo':
|
147 |
captioner = MolmoCaptionProcessor()
|
148 |
elif captioner_name == 'llava':
|
|
|
753 |
|
754 |
if __name__ == "__main__":
|
755 |
parser = argparse.ArgumentParser(description='Start the Gradio demo with specified captioner.')
|
756 |
+
parser.add_argument('--captioner', type=str, choices=['molmo', 'llava', 'disable'], default='molmo', help='Captioner to use: molmo, llava, disable.')
|
757 |
args = parser.parse_args()
|
758 |
|
759 |
# Initialize models with the specified captioner
|