Skip to content

Instantly share code, notes, and snippets.

View gradjitta's full-sized avatar
🎯
Focusing

Aditya gradjitta

🎯
Focusing
View GitHub Profile
This file has been truncated, but you can view the full file.
<html>
<head><meta charset="utf-8" /></head>
<body>
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script type="text/javascript">/**
* plotly.js v2.35.0
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license

Flux Dev (dynamic shapes) Benchmark

Setup

import os
import torch
from einops import rearrange
from transformers import pipeline
from flux.sampling import denoise, get_noise, get_schedule, unpack, prepare
import fastapi
import time
from typing import Dict
from modal import asgi_app
from modal.functions import FunctionCall
IMAGE_MODEL_DIR = "/model"
web_app = fastapi.FastAPI()