Instructions to use gsdf/Counterfeit-V2.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use gsdf/Counterfeit-V2.5 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("gsdf/Counterfeit-V2.5", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Error using with Python: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory Counterfeit-V2.5\text_encoder.
Getting this error:
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling transformers.utils.move_cache().
0it [00:00, ?it/s]
0it [00:00, ?it/s]
Traceback (most recent call last):
File "C:\Users\admin\Desktop\Counterfeit-V2.5\main.py", line 3, in
pipeline = DiffusionPipeline.from_pretrained("Counterfeit-V2.5")
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipeline_utils.py", line 709, in from_pretrained
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\modeling_utils.py", line 3206, in from_pretrained
raise EnvironmentError(
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory Counterfeit-V2.5\text_encoder.
CODE:
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("Counterfeit-V2.5")
pipe.to("cuda")
saveall = False
prompt = input("Prompt: ")
if saveall==False:
image = pipe(prompt).images[0]
image.save("%s.png"%prompt)
else:
image = pipe(prompt).images
ii=1
for i in image:
image.save("%s%d.png"%(prompt,ii))
ii+=1