Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler | |
import torch | |
#//////////////////////////////////////////////////////////////// | |
guidance_scale=7.5 | |
steps_base=50 | |
steps_refiner=50 | |
width=1024 | |
height=1024 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 torch | |
import textwrap | |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, MarianTokenizer, MarianMTModel | |
def chunk_examples(txt_list, width): | |
chunks = [] | |
for sentence in txt_list: | |
chunks += textwrap.wrap(sentence, width=width) | |
return chunks |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Ran it with the following packages installed: | |
# accelerate 0.18.0 | |
# diffusers 0.16.0.dev0 | |
# torch 2.0.0+cu118 | |
# torchvision 0.15.0+cu118 | |
# transformers 4.28.1 | |
# xformers 0.0.18 | |
import torch | |
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler |