Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
0.5
TFLOPS
254
190
717
Nishith Jain
KingNish
Follow
utkjain619's profile picture
schattin's profile picture
avinaba-2002's profile picture
1223 followers
·
106 following
kingnish24
KingNish24
AI & ML interests
AI is fun actually.
Recent Activity
updated
a Space
32 minutes ago
KingNish/Realtime-FLUX
reacted
to
a-r-r-o-w
's
post
with 🧠
36 minutes ago
Caching is an essential technique used in diffusion inference serving for speeding up image/video generations. Diffusers just added support for another caching method: First Block Cache - a technique developed by @chengzeyi building upon the ideas of TeaCache. The idea in short is: if the model predictions do not vary much over successive inference steps, we can skip certain steps where the prediction difference is small. To figure out whether an inference step will make a significant improvement to the overall velocity/noise prediction, we calculate the relative difference of the output of the first transformer block at timestep $t$ with $t-1$, and compare it against a selected threshold. If the difference is lower than the threshold, we skip the step. A higher threshold will lead to more steps being skipped. However, skipping many steps is bad because it can throw off the model predictions, and so we need to test and select the threshold based on level of quality-speed tradeoff for every model we use it with. Diffusers usage with CogView4: ```python import torch from diffusers import CogView4Pipeline from diffusers.hooks import apply_first_block_cache, FirstBlockCacheConfig pipe = CogView4Pipeline.from_pretrained("THUDM/CogView4-6B", torch_dtype=torch.bfloat16) pipe.to("cuda") apply_first_block_cache(pipe.transformer, FirstBlockCacheConfig(threshold=0.2)) prompt = "A photo of an astronaut riding a horse on mars" image = pipe(prompt, generator=torch.Generator().manual_seed(42)).images[0] image.save("output.png") ``` Below, you'll find the benchmarks and visualizations of the predicted output at different blocks of the Flux DiT. Docs: https://huggingface.co/docs/diffusers/main/en/optimization/cache PR: https://github.com/huggingface/diffusers/pull/11180 References: - First Block Cache: https://github.com/chengzeyi/ParaAttention - TeaCache: https://github.com/ali-vilab/TeaCache
reacted
to
a-r-r-o-w
's
post
with 🔥
36 minutes ago
Caching is an essential technique used in diffusion inference serving for speeding up image/video generations. Diffusers just added support for another caching method: First Block Cache - a technique developed by @chengzeyi building upon the ideas of TeaCache. The idea in short is: if the model predictions do not vary much over successive inference steps, we can skip certain steps where the prediction difference is small. To figure out whether an inference step will make a significant improvement to the overall velocity/noise prediction, we calculate the relative difference of the output of the first transformer block at timestep $t$ with $t-1$, and compare it against a selected threshold. If the difference is lower than the threshold, we skip the step. A higher threshold will lead to more steps being skipped. However, skipping many steps is bad because it can throw off the model predictions, and so we need to test and select the threshold based on level of quality-speed tradeoff for every model we use it with. Diffusers usage with CogView4: ```python import torch from diffusers import CogView4Pipeline from diffusers.hooks import apply_first_block_cache, FirstBlockCacheConfig pipe = CogView4Pipeline.from_pretrained("THUDM/CogView4-6B", torch_dtype=torch.bfloat16) pipe.to("cuda") apply_first_block_cache(pipe.transformer, FirstBlockCacheConfig(threshold=0.2)) prompt = "A photo of an astronaut riding a horse on mars" image = pipe(prompt, generator=torch.Generator().manual_seed(42)).images[0] image.save("output.png") ``` Below, you'll find the benchmarks and visualizations of the predicted output at different blocks of the Flux DiT. Docs: https://huggingface.co/docs/diffusers/main/en/optimization/cache PR: https://github.com/huggingface/diffusers/pull/11180 References: - First Block Cache: https://github.com/chengzeyi/ParaAttention - TeaCache: https://github.com/ali-vilab/TeaCache
View all activity
Organizations
KingNish
's activity
All
Models
Datasets
Spaces
Papers
Collections
Community
Posts
Upvotes
Likes
Articles
New activity in
victor/deepsite-gallery
3 days ago
How do i add my creation to the deepsite gallery?
2
#1 opened 3 months ago by
raayraay
New activity in
SmallDoge/MoE_dataset
11 days ago
Typo Solve
#2 opened 11 days ago by
KingNish
New activity in
QAQAQAQAQ/LiveCodeBench-Pro
21 days ago
Add Gating to Prevent bots from Scraping
1
#2 opened 21 days ago by
KingNish
New activity in
discord-community/WelcomeBot
about 1 month ago
AI-powered welcoming
➕
1
5
#4 opened about 1 month ago by
ProCreations
New activity in
bharatgenai/patram-7b-instruct
about 1 month ago
Added Benchmark PNG
1
#2 opened about 1 month ago by
KingNish
New activity in
mcp-course/unit_1_quiz
about 1 month ago
Couldn't open quiz, it asking me to login, I'm already logged in
6
#67 opened about 1 month ago by
Hiulnara
New activity in
ResembleAI/Chatterbox
about 1 month ago
Refactored Code
👍
1
1
#3 opened about 1 month ago by
KingNish
New activity in
KingNish/Bagel-7B-Demo
about 1 month ago
How many gigabytes of VRAM is necessary for this?
2
#1 opened about 1 month ago by
JLouisBiz
New activity in
KingNish/test-space
about 2 months ago
SmolSWE text
64
#29 opened about 2 months ago by
smolSWE
Implement product page, cart, and checkout functionality with icons and animations
#28 opened about 2 months ago by
smolSWE
Implement product page linking, cart functionality, icons, and animations
#27 opened about 2 months ago by
smolSWE
Replace placeholder.co with placehold.co in image URLs
#26 opened about 2 months ago by
smolSWE
Replace placeholder images with placeholder.co images
#25 opened about 2 months ago by
smolSWE
Implemented image replacement, dynamic product page, cart functionality, checkout, confirmation, and product tracking.
#24 opened about 2 months ago by
smolSWE
Implement cart, checkout, and confirmation pages
#23 opened about 2 months ago by
smolSWE
Implement homepage and product page
#22 opened about 2 months ago by
smolSWE
Initial commit: Basic project structure and page templates created.
#21 opened about 2 months ago by
smolSWE
Implemented product details, shopping cart, and checkout functionality
#20 opened about 2 months ago by
smolSWE
Implement basic Google clone layout and dummy search functionality
#18 opened about 2 months ago by
smolSWE
Initial Google clone implementation
#17 opened about 2 months ago by
smolSWE
Load more