This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from pathlib import Path | |
from diffusers import DiffusionPipeline | |
import torch | |
from safetensors.torch import save_file | |
# First, set up the argument parser | |
parser = argparse.ArgumentParser(description="Process some integers.") | |
parser.add_argument("input_file", type=str, help="The input safe-tensors file") | |
parser.add_argument("output_file", type=str, help="The output safe-tensors file") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
# Replace 'your_folder_path' with the path to the directory containing your .png and .txt files | |
folder_path = 'datasets/pixel-art-xl-lite-v1' | |
output_jsonl_filename = 'datasets/pixel-art-xl-lite-v1/metadata.jsonl' | |
# List all files in the directory | |
files = os.listdir(folder_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"last_node_id": 47, | |
"last_link_id": 63, | |
"nodes": [ | |
{ | |
"id": 7, | |
"type": "CLIPTextEncode", | |
"pos": [ | |
317, | |
352 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sumaMultiplos3y5() { | |
var suma = 0; | |
for (var i = 0; i < 1000; i++) { | |
if (i % 3 == 0 || i % 5 == 0) { | |
suma += i; | |
} | |
} | |
return suma; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sumaMultiplos3y5() { | |
var suma = 0; | |
for (var i = 0; i < 1000; i++) { | |
if (i % 3 == 0 && i % 5 == 0) { | |
suma += i; | |
} | |
} | |
return suma; | |
} |